Closed Bug 1490997 Opened 6 years ago Closed 6 years ago

Use nsAtom instead of nsString for font family name in the FontFamilyName struct

Categories

(Core :: Layout: Text and Fonts, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(2 files, 1 obsolete file)

Followup to bug 1490402 comment 4: it would probably make sense to switch the mName field here from nsString to nsAtom:

https://searchfox.org/mozilla-central/rev/a23c3959b62cd3f616435e02810988ef5bac9031/gfx/thebes/gfxFontFamilyList.h#164
Here's a prototype patch that I think makes most of the Gecko changes required; but it doesn't currently build because (naturally) it breaks Stylo compilation.

It's not immediately obvious to me how to handle the nsAtom field from the Rust side, so Emilio, any chance you could fix that up (to spare me hours of digging around)? :) Thanks!
Flags: needinfo?(emilio)
Attached patch Style changes.Splinter Review
Sure, there you go :)
Flags: needinfo?(emilio)
Awesome, thanks! I've pushed a try job to see if anything breaks... https://treeherder.mozilla.org/#/jobs?repo=try&revision=042e736be74f69e88d664b948141659148edb312.
This is a followup to bug 1490402, removing 16-bit string usage from the FontFamilyName struct and related methods. (This incorporates Emilio's patch for the Rust side of things.)
Attachment #9009638 - Flags: review?(lsalzman)
Attachment #9008735 - Attachment is obsolete: true
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #9009638 - Flags: review?(lsalzman) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bae2e21a9312
Use nsAtom instead of nsString for font family name in the FontFamilyName struct, and switch its methods from 16-bit to 8-bit strings. r=lsalzman
https://hg.mozilla.org/mozilla-central/rev/bae2e21a9312
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: