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

Issue 689979 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Adding or removing ::first-line has no effect

Reported by r...@opera.com, Feb 8 2017

Issue description

See attached demo.

The reason is that Element::pseudoStyleCacheIsInvalid() only has an effect when ::first-line style is applied both before and after the change.

 
firstline.html
511 bytes View Download
Labels: Hotlist-Interop
Firefox is buggy in that example. It shows both paragraphs with black text (yes it does support ::first-line, I checked).

Chrome and Firefox differ in how they break, marking as interop bug.
Labels: Update-Quarterly

Comment 3 by r...@opera.com, Mar 6 2017

Owner: r...@opera.com
Status: Assigned (was: Available)

Comment 4 by r...@opera.com, Mar 6 2017

Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc

commit 3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc
Author: rune <rune@opera.com>
Date: Tue Mar 07 16:09:10 2017

Make ::first-line invalidation work when added or removed.

We were only invalidating ::first-line properly when both old and new
ComputedStyle contained ::first-line styles. Now, instead call
setNeedsLayoutAndPrefWidthsRecalc to trigger changes when either old or
new ComputedStyle does not have ::first-line style.

The ::first-line invalidation is moved from Element to LayoutObject,
and unnecessary traversal code removed.

I have not been able to come up with a case where we need to compare
PseudoIdFirstLineInherited style, so diffing that is removed.

R=mstensho@opera.com
BUG= 562418 , 564239 , 689979 

Review-Url: https://codereview.chromium.org/2728383002
Cr-Commit-Position: refs/heads/master@{#455088}

[modify] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/LayoutTests/fast/css/invalidation/add-first-line-style-expected.html
[modify] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/LayoutTests/fast/css/invalidation/remove-first-line-style-expected.html
[add] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/LayoutTests/paint/invalidation/first-line-inline-child-expected.html
[add] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/LayoutTests/paint/invalidation/first-line-inline-child.html
[modify] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/3f2d0c6bbce99fc2880356ff2ebfd323b5bcd8bc/third_party/WebKit/Source/core/layout/LayoutObject.h

Comment 6 by r...@opera.com, Mar 7 2017

Status: Fixed (was: Started)

Sign in to add a comment