Use atoms for grid line names.
Categories
(Core :: CSS Parsing and Computation, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(3 files)
The style system already atomizes all CustomIdent values, which means that we're
just wasting memory and CPU by doing string copies all over the place.
This also simplifies further changes to use as much of the
rust data structures as possible.
Assignee | ||
Comment 1•5 years ago
|
||
I'm going to need it in an upcoming patch.
Assignee | ||
Comment 2•5 years ago
|
||
The style system already atomizes all CustomIdent values, which means that we're
just wasting memory and CPU by doing string copies all over the place.
This patch fixes it. This also simplifies further changes to use as much of the
rust data structures as possible.
I had to switch from nsTHashtable to mozilla::HashTable because the former
doesn't handle well non-default-constructible structs (like NamedLine, which
now has a StyleAtom, which is not default-constructible).
Depends on D35118
Assignee | ||
Comment 3•5 years ago
|
||
Both for symmetry with other string APIs, and also to prevent footguns (since I
debugged for a while a typo where I wrote nsGkAtoms::empty rather than
nsGkAtoms::_empty).
We could use null here, but that will not be possible in the future when I use
the rust representation of more grid data structures (at least without
increasing memory usage).
So I think I'll keep using ::_empty as a signaling value for "no grid
identifier".
Depends on D35119
Assignee | ||
Comment 4•5 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e5b608b1442 Allow to construct StyleAtom objects from C++. r=heycam https://hg.mozilla.org/integration/autoland/rev/acf98e967abe Use atoms for grid line names. r=mats https://hg.mozilla.org/integration/autoland/rev/8567a308ac7a Introduce nsAtom::IsEmpty. r=njn
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1e5b608b1442
https://hg.mozilla.org/mozilla-central/rev/acf98e967abe
https://hg.mozilla.org/mozilla-central/rev/8567a308ac7a
Description
•