Closed Bug 1373056 Opened 7 years ago Closed 7 years ago

stylo: Store the prescontext on the rule tree and stop storing it on ServoStyleContext

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bholley, Assigned: bholley)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Once we do the dependent bugs, we can save a word on the combined ServoStyleContext/ServoComputedValues by adding a PresContext pointer on the root rule node and pointer-chasing to it in the PresContext() accessor (like Gecko does).
(On dep fixed - when we do fused objects we can do this).
Assignee: nobody → bobbyholley
No longer depends on: 1367904
So I just wrote a patch for this, because I wanted to use the non-existence of a prescontext to indicate rule tree teardown, and figured out would knock this bug out while I was at it. However, we just discussed it and realized there are a couple of downsides: * We can't have Option<RuleNode> on the ComputedValues, and would have to use the root (which is extra refcount traffic, and complexity to pass to all the right places). * The extra indirection may actually cost us in terms of performance, since nsIFrame::PresContext() (which is used all over layout) pointer-chases via the StyleContext. So I'm going to torpedo this patch and just use a bit to indicate teardown. I'll post the patch here for posterity.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: