diff --git a/components/style/gecko_conversions.rs b/components/style/gecko_conversions.rs index ec74adc0888..71457a7dc3a 100644 --- a/components/style/gecko_conversions.rs +++ b/components/style/gecko_conversions.rs @@ -11,7 +11,7 @@ use app_units::Au; use gecko_bindings::bindings::{RawServoStyleSheet, ServoComputedValues}; use gecko_bindings::structs::nsStyleCoord_CalcValue; -use gecko_bindings::sugar::refptr::{HasArcFFI, HasFFI}; +use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI}; use properties::ComputedValues; use stylesheets::Stylesheet; use values::computed::{CalcLengthOrPercentage, LengthOrPercentage}; diff --git a/ports/geckolib/binding_tools/regen.py b/ports/geckolib/binding_tools/regen.py index 08ae548205c..556e2d184c7 100755 --- a/ports/geckolib/binding_tools/regen.py +++ b/ports/geckolib/binding_tools/regen.py @@ -323,25 +323,25 @@ def build(objdir, target_name, debug, debugger, kind_name=None, flags.append("--blacklist-type") flags.append("{}Strong".format(ty)) flags.append("--raw-line") - flags.append("pub type {0}Strong = ::sugar::refptr::Strong<{0}>;".format(ty)) + flags.append("pub type {0}Strong = ::sugar::ownership::Strong<{0}>;".format(ty)) flags.append("--blacklist-type") flags.append("{}Borrowed".format(ty)) flags.append("--raw-line") - flags.append("pub type {0}Borrowed<'a> = ::sugar::refptr::Borrowed<'a, {0}>;".format(ty)) + flags.append("pub type {0}Borrowed<'a> = ::sugar::ownership::Borrowed<'a, {0}>;".format(ty)) if "servo_owned_types" in current_target: for ty in current_target["servo_owned_types"]: - flags.append("-blacklist-type") + flags.append("--blacklist-type") flags.append("{}Borrowed".format(ty)) - flags.append("-raw-line") + flags.append("--raw-line") flags.append("pub type {0}Borrowed<'a> = &'a {0};".format(ty)) - flags.append("-blacklist-type") + flags.append("--blacklist-type") flags.append("{}BorrowedMut".format(ty)) - flags.append("-raw-line") + flags.append("--raw-line") flags.append("pub type {0}BorrowedMut<'a> = &'a mut {0};".format(ty)) - flags.append("-blacklist-type") + flags.append("--blacklist-type") flags.append("{}Owned".format(ty)) - flags.append("-raw-line") - flags.append("pub type {0}Owned = ::sugar::refptr::Owned<{0}>;".format(ty)) + flags.append("--raw-line") + flags.append("pub type {0}Owned = ::sugar::ownership::Owned<{0}>;".format(ty)) if "structs_types" in current_target: for ty in current_target["structs_types"]: ty_fragments = ty.split("::") diff --git a/ports/geckolib/data.rs b/ports/geckolib/data.rs index 893206901a4..6b279510982 100644 --- a/ports/geckolib/data.rs +++ b/ports/geckolib/data.rs @@ -4,7 +4,7 @@ use euclid::size::TypedSize2D; use gecko_bindings::bindings::RawServoStyleSet; -use gecko_bindings::sugar::refptr::{HasBoxFFI, HasFFI, HasSimpleFFI}; +use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI}; use num_cpus; use std::cmp; use std::collections::HashMap; diff --git a/ports/geckolib/gecko_bindings/bindings.rs b/ports/geckolib/gecko_bindings/bindings.rs index 3696b30fd42..546a27b14b1 100644 --- a/ports/geckolib/gecko_bindings/bindings.rs +++ b/ports/geckolib/gecko_bindings/bindings.rs @@ -5,15 +5,15 @@ pub enum nsINode {} pub enum nsIDocument {} pub enum nsIPrincipal {} pub enum nsIURI {} -pub type ServoComputedValuesStrong = ::sugar::refptr::Strong; -pub type ServoComputedValuesBorrowed<'a> = ::sugar::refptr::Borrowed<'a, ServoComputedValues>; -pub type RawServoStyleSheetStrong = ::sugar::refptr::Strong; -pub type RawServoStyleSheetBorrowed<'a> = ::sugar::refptr::Borrowed<'a, RawServoStyleSheet>; -pub type ServoDeclarationBlockStrong = ::sugar::refptr::Strong; -pub type ServoDeclarationBlockBorrowed<'a> = ::sugar::refptr::Borrowed<'a, ServoDeclarationBlock>; +pub type ServoComputedValuesStrong = ::sugar::ownership::Strong; +pub type ServoComputedValuesBorrowed<'a> = ::sugar::ownership::Borrowed<'a, ServoComputedValues>; +pub type RawServoStyleSheetStrong = ::sugar::ownership::Strong; +pub type RawServoStyleSheetBorrowed<'a> = ::sugar::ownership::Borrowed<'a, RawServoStyleSheet>; +pub type ServoDeclarationBlockStrong = ::sugar::ownership::Strong; +pub type ServoDeclarationBlockBorrowed<'a> = ::sugar::ownership::Borrowed<'a, ServoDeclarationBlock>; pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet; pub type RawServoStyleSetBorrowedMut<'a> = &'a mut RawServoStyleSet; -pub type RawServoStyleSetOwned = ::sugar::refptr::Owned; +pub type RawServoStyleSetOwned = ::sugar::ownership::Owned; use structs::nsStyleFont; unsafe impl Send for nsStyleFont {} unsafe impl Sync for nsStyleFont {} diff --git a/ports/geckolib/gecko_bindings/sugar/mod.rs b/ports/geckolib/gecko_bindings/sugar/mod.rs index a4c6b1b98c2..a451d67a06d 100644 --- a/ports/geckolib/gecko_bindings/sugar/mod.rs +++ b/ports/geckolib/gecko_bindings/sugar/mod.rs @@ -6,4 +6,4 @@ mod ns_css_shadow_array; mod ns_style_auto_array; pub mod ns_style_coord; mod ns_t_array; -pub mod refptr; +pub mod ownership; diff --git a/ports/geckolib/gecko_bindings/sugar/refptr.rs b/ports/geckolib/gecko_bindings/sugar/ownership.rs similarity index 100% rename from ports/geckolib/gecko_bindings/sugar/refptr.rs rename to ports/geckolib/gecko_bindings/sugar/ownership.rs diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 4431a6b55b1..ce339a4fbf1 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -20,8 +20,8 @@ use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI}; use gecko_bindings::structs::ServoElementSnapshot; use gecko_bindings::structs::nsRestyleHint; use gecko_bindings::structs::{SheetParsingMode, nsIAtom}; -use gecko_bindings::sugar::refptr::{FFIArcHelpers, HasArcFFI, HasBoxFFI}; -use gecko_bindings::sugar::refptr::{HasSimpleFFI, HasFFI, Strong}; +use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI}; +use gecko_bindings::sugar::ownership::{HasSimpleFFI, HasFFI, Strong}; use gecko_string_cache::Atom; use snapshot::GeckoElementSnapshot; use std::mem::transmute; diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index b6f5dbae753..b4c055e34e5 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -25,7 +25,7 @@ use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsEle use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode}; use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO}; use gecko_bindings::structs::{nsIAtom, nsChangeHint, nsStyleContext}; -use gecko_bindings::sugar::refptr::FFIArcHelpers; +use gecko_bindings::sugar::ownership::FFIArcHelpers; use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace}; use glue::GeckoDeclarationBlock; use libc::uintptr_t;