Closed
Bug 1345950
Opened 8 years ago
Closed 8 years ago
stylo: slow selector flag handling is broken
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bholley, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Reporter | ||
Comment 1•8 years ago
|
||
In bug 1338982 comment 9, emilio writes:
> The best idea I have right now is using an outparam Vec<(Element, Flags)>,
> but that sounds quite terrible :(.
I think a better approach might be to pass an FnMut callback through the selector matching machinery, which would allow the code to add the SequentialTask directly, or just immediately set the flags, depending on the callsite.
WDYT?
Flags: needinfo?(emilio+bugs)
Assignee | ||
Comment 2•8 years ago
|
||
(In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #1)
> In bug 1338982 comment 9, emilio writes:
>
> > The best idea I have right now is using an outparam Vec<(Element, Flags)>,
> > but that sounds quite terrible :(.
>
> I think a better approach might be to pass an FnMut callback through the
> selector matching machinery, which would allow the code to add the
> SequentialTask directly, or just immediately set the flags, depending on the
> callsite.
>
> WDYT?
WFM, though it'd be somewhat inconvenient to use from outside of Servo I guess... Not that I have a better idea.
Flags: needinfo?(emilio+bugs)
Reporter | ||
Comment 3•8 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #2)
> (In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #1)
> > In bug 1338982 comment 9, emilio writes:
> >
> > > The best idea I have right now is using an outparam Vec<(Element, Flags)>,
> > > but that sounds quite terrible :(.
> >
> > I think a better approach might be to pass an FnMut callback through the
> > selector matching machinery, which would allow the code to add the
> > SequentialTask directly, or just immediately set the flags, depending on the
> > callsite.
> >
> > WDYT?
>
> WFM, though it'd be somewhat inconvenient to use from outside of Servo I
> guess... Not that I have a better idea.
I don't think so - most of those consumers probably wouldn't set the flags anyway (and can pass |_, _| {}), and consumers that don't need the SequentialTask stuff can just pass |e, f| e.set_flags(f). And maybe even eta-reduce it! ;-)
Reporter | ||
Comment 4•8 years ago
|
||
Putting this on Emilio's plate for now, I can grab it if he doesn't get to it.
Assignee: nobody → emilio+bugs
Assignee | ||
Comment 5•8 years ago
|
||
Sounds good, I'll look at it tomorrow.
Assignee | ||
Comment 6•8 years ago
|
||
I plan to actually implement this once https://github.com/servo/servo/pull/15890 lands, given they're heavily in conflict.
Comment hidden (mozreview-request) |
Reporter | ||
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8849548 [details]
Bug 1345950: stylo: Fix slow selector flags.
https://reviewboard.mozilla.org/r/122330/#review124670
Stealing from Cameron. lgtm, thanks for doing this.
Attachment #8849548 -
Flags: review+
Reporter | ||
Updated•8 years ago
|
Attachment #8849548 -
Flags: review?(cam)
Comment 10•8 years ago
|
||
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/069fe1ab5515
Fixup test expectations. r=bholley
Comment 13•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(emilio+bugs)
You need to log in
before you can comment on or make changes to this bug.
Description
•