style: Use Servo for the representation of grid template areas.

Right now we do a lot of useless string copying. In order to avoid transcoding
to utf-16 during layout, make sure to use nsCString at a few related places.

I may revisit this since we're storing other line names as atoms in some places.
So it may be better to just use atoms everywhere.

But that'd be a different patch either way.

Differential Revision: https://phabricator.services.mozilla.com/D35117
This commit is contained in:
Emilio Cobos Álvarez 2019-06-18 22:29:58 +00:00
parent e8271ee926
commit 6cb588d2b5
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
4 changed files with 68 additions and 130 deletions

View file

@ -308,11 +308,6 @@ impl_threadsafe_refcount!(
bindings::Gecko_AddRefnsIURIArbitraryThread,
bindings::Gecko_ReleasensIURIArbitraryThread
);
impl_threadsafe_refcount!(
structs::mozilla::css::GridTemplateAreasValue,
bindings::Gecko_AddRefGridTemplateAreasValueArbitraryThread,
bindings::Gecko_ReleaseGridTemplateAreasValueArbitraryThread
);
impl_threadsafe_refcount!(
structs::SharedFontList,
bindings::Gecko_AddRefSharedFontListArbitraryThread,
@ -328,6 +323,7 @@ impl_threadsafe_refcount!(
unsafe fn addref_atom(atom: *mut structs::nsAtom) {
mem::forget(Atom::from_raw(atom));
}
#[inline]
unsafe fn release_atom(atom: *mut structs::nsAtom) {
let _ = Atom::from_addrefed(atom);