DescriptionReset SelectorCheckingContext.elementStyle for :ancestor matching.
SelectorCheckingContext.elementStyle is used to store the RenderStyle for
the element we are currently computing styles for. It is among other things
used for setting flags on the RenderStyle if we may match :hover,
:first-child, or some other pseudo classes. When we go past a combinator
during matching, we set the elementStyle to null to tell we are not
currently looking at the target element for the selector matching.
The :ancestor pseudo is a special case in the sense that it will select
styles for the shadow host element, but its sub-selectors may actually match
ancestor elements of the host element, behaving as if we had a descendant
combinator. This CL resets elementStyle to 0 when matching ancestors of a
shadow host for the :ancestor pseudo class in order to set flags for :hover,
:first-child, etc on the correct RenderStyle objects.
R=dglazkov@chromium.org
BUG=353503
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169491
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|