Open Bug 1109939 Opened 10 years ago Updated 2 years ago

avoid calling TreeMatchContext::InitAncestors when we know we'll do no selector matching

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

People

(Reporter: heycam, Unassigned)

References

Details

Can we avoid calling TreeMatchContext::InitAncestors if we're doing a style-attribute-only or animation-only restyle, since we often will not need to do any selector matching? And maybe also for nsRestyleHint(0) too? We could have a descendant with a pending restyle hint that does need to do selector matching, though. Can we recover if we encounter this by calling InitAncestors lazily, at the point we know we'll need to use the TreeMatchContext? And if so, where would we store the ancestors we gather up with AutoAncestorPusher as we traverse down the tree?
(In reply to Cameron McCormack (:heycam) from comment #0) > And if so, where would we store the ancestors we gather > up with AutoAncestorPusher as we traverse down the tree? We can just store them in an nsAutoTArray on the TreeMatchContext.
That seems workable, yes.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.