stylo: make predefined counter style names static atoms

RESOLVED FIXED

Status

()

Core
CSS Parsing and Computation
P4
normal
RESOLVED FIXED
9 months ago
8 months ago

People

(Reporter: SimonSapin, Unassigned)

Tracking

(Blocks: 2 bugs)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 months 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 → ---

Updated

8 months ago
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

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