Use atoms for grid line names.

RESOLVED FIXED in Firefox 69

Status

()

task
P3
normal
RESOLVED FIXED
Last month
Last month

People

(Reporter: emilio, Assigned: emilio)

Tracking

unspecified
mozilla69
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox69 fixed)

Details

Attachments

(3 attachments)

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.

Type: defect → task
Depends on: 1559545

I'm going to need it in an upcoming patch.

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

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

Blocks: 1559814
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
You need to log in before you can comment on or make changes to this bug.