New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 707533 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Compat


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

::first-line skips atomic inlines

Reported by oriol-bu...@hotmail.com, Apr 1 2017

Issue description

UserAgent: 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.
 
testcase.htm
722 bytes View Download
Labels: Needs-Triage-M59 Needs-Bisect
Cc: sureshkumari@chromium.org
Labels: -Needs-Bisect -Needs-Triage-M59 M-59 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
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..

707533.mp4
167 KB View Download

Comment 3 by r...@opera.com, Apr 3 2017

Components: -Blink>CSS Blink>Layout

Comment 4 by e...@chromium.org, Apr 3 2017

Cc: kojii@chromium.org glebl@chromium.org
Labels: -Type-Bug -Pri-2 Pri-3 Type-Compat
Status: Available (was: Untriaged)
Let's make sure we get this right in NG.
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>

Comment 6 by kojii@chromium.org, Apr 6 2017

Cc: meade@chromium.org r...@opera.com
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?
That seemed a different issue to me, so I filed it in https://bugs.chromium.org/p/chromium/issues/detail?id=708783

Comment 8 by meade@chromium.org, Apr 7 2017

Owner: r...@opera.com
Rune, you've been looking at first-line lately, do you mind taking a look? Thanks!
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.

Comment 10 by kojii@chromium.org, Apr 10 2017

Cc: e...@chromium.org ikilpatrick@chromium.org
+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.

Comment 11 by r...@opera.com, Apr 11 2017

Owner: ----
::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.

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.
Cc: pbomm...@chromium.org
 Issue 750268  has been merged into this issue.
Project Member

Comment 14 by sheriffbot@chromium.org, Aug 2

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Status: Available (was: Untriaged)

Sign in to add a comment