DescriptionMake getComputedStyle optimization work for adjacent combinators.
Recalc style was avoided if none of the ascendants needed style recalc or
style invalidation. That did not catch the cases where SubtreeStyleChange
is propagated to siblings when the node or some of its siblings have tried
to match selectors with adjacent combinators (propagation happens in
ContainerNode::checkForChildrenAdjacentRuleChanges()).
We change the condition for recalc to include the case where we have an
ascendant which has children that needs recalc, and at the same time has
children that tried to match some selector with an adjacent combinator.
For that case a SubtreeStyleChange may be propagated to a sibling which
is an ascendant of the element we are calling getComputedStyle on.
Likewise for ascendants which have children that needs style invalidation
and at the same time have children that tried to match selectors with
adjacent combinators.
R=esprehn@chromium.org
BUG=436064
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186599
Patch Set 1 #
Total comments: 3
Patch Set 2 : #Patch Set 3 : Rebased #Patch Set 4 : Redistribution might change computed style. #
Messages
Total messages: 15 (5 generated)
|