servo: Merge #17818 - stylo: Various ComputedValues fixes (from Manishearth:stylo-fixup); r=heycam
authorManish Goregaokar <manishearth@gmail.com>
Fri, 21 Jul 2017 11:05:13 -0700
changeset 418950 d8ce629418ee90a1555ddfeb7fdb6a12f20ee266
parent 418949 df26ae1f7cbf95159b04ca68097029d56303d57e
child 418951 4f36bfc961bee3229588416cbe4c82bb83c02f9b
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17818 - stylo: Various ComputedValues fixes (from Manishearth:stylo-fixup); r=heycam r=heycam https://bugzilla.mozilla.org/show_bug.cgi?id=1382017 Source-Repo: https://github.com/servo/servo Source-Revision: 992c647f76552ae3abaeffc69331375a69d34dab
servo/components/servo_arc/lib.rs
servo/components/style/gecko/arc_types.rs
servo/components/style/gecko/generated/bindings.rs
servo/components/style/gecko/generated/structs_debug.rs
servo/components/style/gecko/generated/structs_release.rs
servo/components/style/gecko/restyle_damage.rs
servo/components/style/properties/gecko.mako.rs
servo/ports/geckolib/glue.rs
--- a/servo/components/servo_arc/lib.rs
+++ b/servo/components/servo_arc/lib.rs
@@ -884,16 +884,22 @@ impl<'a, T> Clone for ArcBorrow<'a, T> {
 impl<'a, T> ArcBorrow<'a, T> {
     pub fn clone_arc(&self) -> Arc<T> {
         let arc = unsafe { Arc::from_raw(self.0) };
         // addref it!
         mem::forget(arc.clone());
         arc
     }
 
+    /// For constructing from a reference known to be Arc-backed,
+    /// e.g. if we obtain such a reference over FFI
+    pub unsafe fn from_ref(r: &'a T) -> Self {
+        ArcBorrow(r)
+    }
+
     pub fn with_arc<F, U>(&self, f: F) -> U where F: FnOnce(&Arc<T>) -> U, T: 'static {
         // Synthesize transient Arc, which never touches the refcount.
         let transient = unsafe { NoDrop::new(Arc::from_raw(self.0)) };
 
         // Expose the transient Arc to the callback, which may clone it if it wants.
         let result = f(&transient);
 
         // Forget the transient Arc to leave the refcount untouched.
--- a/servo/components/style/gecko/arc_types.rs
+++ b/servo/components/style/gecko/arc_types.rs
@@ -8,23 +8,24 @@
 
 #![allow(non_snake_case, missing_docs)]
 
 use gecko_bindings::bindings::{RawServoImportRule, RawServoSupportsRule};
 use gecko_bindings::bindings::{RawServoKeyframe, RawServoKeyframesRule};
 use gecko_bindings::bindings::{RawServoMediaRule, RawServoNamespaceRule, RawServoPageRule};
 use gecko_bindings::bindings::{RawServoRuleNode, RawServoRuleNodeStrong, RawServoDocumentRule};
 use gecko_bindings::bindings::ServoCssRules;
-use gecko_bindings::structs::{RawServoAnimationValue, RawServoDeclarationBlock, RawServoStyleRule, RawServoMediaList};
-use gecko_bindings::structs::{RawServoStyleSheetContents, ServoStyleContext};
-use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI};
+use gecko_bindings::structs::{RawServoAnimationValue, RawServoDeclarationBlock, RawServoStyleRule};
+use gecko_bindings::structs::{RawServoMediaList, RawServoStyleSheetContents};
+use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI, Strong};
 use media_queries::MediaList;
 use properties::{ComputedValues, PropertyDeclarationBlock};
 use properties::animated_properties::AnimationValue;
 use rule_tree::StrongRuleNode;
