Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Issue 144963002: Make pseudo element update work with LocalStyleChange. (Closed)

Created:
6 years, 11 months ago by rune
Modified:
6 years, 10 months ago
Reviewers:
esprehn
CC:
blink-reviews, zoltan1, dsinclair, sof, eae+blinkwatch, leviw+renderwatch, dglazkov+blink, adamk+blink_chromium.org, jchaffraix+rendering, bemjb+rendering_chromium.org, Inactive
Visibility:
Public.

Description

Make pseudo element update work with LocalStyleChange. The missing pseudo element update on LocalStyleChange did not cause any bugs at the moment since LocalStyleChange is not used when pseudo element selector matching changes, but necessary to fix in preparation for optimizing :hover, :active, and :focus updates using LocalStyleChange. If pseudo elements are updated for LocalStyleChange, style updates for mentioned pseudo classes can use LocalStyleChange in many cases where SubtreeStyleChange is currently used. LocalStyleChange recalc style for the given element and descendants which inherit any of the changes from that element. In addition, there is code to make sure pseudo element children were being updated when the styles for the element itself did not change, but matching of its pseudo elements did. That code (shouldRecalcStyle() check on the actual element before calling updatePseudoElement() in recalcChildStyle) was introduced in [1], but changed behavior in [2] because needsRecalcStyle was cleared before recalcChildStyle. UpdatePseudoElements is added as a new StyleRecalcChange which causes an update of the pseudo element children, but not other children in the case where the styles for the actual element were recalculated, but resulted in NoChange or NoInherit, and any of the pseudo element bits were set on RenderStyle. [1] https://src.chromium.org/viewvc/blink?revision=147696&view=revision [2] https://src.chromium.org/viewvc/blink?revision=161568&view=revision BUG=337983 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165981

Patch Set 1 #

Patch Set 2 : Fixed regressions #

Patch Set 3 : Yet another regression fix. #

Patch Set 4 : Moved code around to make the change simpler. #

Patch Set 5 : Rebase #

Total comments: 4

Patch Set 6 : Fixed review issues. #

Patch Set 7 : Last patch set caused a regression. #

Patch Set 8 : Rebased onto newer master #

Total comments: 3

Patch Set 9 : Fixed review issues and removed always true if-tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -39 lines) Patch
M Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 5 chunks +46 lines, -38 lines 0 comments Download
M Source/core/rendering/style/RenderStyle.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/rendering/style/RenderStyleConstants.h View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
rune
6 years, 11 months ago (2014-01-24 22:40:37 UTC) #1
esprehn
Can we just put change type checks in recalcChildStyle? I'm not a fan of the ...
6 years, 11 months ago (2014-01-24 22:53:48 UTC) #2
rune
https://codereview.chromium.org/144963002/diff/170001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/144963002/diff/170001/Source/core/dom/Element.cpp#newcode1599 Source/core/dom/Element.cpp:1599: updatePseudoElement(BACKDROP, change); On 2014/01/24 22:53:49, esprehn wrote: > Can ...
6 years, 11 months ago (2014-01-25 00:00:38 UTC) #3
esprehn
please remove the bool and add braces before landing. You can leave the method if ...
6 years, 10 months ago (2014-01-28 18:08:04 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/144963002/400001
6 years, 10 months ago (2014-01-28 21:27:28 UTC) #5
commit-bot: I haz the power
Change committed as 165981
6 years, 10 months ago (2014-01-29 00:22:34 UTC) #6
commit-bot: I haz the power
6 years, 10 months ago (2014-01-29 00:24:16 UTC) #7
Message was sent while issue was closed.
CQ bit was unchecked on CL. Ignoring.

Powered by Google App Engine
This is Rietveld 408576698