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

Issue 30453002: Should not allow style sharing if grandparents matches different rule chain (Closed)

Created:
7 years, 2 months ago by trchen
Modified:
7 years, 2 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@build_hack
Visibility:
Public.

Description

Should not allow style sharing if grandparents matches different rule chain This patch fixes a regression introduced in https://chromiumcodereview.appspot.com/24106007 Before the regressing CL, the style sharing finder strictly checks style object identity for every elements on the ancestor chain to allow sharing. The regressing CL changed that so only the parent element is checked. An optimization in Element::recalcOwnStyle allows previously shared style to keep sharing if the computed style hasn't changed, even if the parent no longer shares style. The mix of both causes problem with descendant elements to misblieve they can share style when their grandparents now matches different rule chain. This patch disallows the optimization, so we have the invariant (a->renderStyle() == b->renderStyle()) implies (a->parentElement()->renderStyle() == b->parentElement()->renderStyle()) BUG=296882 R=leviw@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=160267

Patch Set 1 #

Patch Set 2 : alternative fix: SharedStyleFinder checks the ancestor chain #

Patch Set 3 : same as patchset 2, rebased. #

Total comments: 1

Patch Set 4 : =patchset1 with additional comments #

Patch Set 5 : reupload #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -1 line) Patch
A LayoutTests/fast/css/style-sharing-grand-parent-invalidate.html View 1 chunk +53 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/style-sharing-grand-parent-invalidate-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
trchen
Hello reviewers, This patch fixes a CSS style sharing regression that is very visible on ...
7 years, 2 months ago (2013-10-19 06:28:46 UTC) #1
trchen
The CL description is for patchset 1. I uploaded an alternative fix that adds check ...
7 years, 2 months ago (2013-10-19 06:30:34 UTC) #2
esprehn
I'm partial to patch set 1 since its simpler, although I suppose it does mean ...
7 years, 2 months ago (2013-10-19 09:10:09 UTC) #3
leviw_travelin_and_unemployed
Your patch is certainly simpler, but I worry it's more expensive in the common case. ...
7 years, 2 months ago (2013-10-21 18:02:09 UTC) #4
trchen
On 2013/10/21 18:02:09, Levi wrote: > Your patch is certainly simpler, but I worry it's ...
7 years, 2 months ago (2013-10-21 18:48:16 UTC) #5
esprehn
I think we should land Patch 1 to fix the regression with a FIXME while ...
7 years, 2 months ago (2013-10-22 16:15:55 UTC) #6
trchen
Agree. New CL uploaded.
7 years, 2 months ago (2013-10-22 21:33:50 UTC) #7
esprehn
Blah, old chunk mismatch. Try uploading again.
7 years, 2 months ago (2013-10-22 21:43:51 UTC) #8
trchen
Working this time. Stupid git-cl. :(
7 years, 2 months ago (2013-10-22 21:48:07 UTC) #9
esprehn
lgtm
7 years, 2 months ago (2013-10-22 21:52:16 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/30453002/280001
7 years, 2 months ago (2013-10-22 22:00:05 UTC) #11
commit-bot: I haz the power
7 years, 2 months ago (2013-10-22 23:16:39 UTC) #12
Message was sent while issue was closed.
Change committed as 160267

Powered by Google App Engine
This is Rietveld 408576698