New issue
Advanced search Search tips

Issue 708783 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Adding ::first-line disables ancestor's ::first-line

Reported by oriol-bu...@hotmail.com, Apr 5 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:
Add ::first-line pseudo-elements to various ancestors.

What is the expected behavior?
All ::first-line should work.
See https://drafts.csswg.org/css-pseudo-4/#example-2bbf9288 for reference.

What went wrong?
Only the innermost one works. The others are ignored.

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

This works correctly on Edge. Firefox has much more serious problems.

Demo: https://jsfiddle.net/1vmvgzwh/
 
testcase.htm
379 bytes View Download
Labels: Needs-Triage-M59
Labels: -OS-Windows -Needs-Triage-M59 Needs-Bisect OS-All
Status: Available (was: Unconfirmed)
Looks like a problem of the pseudo style values not inheriting as expected.
Test fails in Chrome stable 57, beta 58 and canary 59.
Labels: Update-Quarterly

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

Status: Untriaged (was: Available)

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

Cc: r...@opera.com
Cc: kkaluri@chromium.org
Labels: -Needs-Bisect M-59
Able to reproduce this issue on Windows 10, Ubuntu 14.04 and Mac 10.12.4 with chrome #59.0.3064.0 and also in earlier version #30.0.1599.0.

This is a non-regression issue.

Attaching a screen-cast for reference.
Issue 708783.mp4
307 KB View Download

Comment 7 by shans@chromium.org, Apr 10 2017

Status: Available (was: Untriaged)

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

Components: Blink>Layout
FirstLineStyleForCachedUncachedType() in LayoutObject.cpp is calling LayoutBlock::EnclosingFirstLineStyleBlock() which returns the closest containing block with ::first-line style. In order to properly combine ::first-line style from multiple containers, FirstLineStyleForCachedUncachedType() must query ::first-line style on all containers with ::first-line style and inherit appropriately.

Note that this doesn't work in Gecko either. Presto might have been the only one (did correctly nest for ::first-letter, at least). Don't remember if IE/Edge does.

Labels: Code-Resolver

Comment 10 by meade@chromium.org, Nov 27 2017

Labels: ApproachableBug

Comment 11 by meade@chromium.org, Nov 27 2017

Cc: -r...@opera.com e...@chromium.org futhark@chromium.org
Components: -Blink>CSS
Project Member

Comment 12 by sheriffbot@chromium.org, Nov 27

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
Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)

Sign in to add a comment