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)
Core
CSS Parsing and Computation
Tracking
()
NEW
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?
Reporter | ||
Comment 1•10 years ago
|
||
(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.
Comment 2•10 years ago
|
||
That seems workable, yes.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•