DescriptionAvoid unnecessary style recalc for subtree of focused element.
*** Relanding https://codereview.chromium.org/135183002/
Updating the styles for an element that changes its focus state only needs to
force a recalc of the subtree if the subtree contains an element that could
match a selector which contains a :focus pseudo class left of child or
descendant combinator. At the same time, that :focus pseudo must match the
element we are updating focus state for. This is indicated by the return value
of Element::childrenAffectedByFocus.
This change does a LocalStyleChange when updating the focus state of an
element which returns false for childrenAffectedByFocus, and
SubtreeStyleChange otherwise.
TBR=eseidel
BUG=315923
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167598
Patch Set 1 #
Messages
Total messages: 3 (0 generated)
|