DescriptionShould 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 #
Messages
Total messages: 12 (0 generated)
|