Closed Bug 1359323 Opened 6 years ago Closed 6 years ago

stylo: make predefined counter style names static atoms

Categories

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

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: SimonSapin, Unassigned)

References

(Blocks 1 open bug)

Details

* Add strings in kCSSRawPredefinedCounterStyles to the list of static atoms that can be used with the atom!("…") macro in Stylo

* Once https://github.com/servo/servo/pull/16455 has landed, find occurrences of Atom::from("decimal") and replace them with atom!("decimal")

This would avoid a small number of memory allocations.
Priority: -- → P4
> * Once https://github.com/servo/servo/pull/16455 has landed, find occurrences of Atom::from("decimal") and replace them with atom!("decimal")

This has been done. With bug 1328319 lands, all Atom::from("decimal") should have been replaced with atom!("decimal").

> * Add strings in kCSSRawPredefinedCounterStyles to the list of static atoms that can be used with the atom!("…") macro in Stylo

This is probably not necessary. It would likely make parsing counter style name a bit faster since we would not need a second hash table search for atom, but it wouldn't save much memory I suppose.
Ok. Should this be resolved then?
Flags: needinfo?(simon.sapin)
I defer to Xidorn’s judgment.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(simon.sapin)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.