+use servo_arc::{Arc, ArcBorrow};
 use shared_lock::Locked;
 use std::{mem, ptr};
 use stylesheets::{CssRules, StylesheetContents, StyleRule, ImportRule, KeyframesRule, MediaRule};
 use stylesheets::{NamespaceRule, PageRule, SupportsRule, DocumentRule};
 use stylesheets::keyframes_rule::Keyframe;
 
 macro_rules! impl_arc_ffi {
     ($servo_type:ty => $gecko_type:ty [$addref:ident, $release:ident]) => {
@@ -46,19 +47,16 @@ macro_rules! impl_arc_ffi {
 }
 
 impl_arc_ffi!(Locked<CssRules> => ServoCssRules
               [Servo_CssRules_AddRef, Servo_CssRules_Release]);
 
 impl_arc_ffi!(StylesheetContents => RawServoStyleSheetContents
               [Servo_StyleSheetContents_AddRef, Servo_StyleSheetContents_Release]);
 
-impl_arc_ffi!(ComputedValues => ServoStyleContext
-              [Servo_StyleContext_AddRef, Servo_StyleContext_Release]);
-
 impl_arc_ffi!(Locked<PropertyDeclarationBlock> => RawServoDeclarationBlock
               [Servo_DeclarationBlock_AddRef, Servo_DeclarationBlock_Release]);
 
 impl_arc_ffi!(Locked<StyleRule> => RawServoStyleRule
               [Servo_StyleRule_AddRef, Servo_StyleRule_Release]);
 
 impl_arc_ffi!(Locked<ImportRule> => RawServoImportRule
               [Servo_ImportRule_AddRef, Servo_ImportRule_Release]);
@@ -109,8 +107,33 @@ pub unsafe extern "C" fn Servo_RuleNode_
     mem::forget(StrongRuleNode::from_ffi(&obj).clone());
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn Servo_RuleNode_Release(obj: &RawServoRuleNode) {
     let ptr = StrongRuleNode::from_ffi(&obj);
     ptr::read(ptr as *const StrongRuleNode);
 }
+
+// ServoStyleContext 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<ServoStyleContext> from
+// an &ServoStyleContext, which in general is not allowed. So we
+// implement the restricted set of arc type functionality we need.
+
+#[no_mangle]
+pub unsafe extern "C" fn Servo_StyleContext_AddRef(obj: &ComputedValues) {
+    mem::forget(ArcBorrow::from_ref(obj).clone_arc());
+}
+
+#[no_mangle]
+pub unsafe extern "C" fn Servo_StyleContext_Release(obj: &ComputedValues) {
+    ArcBorrow::from_ref(obj).with_arc(|a: &Arc<ComputedValues>| {
+        let _: Arc<ComputedValues> = ptr::read(a);
+    });
+}
+
+
+impl From<Arc<ComputedValues>> for Strong<ComputedValues> {
+    fn from(arc: Arc<ComputedValues>) -> Self {
+        unsafe { mem::transmute(Arc::into_raw_offset(arc)) }
+    }
+}
--- a/servo/components/style/gecko/generated/bindings.rs
+++ b/servo/components/style/gecko/generated/bindings.rs
@@ -1,19 +1,18 @@
 /* automatically generated by rust-bindgen */
 
 pub use nsstring::{nsACString, nsAString, nsString, nsStringRepr};
 use gecko_bindings::structs::nsStyleTransformMatrix;
 use gecko_bindings::structs::nsTArray;
 type nsACString_internal = nsACString;
 type nsAString_internal = nsAString;
-pub type ServoStyleContextBorrowed<'a> = &'a ServoStyleContext;
+pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues;
 pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>;
-pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
-pub type ServoComputedValuesBorrowedOrNull<'a> = Option<&'a ServoComputedValues>;
+pub type ServoComputedDataBorrowed<'a> = &'a ServoComputedData;
 use gecko_bindings::structs::mozilla::css::GridTemplateAreasValue;
 use gecko_bindings::structs::mozilla::css::ErrorReporter;
 use gecko_bindings::structs::mozilla::css::ImageValue;
 use gecko_bindings::structs::mozilla::css::URLValue;
 use gecko_bindings::structs::mozilla::css::URLValueData;
 use gecko_bindings::structs::mozilla::MallocSizeOf;
 use gecko_bindings::structs::mozilla::Side;
 use gecko_bindings::structs::nsIContent;
@@ -216,17 +215,17 @@ unsafe impl Send for nsStyleXUL {}
 unsafe impl Sync for nsStyleXUL {}
 use gecko_bindings::structs::nsTimingFunction;
 use gecko_bindings::structs::nscolor;
 use gecko_bindings::structs::nscoord;
 use gecko_bindings::structs::nsresult;
 use gecko_bindings::structs::Loader;
 use gecko_bindings::structs::LoaderReusableStyleSheets;
 use gecko_bindings::structs::ServoStyleSheet;
-use gecko_bindings::structs::ServoComputedValues;
+use gecko_bindings::structs::ServoComputedData;
 use gecko_bindings::structs::ServoStyleContext;
 use gecko_bindings::structs::ServoStyleContextStrong;
 use gecko_bindings::structs::EffectCompositor_CascadeLevel;
 use gecko_bindings::structs::UpdateAnimationsTasks;
 use gecko_bindings::structs::ParsingMode;
 use gecko_bindings::structs::InheritTarget;
 use gecko_bindings::structs::URLMatchingFunction;
 use gecko_bindings::structs::StyleRuleInclusion;
@@ -531,17 +530,17 @@ extern "C" {
                                                  *mut nsTArray<*mut nsIContent>);
 }
 extern "C" {
     pub fn Gecko_ServoStyleContext_Init(context: *mut ServoStyleContext,
                                         parent_context:
                                             ServoStyleContextBorrowedOrNull,
                                         pres_context:
                                             RawGeckoPresContextBorrowed,
-                                        values: ServoComputedValuesBorrowed,
+                                        values: ServoComputedDataBorrowed,
                                         pseudo_type: CSSPseudoElementType,
                                         pseudo_tag: *mut nsIAtom);
 }
 extern "C" {
     pub fn Gecko_ServoStyleContext_Destroy(context: *mut ServoStyleContext);
 }
 extern "C" {
     pub fn Gecko_ConstructStyleChildrenIterator(aElement:
@@ -1042,18 +1041,18 @@ extern "C" {
                                  aPseudoTagOrNull: *mut nsIAtom)
      -> *mut nsStyleContext;
 }
 extern "C" {
     pub fn Gecko_GetImplementedPseudo(element: RawGeckoElementBorrowed)
      -> CSSPseudoElementType;
 }
 extern "C" {
-    pub fn Gecko_CalcStyleDifference(old_style: *const ServoStyleContext,
-                                     new_style: *const ServoStyleContext,
+    pub fn Gecko_CalcStyleDifference(old_style: ServoStyleContextBorrowed,
+                                     new_style: ServoStyleContextBorrowed,
                                      old_style_bits: u64,
                                      any_style_changed: *mut bool)
      -> nsChangeHint;
 }
 extern "C" {
     pub fn Gecko_HintsHandledForDescendants(aHint: nsChangeHint)
      -> nsChangeHint;
 }
@@ -1980,20 +1979,20 @@ extern "C" {
                                                      RawServoStyleSetBorrowed,
                                                  parent_style:
                                                      ServoStyleContextBorrowedOrNull,
                                                  declarations:
                                                      RawServoDeclarationBlockBorrowed)
      -> ServoStyleContextStrong;
 }
 extern "C" {
-    pub fn Servo_StyleContext_AddRef(ctx: &ServoStyleContext);
-}
-extern "C" {
-    pub fn Servo_StyleContext_Release(ctx: &ServoStyleContext);
+    pub fn Servo_StyleContext_AddRef(ctx: ServoStyleContextBorrowed);
+}
+extern "C" {
+    pub fn Servo_StyleContext_Release(ctx: ServoStyleContextBorrowed);
 }
 extern "C" {
     pub fn Servo_StyleSet_MightHaveAttributeDependency(set:
                                                            RawServoStyleSetBorrowed,
                                                        element:
                                                            RawGeckoElementBorrowed,
                                                        local_name:
                                                            *mut nsIAtom)
@@ -2317,17 +2316,17 @@ extern "C" {
     pub fn Servo_ComputedValues_ExtractAnimationValue(computed_values:
                                                           ServoStyleContextBorrowed,
                                                       property:
                                                           nsCSSPropertyID)
      -> RawServoAnimationValueStrong;
 }
 extern "C" {
     pub fn Servo_ComputedValues_SpecifiesAnimationsOrTransitions(computed_values:
-                                                                     ServoComputedValuesBorrowed)
+                                                                     ServoStyleContextBorrowed)
      -> bool;
 }
 extern "C" {
     pub fn Servo_Property_IsAnimatable(property: nsCSSPropertyID) -> bool;
 }
 extern "C" {
     pub fn Servo_Property_IsTransitionable(property: nsCSSPropertyID) -> bool;
 }
@@ -2700,29 +2699,29 @@ extern "C" {
                                         pseudo_tag: *mut nsIAtom,
                                         parent_style:
                                             ServoStyleContextBorrowedOrNull,
                                         target: InheritTarget)
      -> ServoStyleContextStrong;
 }
 extern "C" {
     pub fn Servo_ComputedValues_GetStyleBits(values:
-                                                 ServoComputedValuesBorrowed)
+                                                 ServoStyleContextBorrowed)
      -> u64;
 }
 extern "C" {
     pub fn Servo_ComputedValues_EqualCustomProperties(first:
-                                                          ServoComputedValuesBorrowed,
+                                                          ServoComputedDataBorrowed,
                                                       second:
-                                                          ServoComputedValuesBorrowed)
+                                                          ServoComputedDataBorrowed)
      -> bool;
 }
 extern "C" {
     pub fn Servo_ComputedValues_GetStyleRuleList(values:
-                                                     ServoComputedValuesBorrowed,
+                                                     ServoStyleContextBorrowed,
                                                  rules:
                                                      RawGeckoServoStyleRuleListBorrowedMut);
 }
 extern "C" {
     pub fn Servo_Initialize(dummy_url_data: *mut RawGeckoURLExtraData);
 }
 extern "C" {
     pub fn Servo_Shutdown();
@@ -2799,27 +2798,27 @@ extern "C" {
 }
 extern "C" {
     pub fn Servo_SerializeFontValueForCanvas(declarations:
                                                  RawServoDeclarationBlockBorrowed,
                                              buffer: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_GetCustomPropertyValue(computed_values:
-                                            ServoComputedValuesBorrowed,
+                                            ServoStyleContextBorrowed,
                                         name: *const nsAString,
                                         value: *mut nsAString) -> bool;
 }
 extern "C" {
     pub fn Servo_GetCustomPropertiesCount(computed_values:
-                                              ServoComputedValuesBorrowed)
+                                              ServoStyleContextBorrowed)
      -> u32;
 }
 extern "C" {
-    pub fn Servo_GetCustomPropertyNameAt(arg1: ServoComputedValuesBorrowed,
+    pub fn Servo_GetCustomPropertyNameAt(arg1: ServoStyleContextBorrowed,
                                          index: u32, name: *mut nsAString)
      -> bool;
 }
 extern "C" {
     pub fn Servo_GetEmptyVariables() -> *const nsStyleVariables;
 }
 extern "C" {
     pub fn Gecko_CreateCSSErrorReporter(sheet: *mut ServoStyleSheet,
--- a/servo/components/style/gecko/generated/structs_debug.rs
+++ b/servo/components/style/gecko/generated/structs_debug.rs
@@ -6,22 +6,22 @@ pub use self::root::mozilla::css::*;
 pub use self::root::mozilla::dom::*;
 use atomic_refcell::AtomicRefCell;
 use data::ElementData;
 pub type ServoUnsafeCell<T> = ::std::cell::UnsafeCell<T>;
 pub type ServoCell<T> = ::std::cell::Cell<T>;
 pub type ServoNodeData = AtomicRefCell<ElementData>;
 pub type ServoWritingMode = ::logical_geometry::WritingMode;
 pub type ServoFontComputationData = ::properties::FontComputationData;
-pub type ServoCustomPropertiesMap = Option<::stylearc::Arc<::custom_properties::CustomPropertiesMap>>;
+pub type ServoCustomPropertiesMap = Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>;
 pub type ServoRuleNode = Option<::rule_tree::StrongRuleNode>;
-pub type ServoVisitedStyle = Option<::stylearc::RawOffsetArc<::properties::ComputedValues>>;
+pub type ServoVisitedStyle = Option<::servo_arc::RawOffsetArc<::properties::ComputedValues>>;
 pub type ServoComputedValueFlags = ::properties::computed_value_flags::ComputedValueFlags;
-pub type ServoRawOffsetArc<T> = ::stylearc::RawOffsetArc<T>;
-pub type ServoStyleContextStrong = ::gecko_bindings::sugar::ownership::Strong<ServoStyleContext>;
+pub type ServoRawOffsetArc<T> = ::servo_arc::RawOffsetArc<T>;
+pub type ServoStyleContextStrong = ::gecko_bindings::sugar::ownership::Strong<::properties::ComputedValues>;
 
 #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
 pub mod root {
     #[repr(C)]
     pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
     impl <T> __BindgenUnionField<T> {
         #[inline]
         pub fn new() -> Self {
@@ -7585,17 +7585,17 @@ pub mod root {
             XXLarge = 7,
             XXXLarge = 8,
         }
         #[repr(C)]
         #[derive(Debug)]
         pub struct ServoStyleContext {
             pub _base: root::nsStyleContext,
             pub mPresContext: *mut root::nsPresContext,
-            pub mSource: root::ServoComputedValues,
+            pub mSource: root::ServoComputedData,
         }
         #[test]
         fn bindgen_test_layout_ServoStyleContext() {
             assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 264usize ,
                        concat ! (
                        "Size of: " , stringify ! ( ServoStyleContext ) ));
             assert_eq! (::std::mem::align_of::<ServoStyleContext>() , 8usize ,
                         concat ! (
@@ -20988,17 +20988,17 @@ pub mod root {
     /**
  * We want C++ to be abe to read the style struct fields of ComputedValues
  * so we define this type on the C++ side and use the bindgenned version
  * on the Rust side.
  *
  */
     #[repr(C)]
     #[derive(Debug)]
-    pub struct ServoComputedValues {
+    pub struct ServoComputedData {
         pub Font: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoFont>,
         pub Color: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoColor>,
         pub List: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoList>,
         pub Text: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoText>,
         pub Visibility: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoVisibility>,
         pub UserInterface: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoUserInterface>,
         pub TableBorder: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoTableBorder>,
         pub SVG: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoSVG>,
@@ -21026,197 +21026,197 @@ pub mod root {
         pub rules: ::gecko_bindings::structs::ServoRuleNode,
         /// The element's computed values if visited, only computed if there's a
   /// relevant link for this element. A element's "relevant link" is the
   /// element being matched if it is a link or the nearest ancestor link.
         pub visited_style: ::gecko_bindings::structs::ServoVisitedStyle,
         pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData,
     }
     #[test]
-    fn bindgen_test_layout_ServoComputedValues() {
-        assert_eq!(::std::mem::size_of::<ServoComputedValues>() , 224usize ,
-                   concat ! (
-                   "Size of: " , stringify ! ( ServoComputedValues ) ));
-        assert_eq! (::std::mem::align_of::<ServoComputedValues>() , 8usize ,
-                    concat ! (
-                    "Alignment of " , stringify ! ( ServoComputedValues ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Font as *
-                    const _ as usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+    fn bindgen_test_layout_ServoComputedData() {
+        assert_eq!(::std::mem::size_of::<ServoComputedData>() , 224usize ,
+                   concat ! (
+                   "Size of: " , stringify ! ( ServoComputedData ) ));
+        assert_eq! (::std::mem::align_of::<ServoComputedData>() , 8usize ,
+                    concat ! (
+                    "Alignment of " , stringify ! ( ServoComputedData ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const ServoComputedData ) ) . Font as *
+                    const _ as usize } , 0usize , concat ! (
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Font ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Color as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Color as *
                     const _ as usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Color ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . List as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . List as *
                     const _ as usize } , 16usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( List ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Text as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Text as *
                     const _ as usize } , 24usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Text ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Visibility
+                    & ( * ( 0 as * const ServoComputedData ) ) . Visibility
                     as * const _ as usize } , 32usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Visibility ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     UserInterface as * const _ as usize } , 40usize , concat !
                     (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( UserInterface ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . TableBorder
+                    & ( * ( 0 as * const ServoComputedData ) ) . TableBorder
                     as * const _ as usize } , 48usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( TableBorder ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . SVG as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . SVG as *
                     const _ as usize } , 56usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( SVG ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Background
+                    & ( * ( 0 as * const ServoComputedData ) ) . Background
                     as * const _ as usize } , 64usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Background ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Position as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Position as
                     * const _ as usize } , 72usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Position ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . TextReset
+                    & ( * ( 0 as * const ServoComputedData ) ) . TextReset
                     as * const _ as usize } , 80usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( TextReset ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Display as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Display as
                     * const _ as usize } , 88usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Display ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Content as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Content as
                     * const _ as usize } , 96usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Content ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . UIReset as
+                    & ( * ( 0 as * const ServoComputedData ) ) . UIReset as
                     * const _ as usize } , 104usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( UIReset ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Table as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Table as *
                     const _ as usize } , 112usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Table ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Margin as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Margin as *
                     const _ as usize } , 120usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Margin ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Padding as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Padding as
                     * const _ as usize } , 128usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Padding ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Border as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Border as *
                     const _ as usize } , 136usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Border ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Outline as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Outline as
                     * const _ as usize } , 144usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Outline ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . XUL as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . XUL as *
                     const _ as usize } , 152usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( XUL ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . SVGReset as
+                    & ( * ( 0 as * const ServoComputedData ) ) . SVGReset as
                     * const _ as usize } , 160usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( SVGReset ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Column as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Column as *
                     const _ as usize } , 168usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Column ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Effects as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Effects as
                     * const _ as usize } , 176usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Effects ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     custom_properties as * const _ as usize } , 184usize ,
                     concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( custom_properties ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     writing_mode as * const _ as usize } , 192usize , concat !
                     (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( writing_mode ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . flags as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . flags as *
                     const _ as usize } , 193usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( flags ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . rules as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . rules as *
                     const _ as usize } , 200usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( rules ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     visited_style as * const _ as usize } , 208usize , concat
                     ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( visited_style ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     font_computation_data as * const _ as usize } , 216usize ,
                     concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( font_computation_data ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy)]
-    pub struct ServoComputedValuesForgotten {
-        pub mPtr: *const root::ServoComputedValues,
-    }
-    #[test]
-    fn bindgen_test_layout_ServoComputedValuesForgotten() {
-        assert_eq!(::std::mem::size_of::<ServoComputedValuesForgotten>() ,
-                   8usize , concat ! (
-                   "Size of: " , stringify ! ( ServoComputedValuesForgotten )
-                   ));
-        assert_eq! (::std::mem::align_of::<ServoComputedValuesForgotten>() ,
+    pub struct ServoComputedDataForgotten {
+        pub mPtr: *const root::ServoComputedData,
+    }
+    #[test]
+    fn bindgen_test_layout_ServoComputedDataForgotten() {
+        assert_eq!(::std::mem::size_of::<ServoComputedDataForgotten>() ,
+                   8usize , concat ! (
+                   "Size of: " , stringify ! ( ServoComputedDataForgotten )
+                   ));
+        assert_eq! (::std::mem::align_of::<ServoComputedDataForgotten>() ,
                     8usize , concat ! (
                     "Alignment of " , stringify ! (
-                    ServoComputedValuesForgotten ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValuesForgotten ) ) .
+                    ServoComputedDataForgotten ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const ServoComputedDataForgotten ) ) .
                     mPtr as * const _ as usize } , 0usize , concat ! (
                     "Alignment of field: " , stringify ! (
-                    ServoComputedValuesForgotten ) , "::" , stringify ! ( mPtr
+                    ServoComputedDataForgotten ) , "::" , stringify ! ( mPtr
                     ) ));
     }
-    impl Clone for ServoComputedValuesForgotten {
+    impl Clone for ServoComputedDataForgotten {
         fn clone(&self) -> Self { *self }
     }
     #[repr(u32)]
     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     pub enum WeakMapTraceKind {
         DoNotTraceWeakMaps = 0,
         ExpandWeakMaps = 1,
         TraceWeakMapValues = 2,
@@ -38450,19 +38450,17 @@ pub mod root {
     pub type RawGeckoStyleChildrenIterator =
         root::mozilla::dom::StyleChildrenIterator;
     pub type RawServoDeclarationBlockBorrowed =
         *const root::RawServoDeclarationBlock;
     pub type ServoStyleContextBorrowed =
         *const root::mozilla::ServoStyleContext;
     pub type ServoStyleContextBorrowedOrNull =
         *const root::mozilla::ServoStyleContext;
-    pub type ServoComputedValuesBorrowed = *const root::ServoComputedValues;
-    pub type ServoComputedValuesBorrowedOrNull =
-        *const root::ServoComputedValues;
+    pub type ServoComputedDataBorrowed = *const root::ServoComputedData;
     pub type RawServoAnimationValueMapBorrowedMut =
         *mut root::RawServoAnimationValueMap;
     pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;
     pub type RawGeckoNodeBorrowedOrNull = *const root::RawGeckoNode;
     pub type RawGeckoElementBorrowed = *const root::RawGeckoElement;
     pub type RawGeckoElementBorrowedOrNull = *const root::RawGeckoElement;
     pub type RawGeckoDocumentBorrowed = *const root::RawGeckoDocument;
     pub type RawGeckoDocumentBorrowedOrNull = *const root::RawGeckoDocument;
--- a/servo/components/style/gecko/generated/structs_release.rs
+++ b/servo/components/style/gecko/generated/structs_release.rs
@@ -6,22 +6,22 @@ pub use self::root::mozilla::css::*;
 pub use self::root::mozilla::dom::*;
 use atomic_refcell::AtomicRefCell;
 use data::ElementData;
 pub type ServoUnsafeCell<T> = ::std::cell::UnsafeCell<T>;
 pub type ServoCell<T> = ::std::cell::Cell<T>;
 pub type ServoNodeData = AtomicRefCell<ElementData>;
 pub type ServoWritingMode = ::logical_geometry::WritingMode;
 pub type ServoFontComputationData = ::properties::FontComputationData;
-pub type ServoCustomPropertiesMap = Option<::stylearc::Arc<::custom_properties::CustomPropertiesMap>>;
+pub type ServoCustomPropertiesMap = Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>;
 pub type ServoRuleNode = Option<::rule_tree::StrongRuleNode>;
-pub type ServoVisitedStyle = Option<::stylearc::RawOffsetArc<::properties::ComputedValues>>;
+pub type ServoVisitedStyle = Option<::servo_arc::RawOffsetArc<::properties::ComputedValues>>;
 pub type ServoComputedValueFlags = ::properties::computed_value_flags::ComputedValueFlags;
-pub type ServoRawOffsetArc<T> = ::stylearc::RawOffsetArc<T>;
-pub type ServoStyleContextStrong = ::gecko_bindings::sugar::ownership::Strong<ServoStyleContext>;
+pub type ServoRawOffsetArc<T> = ::servo_arc::RawOffsetArc<T>;
+pub type ServoStyleContextStrong = ::gecko_bindings::sugar::ownership::Strong<::properties::ComputedValues>;
 
 #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
 pub mod root {
     #[repr(C)]
     pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
     impl <T> __BindgenUnionField<T> {
         #[inline]
         pub fn new() -> Self {
@@ -7433,17 +7433,17 @@ pub mod root {
             XXLarge = 7,
             XXXLarge = 8,
         }
         #[repr(C)]
         #[derive(Debug)]
         pub struct ServoStyleContext {
             pub _base: root::nsStyleContext,
             pub mPresContext: *mut root::nsPresContext,
-            pub mSource: root::ServoComputedValues,
+            pub mSource: root::ServoComputedData,
         }
         #[test]
         fn bindgen_test_layout_ServoStyleContext() {
             assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 264usize ,
                        concat ! (
                        "Size of: " , stringify ! ( ServoStyleContext ) ));
             assert_eq! (::std::mem::align_of::<ServoStyleContext>() , 8usize ,
                         concat ! (
@@ -20604,17 +20604,17 @@ pub mod root {
     /**
  * We want C++ to be abe to read the style struct fields of ComputedValues
  * so we define this type on the C++ side and use the bindgenned version
  * on the Rust side.
  *
  */
     #[repr(C)]
     #[derive(Debug)]
-    pub struct ServoComputedValues {
+    pub struct ServoComputedData {
         pub Font: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoFont>,
         pub Color: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoColor>,
         pub List: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoList>,
         pub Text: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoText>,
         pub Visibility: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoVisibility>,
         pub UserInterface: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoUserInterface>,
         pub TableBorder: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoTableBorder>,
         pub SVG: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoSVG>,
@@ -20642,197 +20642,197 @@ pub mod root {
         pub rules: ::gecko_bindings::structs::ServoRuleNode,
         /// The element's computed values if visited, only computed if there's a
   /// relevant link for this element. A element's "relevant link" is the
   /// element being matched if it is a link or the nearest ancestor link.
         pub visited_style: ::gecko_bindings::structs::ServoVisitedStyle,
         pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData,
     }
     #[test]
-    fn bindgen_test_layout_ServoComputedValues() {
-        assert_eq!(::std::mem::size_of::<ServoComputedValues>() , 224usize ,
-                   concat ! (
-                   "Size of: " , stringify ! ( ServoComputedValues ) ));
-        assert_eq! (::std::mem::align_of::<ServoComputedValues>() , 8usize ,
-                    concat ! (
-                    "Alignment of " , stringify ! ( ServoComputedValues ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Font as *
-                    const _ as usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+    fn bindgen_test_layout_ServoComputedData() {
+        assert_eq!(::std::mem::size_of::<ServoComputedData>() , 224usize ,
+                   concat ! (
+                   "Size of: " , stringify ! ( ServoComputedData ) ));
+        assert_eq! (::std::mem::align_of::<ServoComputedData>() , 8usize ,
+                    concat ! (
+                    "Alignment of " , stringify ! ( ServoComputedData ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const ServoComputedData ) ) . Font as *
+                    const _ as usize } , 0usize , concat ! (
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Font ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Color as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Color as *
                     const _ as usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Color ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . List as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . List as *
                     const _ as usize } , 16usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( List ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Text as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Text as *
                     const _ as usize } , 24usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Text ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Visibility
+                    & ( * ( 0 as * const ServoComputedData ) ) . Visibility
                     as * const _ as usize } , 32usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Visibility ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     UserInterface as * const _ as usize } , 40usize , concat !
                     (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( UserInterface ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . TableBorder
+                    & ( * ( 0 as * const ServoComputedData ) ) . TableBorder
                     as * const _ as usize } , 48usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( TableBorder ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . SVG as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . SVG as *
                     const _ as usize } , 56usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( SVG ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Background
+                    & ( * ( 0 as * const ServoComputedData ) ) . Background
                     as * const _ as usize } , 64usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Background ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Position as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Position as
                     * const _ as usize } , 72usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Position ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . TextReset
+                    & ( * ( 0 as * const ServoComputedData ) ) . TextReset
                     as * const _ as usize } , 80usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( TextReset ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Display as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Display as
                     * const _ as usize } , 88usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Display ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Content as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Content as
                     * const _ as usize } , 96usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Content ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . UIReset as
+                    & ( * ( 0 as * const ServoComputedData ) ) . UIReset as
                     * const _ as usize } , 104usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( UIReset ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Table as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Table as *
                     const _ as usize } , 112usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Table ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Margin as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Margin as *
                     const _ as usize } , 120usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Margin ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Padding as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Padding as
                     * const _ as usize } , 128usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Padding ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Border as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Border as *
                     const _ as usize } , 136usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Border ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Outline as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Outline as
                     * const _ as usize } , 144usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Outline ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . XUL as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . XUL as *
                     const _ as usize } , 152usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( XUL ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . SVGReset as
+                    & ( * ( 0 as * const ServoComputedData ) ) . SVGReset as
                     * const _ as usize } , 160usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( SVGReset ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Column as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . Column as *
                     const _ as usize } , 168usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Column ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . Effects as
+                    & ( * ( 0 as * const ServoComputedData ) ) . Effects as
                     * const _ as usize } , 176usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( Effects ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     custom_properties as * const _ as usize } , 184usize ,
                     concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( custom_properties ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     writing_mode as * const _ as usize } , 192usize , concat !
                     (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( writing_mode ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . flags as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . flags as *
                     const _ as usize } , 193usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( flags ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) . rules as *
+                    & ( * ( 0 as * const ServoComputedData ) ) . rules as *
                     const _ as usize } , 200usize , concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( rules ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     visited_style as * const _ as usize } , 208usize , concat
                     ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( visited_style ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValues ) ) .
+                    & ( * ( 0 as * const ServoComputedData ) ) .
                     font_computation_data as * const _ as usize } , 216usize ,
                     concat ! (
-                    "Alignment of field: " , stringify ! ( ServoComputedValues
+                    "Alignment of field: " , stringify ! ( ServoComputedData
                     ) , "::" , stringify ! ( font_computation_data ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy)]
-    pub struct ServoComputedValuesForgotten {
-        pub mPtr: *const root::ServoComputedValues,
-    }
-    #[test]
-    fn bindgen_test_layout_ServoComputedValuesForgotten() {
-        assert_eq!(::std::mem::size_of::<ServoComputedValuesForgotten>() ,
-                   8usize , concat ! (
-                   "Size of: " , stringify ! ( ServoComputedValuesForgotten )
-                   ));
-        assert_eq! (::std::mem::align_of::<ServoComputedValuesForgotten>() ,
+    pub struct ServoComputedDataForgotten {
+        pub mPtr: *const root::ServoComputedData,
+    }
+    #[test]
+    fn bindgen_test_layout_ServoComputedDataForgotten() {
+        assert_eq!(::std::mem::size_of::<ServoComputedDataForgotten>() ,
+                   8usize , concat ! (
+                   "Size of: " , stringify ! ( ServoComputedDataForgotten )
+                   ));
+        assert_eq! (::std::mem::align_of::<ServoComputedDataForgotten>() ,
                     8usize , concat ! (
                     "Alignment of " , stringify ! (
-                    ServoComputedValuesForgotten ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const ServoComputedValuesForgotten ) ) .
+                    ServoComputedDataForgotten ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const ServoComputedDataForgotten ) ) .
                     mPtr as * const _ as usize } , 0usize , concat ! (
                     "Alignment of field: " , stringify ! (
-                    ServoComputedValuesForgotten ) , "::" , stringify ! ( mPtr
+                    ServoComputedDataForgotten ) , "::" , stringify ! ( mPtr
                     ) ));
     }
-    impl Clone for ServoComputedValuesForgotten {
+    impl Clone for ServoComputedDataForgotten {
         fn clone(&self) -> Self { *self }
     }
     #[repr(u32)]
     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     pub enum WeakMapTraceKind {
         DoNotTraceWeakMaps = 0,
         ExpandWeakMaps = 1,
         TraceWeakMapValues = 2,
@@ -37759,19 +37759,17 @@ pub mod root {
     pub type RawGeckoStyleChildrenIterator =
         root::mozilla::dom::StyleChildrenIterator;
     pub type RawServoDeclarationBlockBorrowed =
         *const root::RawServoDeclarationBlock;
     pub type ServoStyleContextBorrowed =
         *const root::mozilla::ServoStyleContext;
     pub type ServoStyleContextBorrowedOrNull =
         *const root::mozilla::ServoStyleContext;
-    pub type ServoComputedValuesBorrowed = *const root::ServoComputedValues;
-    pub type ServoComputedValuesBorrowedOrNull =
-        *const root::ServoComputedValues;
+    pub type ServoComputedDataBorrowed = *const root::ServoComputedData;
     pub type RawServoAnimationValueMapBorrowedMut =
         *mut root::RawServoAnimationValueMap;
     pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;
     pub type RawGeckoNodeBorrowedOrNull = *const root::RawGeckoNode;
     pub type RawGeckoElementBorrowed = *const root::RawGeckoElement;
     pub type RawGeckoElementBorrowedOrNull = *const root::RawGeckoElement;
     pub type RawGeckoDocumentBorrowed = *const root::RawGeckoDocument;
     pub type RawGeckoDocumentBorrowedOrNull = *const root::RawGeckoDocument;
--- a/servo/components/style/gecko/restyle_damage.rs
+++ b/servo/components/style/gecko/restyle_damage.rs
@@ -48,18 +48,18 @@ impl GeckoRestyleDamage {
     /// accessed from layout.
     pub fn compute_style_difference(
         source: &nsStyleContext,
         old_style: &ComputedValues,
         new_style: &Arc<ComputedValues>,
     ) -> StyleDifference {
         let mut any_style_changed: bool = false;
         let hint = unsafe {
-            bindings::Gecko_CalcStyleDifference(old_style.as_style_context(),
-                                                new_style.as_style_context(),
+            bindings::Gecko_CalcStyleDifference(old_style,
+                                                new_style,
                                                 source.mBits,
                                                 &mut any_style_changed)
         };
         let change = if any_style_changed { StyleChange::Changed } else { StyleChange::Unchanged };
         StyleDifference::new(GeckoRestyleDamage(hint), change)
     }
 
     /// Returns true if this restyle damage contains all the damage of |other|.
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -34,17 +34,16 @@ use gecko_bindings::bindings::Gecko_SetC
 use gecko_bindings::bindings::Gecko_SetCursorImageValue;
 use gecko_bindings::bindings::Gecko_StyleTransition_SetUnsupportedProperty;
 use gecko_bindings::bindings::Gecko_NewCSSShadowArray;
 use gecko_bindings::bindings::Gecko_nsStyleFont_SetLang;
 use gecko_bindings::bindings::Gecko_nsStyleFont_CopyLangFrom;
 use gecko_bindings::bindings::Gecko_SetListStyleImageNone;
 use gecko_bindings::bindings::Gecko_SetListStyleImageImageValue;
 use gecko_bindings::bindings::Gecko_SetNullImageValue;
-use gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
 use gecko_bindings::bindings::{Gecko_ResetFilters, Gecko_CopyFiltersFrom};
 use gecko_bindings::bindings::RawGeckoPresContextBorrowed;
 use gecko_bindings::structs;
 use gecko_bindings::structs::nsCSSPropertyID;
 use gecko_bindings::structs::nsStyleVariables;
 use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
 use gecko::values::convert_nscolor_to_rgba;
 use gecko::values::convert_rgba_to_nscolor;
@@ -69,17 +68,17 @@ use computed_values::border_style;
 
 pub mod style_structs {
     % for style_struct in data.style_structs:
     pub use super::${style_struct.gecko_struct_name} as ${style_struct.name};
     % endfor
 }
 
 /// FIXME(emilio): This is completely duplicated with the other properties code.
-pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedValues;
+pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedData;
 
 #[derive(Debug)]
 #[repr(C)]
 pub struct ComputedValues(::gecko_bindings::structs::mozilla::ServoStyleContext);
 
 impl ComputedValues {
     pub fn new(
         device: &Device,
@@ -132,20 +131,16 @@ impl ComputedValues {
         let atom = (self.0)._base.mPseudoTag.raw::<structs::nsIAtom>();
         if atom.is_null() {
             return None;
         }
 
         let atom = Atom::from(atom);
         PseudoElement::from_atom(&atom)
     }
-
-    pub fn as_style_context(&self) -> &::gecko_bindings::structs::mozilla::ServoStyleContext {
-        &self.0
-    }
 }
 
 impl Drop for ComputedValues {
     fn drop(&mut self) {
         unsafe {
             bindings::Gecko_ServoStyleContext_Destroy(&mut self.0);
         }
     }
@@ -222,17 +217,18 @@ impl ComputedValuesInner {
         self,
         pres_context: bindings::RawGeckoPresContextBorrowed,
         parent: ParentStyleContextInfo,
         pseudo_ty: structs::CSSPseudoElementType,
         pseudo_tag: *mut structs::nsIAtom
     ) -> Arc<ComputedValues> {
         let arc = unsafe {
             let arc: Arc<ComputedValues> = Arc::new(uninitialized());
-            bindings::Gecko_ServoStyleContext_Init(&arc.0 as *const _ as *mut _, parent, pres_context,
+            bindings::Gecko_ServoStyleContext_Init(&arc.0 as *const _ as *mut _,
+                                                   parent, pres_context,
                                                    &self, pseudo_ty, pseudo_tag);
             // We're simulating a move by having C++ do a memcpy and then forgetting
             // it on this end.
             forget(self);
             arc
         };
         arc
     }
@@ -4968,33 +4964,22 @@ clip-path
     ${impl_simple_copy("_moz_box_ordinal_group", "mBoxOrdinal")}
 
     #[allow(non_snake_case)]
     pub fn clone__moz_box_ordinal_group(&self) -> i32{
         self.gecko.mBoxOrdinal as i32
     }
 </%self:impl_trait>
 
-<%def name="define_ffi_struct_accessor(style_struct)">
-#[no_mangle]
-#[allow(non_snake_case, unused_variables)]
-pub unsafe extern "C" fn Servo_GetStyle${style_struct.gecko_name}(computed_values:
-        ServoComputedValuesBorrowedOrNull) -> *const ${style_struct.gecko_ffi_name} {
-    computed_values.unwrap().get_${style_struct.name_lower}().get_gecko()
-        as *const ${style_struct.gecko_ffi_name}
-}
-</%def>
-
 % for style_struct in data.style_structs:
 ${declare_style_struct(style_struct)}
 ${impl_style_struct(style_struct)}
 % if not style_struct.name in data.manual_style_structs:
 <%self:raw_impl_trait style_struct="${style_struct}"></%self:raw_impl_trait>
 % endif
-${define_ffi_struct_accessor(style_struct)}
 % endfor
 
 // This is only accessed from the Gecko main thread.
 static mut EMPTY_VARIABLES_STRUCT: Option<nsStyleVariables> = None;
 
 #[no_mangle]
 #[allow(non_snake_case)]
 pub unsafe extern "C" fn Servo_GetEmptyVariables()
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use atomic_refcell::AtomicRefMut;
 use cssparser::{Parser, ParserInput};
 use cssparser::ToCss as ParserToCss;
 use env_logger::LogBuilder;
 use selectors::Element;
 use selectors::matching::{MatchingContext, MatchingMode, matches_selector};
-use servo_arc::{Arc, RawOffsetArc};
+use servo_arc::{Arc, ArcBorrow, RawOffsetArc};
 use std::env;
 use std::fmt::Write;
 use std::ptr;
 use style::context::{CascadeInputs, QuirksMode, SharedStyleContext, StyleContext};
 use style::context::ThreadLocalStyleContext;
 use style::data::{ElementData, ElementStyles, RestyleData};
 use style::dom::{AnimationOnlyDirtyDescendants, DirtyDescendants};
 use style::dom::{ShowSubtreeData, TElement, TNode};
@@ -34,17 +34,17 @@ use style::gecko_bindings::bindings::{Ra
 use style::gecko_bindings::bindings::{RawServoImportRule, RawServoImportRuleBorrowed};
 use style::gecko_bindings::bindings::{RawServoKeyframe, RawServoKeyframeBorrowed, RawServoKeyframeStrong};
 use style::gecko_bindings::bindings::{RawServoKeyframesRule, RawServoKeyframesRuleBorrowed};
 use style::gecko_bindings::bindings::{RawServoMediaListBorrowed, RawServoMediaListStrong};
 use style::gecko_bindings::bindings::{RawServoMediaRule, RawServoMediaRuleBorrowed};
 use style::gecko_bindings::bindings::{RawServoNamespaceRule, RawServoNamespaceRuleBorrowed};
 use style::gecko_bindings::bindings::{RawServoPageRule, RawServoPageRuleBorrowed};
 use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned};
-use style::gecko_bindings::bindings::{RawServoStyleSheetContentsBorrowed, ServoComputedValuesBorrowed};
+use style::gecko_bindings::bindings::{RawServoStyleSheetContentsBorrowed, ServoComputedDataBorrowed};
 use style::gecko_bindings::bindings::{RawServoStyleSheetContentsStrong, ServoStyleContextBorrowed};
 use style::gecko_bindings::bindings::{RawServoSupportsRule, RawServoSupportsRuleBorrowed};
 use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong};
 use style::gecko_bindings::bindings::{nsACString, nsAString, nsCSSPropertyIDSetBorrowedMut};
 use style::gecko_bindings::bindings::Gecko_AddPropertyToSet;
 use style::gecko_bindings::bindings::Gecko_AppendPropertyValuePair;
 use style::gecko_bindings::bindings::Gecko_GetOrCreateFinalKeyframe;
 use style::gecko_bindings::bindings::Gecko_GetOrCreateInitialKeyframe;
@@ -661,46 +661,46 @@ pub extern "C" fn Servo_StyleSet_GetBase
                                                                  computed_values: ServoStyleContextBorrowed,
                                                                  snapshots: *const ServoElementSnapshotTable,
                                                                  pseudo_type: CSSPseudoElementType)
                                                                  -> ServoStyleContextStrong
 {
     use style::style_resolver::StyleResolverForElement;
 
     debug_assert!(!snapshots.is_null());
-    let computed_values = ComputedValues::as_arc(&computed_values);
+    let computed_values = unsafe { ArcBorrow::from_ref(computed_values) };
 
     let rules = match computed_values.rules {
-        None => return computed_values.clone().into_strong(),
+        None => return computed_values.clone_arc().into(),
         Some(ref rules) => rules,
     };
 
     let doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow();
     let without_animations =
         doc_data.stylist.rule_tree().remove_animation_rules(rules);
 
     if without_animations == *rules {
-        return computed_values.clone().into_strong();
+        return computed_values.clone_arc().into();
     }
 
     let element = GeckoElement(element);
 
     let element_data = match element.borrow_data() {
         Some(data) => data,
-        None => return computed_values.clone().into_strong(),
+        None => return computed_values.clone_arc().into(),
     };
     let styles = &element_data.styles;
 
     if let Some(pseudo) = PseudoElement::from_pseudo_type(pseudo_type) {
         // This style already doesn't have animations.
         return styles
             .pseudos
             .get(&pseudo)
             .expect("GetBaseComputedValuesForElement for an unexisting pseudo?")
-            .clone().into_strong();
+            .clone().into();
     }
 
     let global_style_data = &*GLOBAL_STYLE_DATA;
     let guard = global_style_data.shared_lock.read();
     let shared = create_shared_context(&global_style_data,
                                        &guard,
                                        &doc_data,
                                        TraversalFlags::empty(),
@@ -716,31 +716,30 @@ pub extern "C" fn Servo_StyleSet_GetBase
     let inputs =
         CascadeInputs {
             rules: Some(without_animations),
             visited_rules: None,
         };
 
     StyleResolverForElement::new(element, &mut context, RuleInclusion::All)
         .cascade_style_and_visited_with_default_parents(inputs)
-        .into_strong()
+        .into()
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_ComputedValues_ExtractAnimationValue(computed_values: ServoStyleContextBorrowed,
                                                              property_id: nsCSSPropertyID)
                                                              -> RawServoAnimationValueStrong
 {
     let property = match AnimatableLonghand::from_nscsspropertyid(property_id) {
         Some(longhand) => longhand,
         None => return Strong::null(),
     };
 
-    let computed_values = ComputedValues::as_arc(&computed_values);
-    Arc::new(AnimationValue::from_computed_values(&property, computed_values)).into_strong()
+    Arc::new(AnimationValue::from_computed_values(&property, &computed_values)).into_strong()
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_Property_IsAnimatable(property: nsCSSPropertyID) -> bool {
     use style::properties::animated_properties;
     animated_properties::nscsspropertyid_is_animatable(property)
 }
 
@@ -1521,17 +1520,17 @@ pub extern "C" fn Servo_ComputedValues_G
         cascade_flags.insert(IS_FIELDSET_CONTENT);
     }
     let metrics = get_metrics_provider_for_product();
     data.stylist.precomputed_values_for_pseudo(
         &guards,
         &pseudo,
         parent_style_or_null.map(|x| &*x),
         cascade_flags, &metrics
-    ).into_strong()
+    ).into()
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed,
                                            pseudo_type: CSSPseudoElementType,
                                            is_probe: bool,
                                            inherited_style: ServoStyleContextBorrowedOrNull,
                                            raw_data: RawServoStyleSetBorrowed)
@@ -1545,17 +1544,17 @@ pub extern "C" fn Servo_ResolvePseudoSty
            element, PseudoElement::from_pseudo_type(pseudo_type), is_probe);
 
     // FIXME(bholley): Assert against this.
     if !data.has_styles() {
         warn!("Calling Servo_ResolvePseudoStyle on unstyled element");
         return if is_probe {
             Strong::null()
         } else {
-            doc_data.default_computed_values().clone().into_strong()
+            doc_data.default_computed_values().clone().into()
         };
     }
 
     let pseudo = PseudoElement::from_pseudo_type(pseudo_type)
                     .expect("ResolvePseudoStyle with a non-pseudo?");
 
     let global_style_data = &*GLOBAL_STYLE_DATA;
     let guard = global_style_data.shared_lock.read();
@@ -1566,36 +1565,35 @@ pub extern "C" fn Servo_ResolvePseudoSty
         RuleInclusion::All,
         &data.styles,
         inherited_style,
         &*doc_data,
         is_probe,
     );
 
     match style {
-        Some(s) => s.into_strong(),
+        Some(s) => s.into(),
         None => {
             debug_assert!(is_probe);
             Strong::null()
         }
     }
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_SetExplicitStyle(element: RawGeckoElementBorrowed,
                                          style: ServoStyleContextBorrowed)
 {
     let element = GeckoElement(element);
-    let style = ComputedValues::as_arc(&style);
     debug!("Servo_SetExplicitStyle: {:?}", element);
     // We only support this API for initial styling. There's no reason it couldn't
     // work for other things, we just haven't had a reason to do so.
     debug_assert!(element.get_data().is_none());
     let mut data = unsafe { element.ensure_data() };
-    data.styles.primary = Some(style.clone_arc());
+    data.styles.primary = Some(unsafe { ArcBorrow::from_ref(style) }.clone_arc());
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_HasAuthorSpecifiedRules(element: RawGeckoElementBorrowed,
                                                 rule_type_mask: u32,
                                                 author_colors_allowed: bool)
     -> bool
 {
@@ -1725,50 +1723,50 @@ pub extern "C" fn Servo_ComputedValues_I
         StyleBuilder::for_derived_style(
             data.stylist.device(),
             data.default_computed_values(),
             /* parent_style = */ None,
             Some(&pseudo),
         ).build()
     };
 
-    style.into_strong()
+    style.into()
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_ComputedValues_GetStyleBits(values: ServoComputedValuesBorrowed) -> u64 {
+pub extern "C" fn Servo_ComputedValues_GetStyleBits(values: ServoStyleContextBorrowed) -> u64 {
     use style::properties::computed_value_flags::*;
     let flags = values.flags;
     let mut result = 0;
     if flags.contains(HAS_TEXT_DECORATION_LINES) {
         result |= structs::NS_STYLE_HAS_TEXT_DECORATION_LINES as u64;
     }
     if flags.contains(SHOULD_SUPPRESS_LINEBREAK) {
         result |= structs::NS_STYLE_SUPPRESS_LINEBREAK as u64;
     }
     result
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_ComputedValues_SpecifiesAnimationsOrTransitions(values: ServoComputedValuesBorrowed)
+pub extern "C" fn Servo_ComputedValues_SpecifiesAnimationsOrTransitions(values: ServoStyleContextBorrowed)
                                                                         -> bool {
     let b = values.get_box();
     b.specifies_animations() || b.specifies_transitions()
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_ComputedValues_EqualCustomProperties(
-    first: ServoComputedValuesBorrowed,
-    second: ServoComputedValuesBorrowed
+    first: ServoComputedDataBorrowed,
+    second: ServoComputedDataBorrowed
 ) -> bool {
     first.get_custom_properties() == second.get_custom_properties()
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_ComputedValues_GetStyleRuleList(values: ServoComputedValuesBorrowed,
+pub extern "C" fn Servo_ComputedValues_GetStyleRuleList(values: ServoStyleContextBorrowed,
                                                         rules: RawGeckoServoStyleRuleListBorrowedMut) {
     if let Some(ref rule_node) = values.rules {
         let mut result = vec![];
         for node in rule_node.self_and_ancestors() {
             if let &StyleSource::Style(ref rule) = node.style_source() {
                 result.push(rule);
             }
         }
@@ -2799,17 +2797,17 @@ pub extern "C" fn Servo_ResolveStyle(ele
     // restyle hints other than animation hints.
     let flags = if restyle_behavior == Restyle::ForThrottledAnimationFlush {
         ANIMATION_ONLY
     } else {
         TraversalFlags::empty()
     };
     debug_assert!(element.has_current_styles_for_traversal(&*data, flags),
                   "Resolving style on element without current styles");
-    data.styles.primary().clone().into_strong()
+    data.styles.primary().clone().into()
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed,
                                            pseudo_type: CSSPseudoElementType,
                                            rule_inclusion: StyleRuleInclusion,
                                            snapshots: *const ServoElementSnapshotTable,
                                            raw_data: RawServoStyleSetBorrowed)
@@ -2848,34 +2846,34 @@ pub extern "C" fn Servo_ResolveStyleLazi
         let styles = element.mutate_data().and_then(|d| {
             if d.has_styles() {
                 Some(finish(&d.styles))
             } else {
                 None
             }
         });
         if let Some(result) = styles {
-            return result.into_strong();
+            return result.into();
         }
     }
 
     // We don't have the style ready. Go ahead and compute it as necessary.
     let shared = create_shared_context(&global_style_data,
                                        &guard,
                                        &data,
                                        TraversalFlags::empty(),
                                        unsafe { &*snapshots });
     let mut tlc = ThreadLocalStyleContext::new(&shared);
     let mut context = StyleContext {
         shared: &shared,
         thread_local: &mut tlc,
     };
 
     let styles = resolve_style(&mut context, element, rule_inclusion);
-    finish(&styles).into_strong()
+    finish(&styles).into()
 }
 
 #[cfg(feature = "gecko_debug")]
 fn simulate_compute_values_failure(property: &PropertyValuePair) -> bool {
     let p = property.mProperty;
     let id = get_property_id_from_nscsspropertyid!(p, false);
     id.as_shorthand().is_ok() && property.mSimulateComputeValuesFailure
 }
@@ -2914,25 +2912,24 @@ pub extern "C" fn Servo_GetComputedKeyfr
                                                   raw_data: RawServoStyleSetBorrowed,
                                                   computed_keyframes: RawGeckoComputedKeyframeValuesListBorrowedMut)
 {
     use std::mem;
     use style::properties::LonghandIdSet;
 
     let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
     let metrics = get_metrics_provider_for_product();
-    let style = ComputedValues::as_arc(&style);
 
     let element = GeckoElement(element);
     let parent_element = element.inheritance_parent();
     let parent_data = parent_element.as_ref().and_then(|e| e.borrow_data());
     let parent_style = parent_data.as_ref().map(|d| d.styles.primary()).map(|x| &**x);
 
     let pseudo = style.pseudo();
-    let mut context = create_context(&data, &metrics, style, parent_style, pseudo.as_ref());
+    let mut context = create_context(&data, &metrics, &style, parent_style, pseudo.as_ref());
 
     let global_style_data = &*GLOBAL_STYLE_DATA;
     let guard = global_style_data.shared_lock.read();
     let default_values = data.default_computed_values();
 
     for (index, keyframe) in keyframes.iter().enumerate() {
         let ref mut animation_values = computed_keyframes[index];
 
@@ -2996,25 +2993,24 @@ pub extern "C" fn Servo_GetComputedKeyfr
 #[no_mangle]
 pub extern "C" fn Servo_GetAnimationValues(declarations: RawServoDeclarationBlockBorrowed,
                                            element: RawGeckoElementBorrowed,
                                            style: ServoStyleContextBorrowed,
                                            raw_data: RawServoStyleSetBorrowed,
                                            animation_values: RawGeckoServoAnimationValueListBorrowedMut) {
     let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
     let metrics = get_metrics_provider_for_product();
-    let style = ComputedValues::as_arc(&style);
 
     let element = GeckoElement(element);
     let parent_element = element.inheritance_parent();
     let parent_data = parent_element.as_ref().and_then(|e| e.borrow_data());
     let parent_style = parent_data.as_ref().map(|d| d.styles.primary()).map(|x| &**x);
 
     let pseudo = style.pseudo();
-    let mut context = create_context(&data, &metrics, style, parent_style, pseudo.as_ref());
+    let mut context = create_context(&data, &metrics, &style, parent_style, pseudo.as_ref());
 
     let default_values = data.default_computed_values();
     let global_style_data = &*GLOBAL_STYLE_DATA;
     let guard = global_style_data.shared_lock.read();
 
     let declarations = Locked::<PropertyDeclarationBlock>::as_arc(&declarations);
     let guard = declarations.read_with(&guard);
     for (index, anim) in guard.to_animation_value_iter(&mut context, &default_values).enumerate() {
@@ -3026,17 +3022,16 @@ pub extern "C" fn Servo_GetAnimationValu
 #[no_mangle]
 pub extern "C" fn Servo_AnimationValue_Compute(element: RawGeckoElementBorrowed,
                                                declarations: RawServoDeclarationBlockBorrowed,
                                                style: ServoStyleContextBorrowed,
                                                raw_data: RawServoStyleSetBorrowed)
                                                -> RawServoAnimationValueStrong {
     let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
     let metrics = get_metrics_provider_for_product();
-    let style = ComputedValues::as_arc(&style);
 
     let element = GeckoElement(element);
     let parent_element = element.inheritance_parent();
     let parent_data = parent_element.as_ref().and_then(|e| e.borrow_data());
     let parent_style = parent_data.as_ref().map(|d| d.styles.primary()).map(|x| &**x);
 
     let pseudo = style.pseudo();
     let mut context = create_context(&data, &metrics, style, parent_style, pseudo.as_ref());
@@ -3288,17 +3283,17 @@ pub extern "C" fn Servo_StyleSet_Resolve
     };
 
     let declarations = Locked::<PropertyDeclarationBlock>::as_arc(&declarations);
 
     doc_data.stylist.compute_for_declarations(
         &guards,
         parent_style,
         declarations.clone_arc(),
-    ).into_strong()
+    ).into()
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_StyleSet_MightHaveAttributeDependency(
     raw_data: RawServoStyleSetBorrowed,
     element: RawGeckoElementBorrowed,
     local_name: *mut nsIAtom,
 ) -> bool {
@@ -3345,17 +3340,17 @@ pub extern "C" fn Servo_StyleSet_HasStat
             has_dep = has_dep || stylist.might_have_state_dependency(state);
         });
     }
 
     has_dep
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_GetCustomPropertyValue(computed_values: ServoComputedValuesBorrowed,
+pub extern "C" fn Servo_GetCustomPropertyValue(computed_values: ServoStyleContextBorrowed,
                                                name: *const nsAString,
                                                value: *mut nsAString) -> bool {
     let custom_properties = match computed_values.custom_properties() {
         Some(p) => p,
         None => return false,
     };
 
     let name = unsafe { Atom::from((&*name)) };
@@ -3364,25 +3359,25 @@ pub extern "C" fn Servo_GetCustomPropert
         None => return false,
     };
 
     computed_value.to_css(unsafe { value.as_mut().unwrap() }).unwrap();
     true
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_GetCustomPropertiesCount(computed_values: ServoComputedValuesBorrowed) -> u32 {
+pub extern "C" fn Servo_GetCustomPropertiesCount(computed_values: ServoStyleContextBorrowed) -> u32 {
     match computed_values.custom_properties() {
         Some(p) => p.len() as u32,
         None => 0,
     }
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_GetCustomPropertyNameAt(computed_values: ServoComputedValuesBorrowed,
+pub extern "C" fn Servo_GetCustomPropertyNameAt(computed_values: ServoStyleContextBorrowed,
                                                 index: u32,
                                                 name: *mut nsAString) -> bool {
     let custom_properties = match computed_values.custom_properties() {
         Some(p) => p,
         None => return false,
     };
 
     let property_name = match custom_properties.get_name_at(index) {