mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
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:
parent
e8271ee926
commit
6cb588d2b5
4 changed files with 68 additions and 130 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue