Make 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

Review URL: https://codereview.chromium.org/768533004

git-svn-id: svn://svn.chromium.org/blink/trunk@186599 bbb929c8-8fbe-4397-9dbb-9b2b20218538
4 files changed
tree: 5b44e57705aed67ed1502f384863ae33376f6b5a
  1. third_party/