stylo: make predefined counter style names static atoms

RESOLVED FIXED

Status

()

P4
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: SimonSapin, Unassigned)

Tracking

(Blocks: 2 bugs)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
* 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.
status-firefox57: affected → ---
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)
(Reporter)

Comment 3

2 years ago
I defer to Xidorn’s judgment.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(simon.sapin)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.