Recalc sibling styles for forward positional rules on mutations only.

Forward positional rules only affect selector matching of siblings when
nodes are added to or removed from the DOM. However, selectors with indirect
adjacent combinators may affect sibling evaluation without node addition or
removal. For instance if a class selector left of an indirect adjacent
combinator is set on an element.

Since the indirect adjacent combinator was considered as a forward
positional rule, we were recalculating sibling styles in the presence of an
nth-selector. We now split indirect adjacent selector matching as a separate
flag to be able to optimize recalc in the presence if nth-selectors and
skip sibling recalc for forward positional rules if no mutations happened.

ElementRareData and ShadowRootRareData do not increase in size since they
were already padded in the relevant parts.

R=ojan
BUG=160212

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169471 bbb929c8-8fbe-4397-9dbb-9b2b20218538
11 files changed
tree: 191af0d8ce0ff90b2a4b77127fd530daf960c3b7
  1. third_party/