DescriptionPersist invalidation sets on detach root
This is a second attempt at not clearing sibling invalidation sets on
detached and SubtreeStyleChange nodes. The first[1] failed because
childNeedsStyleInvalidation() was still cleared on detach().
This approach keeps invalidation sets on the detach root, but clears
invalidation sets on descendants. However, when we detach a node to be
removed, we also clear the detach root as that will not have a chance of
being used on the next invalidation. Also, there are asserts checking
that we don't re-insert nodes into the tree with needsStyleInvalidation().
Removed scheduled sibling invalidation sets from nodes being removed from
the tree is not a problem as the checkForSiblingStyleChanges() method
will make sure sibling trees are invalidated.
The early return in StyleInvalidator::scheduleInvalidationSetsForElement
is removed to be able to schedule sibling invalidation sets although we
have a SubtreeStyleChange or ReattachStyleChange on the element itself.
The added test checks that the invalidation works properly, also after
the checkForChildrenAdjacentRuleChanges() removal.
[1] https://codereview.chromium.org/1507653002
R=esprehn@chromium.org,ericwilligers@chromium.org
BUG=557440
Committed: https://crrev.com/8559ce4ad0e473907604f6ecd51c80a06880cc29
Cr-Commit-Position: refs/heads/master@{#369021}
Patch Set 1 #Patch Set 2 : Persist invalidation sets on detach root #Patch Set 3 : Avoid detaching when in inactive state #
Messages
Total messages: 18 (7 generated)
|