Closed Bug 1365659 Opened 3 years ago Closed 3 years ago

stylo: Use id/class flags on snapshots to skip trying to get them if they aren't there

Categories

(Core :: CSS Parsing and Computation, enhancement, P1)

53 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Followup from bug 1365471.
Assignee: nobody → bzbarsky
Priority: -- → P1
Comment on attachment 8868688 [details]
Bug 1365659 part 1.  Change stylo element snapshot member ordering to pack a bit better.

https://reviewboard.mozilla.org/r/140286/#review144000
Attachment #8868688 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8868689 [details]
Bug 1365659 part 2.  Add id/class flags to stylo snapshots and set them correctly on the Gecko side.

https://reviewboard.mozilla.org/r/140288/#review144002
Attachment #8868689 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8868690 [details]
Bug 1365659 part 3.  Use snapshot id/class flags on the servo side to optimize id/class access on snapshots.

https://reviewboard.mozilla.org/r/140290/#review144004

r=me, thanks for fixing this! :)

::: servo/components/style/gecko/snapshot.rs:171
(Diff revision 1)
>          }
>      }
>  
> +    #[inline]
>      fn has_class(&self, name: &Atom) -> bool {
> +        if self.has_any(Flags::MaybeClass) {

nit: Perhaps for symmetry with the other methods it may be better to use:

if !self.has_any(Flags::MaybeClass) {
    return false
}

snapshot_helpers::..(..)

But not a big deal in any case.
Comment on attachment 8868690 [details]
Bug 1365659 part 3.  Use snapshot id/class flags on the servo side to optimize id/class access on snapshots.

https://reviewboard.mozilla.org/r/140290/#review144008
Attachment #8868690 - Flags: review?(emilio+bugs) → review+
Attachment #8868690 - Attachment is obsolete: true
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a6e31b43d76b
part 1.  Change stylo element snapshot member ordering to pack a bit better.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/296338483720
part 2.  Add id/class flags to stylo snapshots and set them correctly on the Gecko side.  r=emilio
https://hg.mozilla.org/mozilla-central/rev/a6e31b43d76b
https://hg.mozilla.org/mozilla-central/rev/296338483720
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.