DescriptionConsider pseudo classes as matching for shared style rejection.
The user action pseudo classes rely on affectedBy bits to be correctly
set on ComputedStyle in order to recalculate style for such changes
later on. If two elements may otherwise share style, but will have the
affectedBy bits set differently, they may not share style.
Example:
<style>[attr]:hover {}</style>
<div></div>
<div attr></div>
The second div may share style with the first one when none of them is
hovered. However, matching the selector against the first div will fail
on the attribute selector before we try to match :hover, hence the flag
for affectedByHover will not be set. If we share that ComputedStyle
object with the second div, hovering the second div later will have no
effect.
Instead we always match :hover/:active/:focus/:-webkit-drag when
matching rules for style sharing (attribute and sibling rules). That
will lead to the attribute selector in the example above to match which
will cause style sharing to be rejected for the second div.
R=meade@chromium.org
BUG=639561
Committed: https://crrev.com/b2aee8879058a6a85104073c38868e4edd66b628
Cr-Commit-Position: refs/heads/master@{#414221}
Patch Set 1 #Patch Set 2 : Needed one more CORE_EXPORT #Patch Set 3 : Handle negated selectors #
Messages
Total messages: 17 (10 generated)
|