mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Use ArcSlice for quotes.
This saves the intermediate allocation. Differential Revision: https://phabricator.services.mozilla.com/D30546
This commit is contained in:
parent
bbc77e3977
commit
a109fbb7c8
9 changed files with 85 additions and 44 deletions
|
@ -23,7 +23,6 @@ use crate::gecko_bindings::structs::RawServoMediaRule;
|
|||
use crate::gecko_bindings::structs::RawServoMozDocumentRule;
|
||||
use crate::gecko_bindings::structs::RawServoNamespaceRule;
|
||||
use crate::gecko_bindings::structs::RawServoPageRule;
|
||||
use crate::gecko_bindings::structs::RawServoQuotes;
|
||||
use crate::gecko_bindings::structs::RawServoStyleRule;
|
||||
use crate::gecko_bindings::structs::RawServoStyleSheetContents;
|
||||
use crate::gecko_bindings::structs::RawServoSupportsRule;
|
||||
|
@ -40,7 +39,6 @@ use crate::stylesheets::{NamespaceRule, PageRule};
|
|||
use crate::stylesheets::{StyleRule, StylesheetContents, SupportsRule};
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use std::{mem, ptr};
|
||||
use values::computed::QuotePair;
|
||||
|
||||
macro_rules! impl_arc_ffi {
|
||||
($servo_type:ty => $gecko_type:ty[$addref:ident, $release:ident]) => {
|
||||
|
@ -115,9 +113,6 @@ impl_arc_ffi!(Locked<CounterStyleRule> => RawServoCounterStyleRule
|
|||
impl_arc_ffi!(CssUrlData => RawServoCssUrlData
|
||||
[Servo_CssUrlData_AddRef, Servo_CssUrlData_Release]);
|
||||
|
||||
impl_arc_ffi!(Box<[QuotePair]> => RawServoQuotes
|
||||
[Servo_Quotes_AddRef, Servo_Quotes_Release]);
|
||||
|
||||
// ComputedStyle is not an opaque type on any side of FFI.
|
||||
// This means that doing the HasArcFFI type trick is actually unsound,
|
||||
// since it gives us a way to construct an Arc<ComputedStyle> from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue