::first-line skips atomic inlines
Reported by
oriol-bu...@hotmail.com,
Apr 1 2017
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0 Steps to reproduce the problem: Create various atomic inlines (e.g. inline-block, inline-table, inline-flex, inline-grid, ruby) inside a block container. Style the ::first-line of the block container. What is the expected behavior? The atomic inlines should inherit styles from ::first-line. What went wrong? They inherit directly from the block container. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 59.0.3055.0 Channel: n/a OS Version: 10.0 Flash Version: Shockwave Flash 25.0 r0 Works on Edge and Firefox.
,
Apr 3 2017
Able to reproduce the issue on Windows 10,Windows-7,Ubuntu 14.04 and Mac 10.12.3 with Chrome stable version 57.0.2987.133 and Canary #59.0.3060.0 This is a non regression issue, observed from M30# 30.0.1550.0 and marking it as untriaged to get more inputs from dev team. Please find attached screen cast for reference. Thanks..
,
Apr 3 2017
,
Apr 3 2017
Let's make sure we get this right in NG.
,
Apr 3 2017
By the way, the last test is not good because it seems Chromium does not support display:ruby yet, so it behaves like display:block. It should be as follows (which still fails): <div><ruby>Hello<br />Goodbye</ruby> etcetera</div>
,
Apr 6 2017
rune@, meade@, could you mind to advise? This issue doesn't require atomic inline. Layout picks first line style if first line as you know, but when the first line has descendants, we don't inherit from the first line style. Test: http://output.jsbin.com/vihufa/ What are the best way to solve this?
,
Apr 6 2017
That seemed a different issue to me, so I filed it in https://bugs.chromium.org/p/chromium/issues/detail?id=708783
,
Apr 7 2017
Rune, you've been looking at first-line lately, do you mind taking a look? Thanks!
,
Apr 8 2017
Not much relevant, but CSS Display was fixed, it no longer says that ruby containers are atomic inlines. So the problem is that ::first-line skips atomic inlines and ruby containers.
,
Apr 10 2017
+eae@, +ikilpatrick@ as this might affect NG tree building. More tests: http://output.jsbin.com/vihufa/ I think what we should do for ::first-line in NG is that: 1. During the tree building, we create two boxes, one for ::first-line and the rest of line. 2. The ::first-line box has constraint_space to contain single line, the height of which is determined at layout time. 3. The box for the rest of line continues from the break token of the ::first-line box. I'm not sure how efficiently we can calc style by creating two boxes, but this looks similar to regular overflow/fragmentation.
,
Apr 11 2017
::first-line style is never inherited into atomic inlines because of the test here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp?q=LayoutBlockFlow::+package:%5Echromium$&dr=CSs&l=1984 as UpdateAlwaysCreateLineBoxes() call in the else statement is the only path which queries first-line or inherited first-line styles.
,
May 2 2017
Some info from Francois on how Edge works: https://github.com/w3c/csswg-drafts/issues/1097#issuecomment-294630127 followed by dabaron's comment on Gecko's info. From the test in #10, we don't inherit even into <span>s. Querying the correct style as Rune pointed out is one problem, inheriting from first-line style is another problem IIUC. Since #10 looks too inefficient to me, I might need to study more on how Edge and Gecko handles first-line.
,
Aug 2 2017
,
Aug 2
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 2
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by nyerramilli@chromium.org
, Apr 3 2017