servo: Merge #16005 - Compose animation with servo's hashmap (from hiikezoe:animation-compose); r=heycam
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 17 Mar 2017 03:09:31 -0700
changeset 348240 fd3bfde70bcfd9592e1c340422c7070180554068
parent 348239 ed2a004bb475c6227081650e7be0bd017a21a1bb
child 348241 10ec4edc3c6312bfbc88ddd17607fc766612fade
push id88170
push userkwierso@gmail.com
push dateFri, 17 Mar 2017 18:13:38 +0000
treeherdermozilla-inbound@5800d1391c10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
milestone55.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 #16005 - Compose animation with servo's hashmap (from hiikezoe:animation-compose); r=heycam <!-- Please describe your changes on the following line: --> This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1340958 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [X] These changes do not require tests because it's for stylo. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 36234d717f7155d61a631e98f0a435110e1ec161
servo/components/style/build_gecko.rs
servo/components/style/dom.rs
servo/components/style/gecko/arc_types.rs
servo/components/style/gecko/wrapper.rs
servo/components/style/gecko_bindings/bindings.rs
servo/components/style/gecko_bindings/structs_debug.rs
servo/components/style/gecko_bindings/structs_release.rs
servo/components/style/matching.rs
servo/components/style/properties/declaration_block.rs
servo/components/style/properties/helpers/animated_properties.mako.rs
servo/ports/geckolib/glue.rs
--- a/servo/components/style/build_gecko.rs
+++ b/servo/components/style/build_gecko.rs
@@ -415,17 +415,17 @@ mod bindings {
             "StyleBasicShapeType",
             "StyleGeometryBox",
             "StyleShapeSource",
             "StyleTransition",
             "mozilla::UniquePtr",
             "mozilla::DefaultDelete",
             "mozilla::Side",
             "mozilla::binding_danger::AssertAndSuppressCleanupPolicy",
-            "RawServoAnimationValueBorrowedListBorrowed",
+            "RawServoAnimationValueMapBorrowed",
         ];
         let opaque_types = [
             "std::pair__PCCP",
             "std::namespace::atomic___base", "std::atomic__My_base",
             "std::atomic___base",
             "mozilla::gfx::.*",
             "FallibleTArray",
             "mozilla::dom::Sequence",
@@ -536,16 +536,17 @@ mod bindings {
             "mozilla::css::URLValue",
             "RawGeckoDocument",
             "RawGeckoElement",
             "RawGeckoKeyframeList",
             "RawGeckoComputedKeyframeValuesList",
             "RawGeckoNode",
             "RawGeckoAnimationValueList",
             "RawServoAnimationValue",
+            "RawServoAnimationValueMap",
             "RawServoDeclarationBlock",
             "RawGeckoPresContext",
             "RawGeckoPresContextOwned",
             "RawGeckoStyleAnimationList",
             "GeckoParserExtraData",
             "RefPtr",
             "ThreadSafeURIHolder",
             "ThreadSafePrincipalHolder",
@@ -615,17 +616,16 @@ mod bindings {
             "nsStyleXUL",
             "nsTimingFunction",
             "nscolor",
             "nscoord",
             "nsresult",
             "Loader",
             "ServoStyleSheet",
             "EffectCompositor_CascadeLevel",
-            "RawServoAnimationValueBorrowedListBorrowed",
         ];
         struct ArrayType {
             cpp_type: &'static str,
             rust_type: &'static str
         }
         let array_types = [
             ArrayType { cpp_type: "uintptr_t", rust_type: "usize" },
         ];
--- a/servo/components/style/dom.rs
+++ b/servo/components/style/dom.rs
@@ -254,16 +254,28 @@ pub trait TElement : PartialEq + Debug +
     /// Get this element's style attribute.
     fn style_attribute(&self) -> Option<&Arc<RwLock<PropertyDeclarationBlock>>>;
 
     /// Get this element's animation rules.
     fn get_animation_rules(&self, _pseudo: Option<&PseudoElement>) -> AnimationRules {
         AnimationRules(None, None)
     }
 
+    /// Get this element's animation rule.
+    fn get_animation_rule(&self, _pseudo: Option<&PseudoElement>)
+                          -> Option<Arc<RwLock<PropertyDeclarationBlock>>> {
+        None
+    }
+
+    /// Get this element's transition rule.
+    fn get_transition_rule(&self, _pseudo: Option<&PseudoElement>)
+                           -> Option<Arc<RwLock<PropertyDeclarationBlock>>> {
+        None
+    }
+
     /// Get this element's state, for non-tree-structural pseudos.
     fn get_state(&self) -> ElementState;
 
     /// Whether this element has an attribute with a given namespace.
     fn has_attr(&self, namespace: &Namespace, attr: &LocalName) -> bool;
 
     /// Whether an attribute value equals `value`.
     fn attr_equals(&self, namespace: &Namespace, attr: &LocalName, value: &Atom) -> bool;
--- a/servo/components/style/gecko/arc_types.rs
+++ b/servo/components/style/gecko/arc_types.rs
@@ -6,22 +6,22 @@
 //! and release functions. This list corresponds to ServoArcTypeList.h
 //! file in Gecko.
 
 #![allow(non_snake_case, missing_docs)]
 
 use gecko_bindings::bindings::{RawServoMediaList, RawServoMediaRule, RawServoNamespaceRule};
 use gecko_bindings::bindings::{RawServoStyleSheet, RawServoStyleRule, RawServoImportRule};
 use gecko_bindings::bindings::{ServoComputedValues, ServoCssRules};
-use gecko_bindings::structs::{RawServoAnimationValue, RawServoDeclarationBlock};
+use gecko_bindings::structs::{RawServoAnimationValue, RawServoAnimationValueMap, RawServoDeclarationBlock};
 use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI};
 use media_queries::MediaList;
 use parking_lot::RwLock;
 use properties::{ComputedValues, PropertyDeclarationBlock};
-use properties::animated_properties::AnimationValue;
+use properties::animated_properties::{AnimationValue, AnimationValueMap};
 use stylesheets::{CssRules, Stylesheet, StyleRule, ImportRule, MediaRule, NamespaceRule};
 
 macro_rules! impl_arc_ffi {
     ($servo_type:ty => $gecko_type:ty [$addref:ident, $release:ident]) => {
         unsafe impl HasFFI for $servo_type {
             type FFIType = $gecko_type;
         }
         unsafe impl HasArcFFI for $servo_type {}
@@ -54,16 +54,19 @@ impl_arc_ffi!(RwLock<StyleRule> => RawSe
               [Servo_StyleRule_AddRef, Servo_StyleRule_Release]);
 
 impl_arc_ffi!(RwLock<ImportRule> => RawServoImportRule
               [Servo_ImportRule_AddRef, Servo_ImportRule_Release]);
 
 impl_arc_ffi!(AnimationValue => RawServoAnimationValue
               [Servo_AnimationValue_AddRef, Servo_AnimationValue_Release]);
 
+impl_arc_ffi!(RwLock<AnimationValueMap> => RawServoAnimationValueMap
+              [Servo_AnimationValueMap_AddRef, Servo_AnimationValueMap_Release]);
+
 impl_arc_ffi!(RwLock<MediaList> => RawServoMediaList
               [Servo_MediaList_AddRef, Servo_MediaList_Release]);
 
 impl_arc_ffi!(RwLock<MediaRule> => RawServoMediaRule
               [Servo_MediaRule_AddRef, Servo_MediaRule_Release]);
 
 impl_arc_ffi!(RwLock<NamespaceRule> => RawServoNamespaceRule
               [Servo_NamespaceRule_AddRef, Servo_NamespaceRule_Release]);
--- a/servo/components/style/gecko/wrapper.rs
+++ b/servo/components/style/gecko/wrapper.rs
@@ -41,16 +41,17 @@ use gecko_bindings::structs::{nsIAtom, n
 use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel;
 use gecko_bindings::structs::NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO;
 use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
 use gecko_bindings::sugar::ownership::HasArcFFI;
 use parking_lot::RwLock;
 use parser::ParserContextExtraData;
 use properties::{ComputedValues, parse_style_attribute};
 use properties::PropertyDeclarationBlock;
+use properties::animated_properties::AnimationValueMap;
 use rule_tree::CascadeLevel as ServoCascadeLevel;
 use selector_parser::{ElementExt, Snapshot};
 use selectors::Element;
 use selectors::matching::{ElementSelectorFlags, StyleRelations, matches_complex_selector};
 use selectors::parser::{AttrSelector, NamespaceConstraint};
 use servo_url::ServoUrl;
 use sink::Push;
 use std::fmt;
@@ -398,35 +399,55 @@ fn selector_flags_to_node_flags(flags: E
     }
     if flags.contains(HAS_EMPTY_SELECTOR) {
         gecko_flags |= NODE_HAS_EMPTY_SELECTOR as u32;
     }
 
     gecko_flags
 }
 
+fn get_animation_rule(element: &GeckoElement,
+                      pseudo: Option<&PseudoElement>,
+                      cascade_level: CascadeLevel)
+                      -> Option<Arc<RwLock<PropertyDeclarationBlock>>> {
+    let atom_ptr = PseudoElement::ns_atom_or_null_from_opt(pseudo);
+    let animation_values = Arc::new(RwLock::new(AnimationValueMap::new()));
+    if unsafe { Gecko_GetAnimationRule(element.0, atom_ptr, cascade_level,
+                                       HasArcFFI::arc_as_borrowed(&animation_values)) } {
+        Some(Arc::new(RwLock::new(PropertyDeclarationBlock::from_animation_value_map(&animation_values.read()))))
+    } else {
+        None
+    }
+}
+
 impl<'le> TElement for GeckoElement<'le> {
     type ConcreteNode = GeckoNode<'le>;
 
     fn as_node(&self) -> Self::ConcreteNode {
         unsafe { GeckoNode(&*(self.0 as *const _ as *const RawGeckoNode)) }
     }
 
     fn style_attribute(&self) -> Option<&Arc<RwLock<PropertyDeclarationBlock>>> {
         let declarations = unsafe { Gecko_GetStyleAttrDeclarationBlock(self.0) };
         declarations.map(|s| s.as_arc_opt()).unwrap_or(None)
     }
 
     fn get_animation_rules(&self, pseudo: Option<&PseudoElement>) -> AnimationRules {
-        let atom_ptr = PseudoElement::ns_atom_or_null_from_opt(pseudo);
-        unsafe {
-            AnimationRules(
-                Gecko_GetAnimationRule(self.0, atom_ptr, CascadeLevel::Animations).into_arc_opt(),
-                Gecko_GetAnimationRule(self.0, atom_ptr, CascadeLevel::Transitions).into_arc_opt())
-        }
+        AnimationRules(self.get_animation_rule(pseudo),
+                       self.get_transition_rule(pseudo))
+    }
+
+    fn get_animation_rule(&self, pseudo: Option<&PseudoElement>)
+                          -> Option<Arc<RwLock<PropertyDeclarationBlock>>> {
+        get_animation_rule(self, pseudo, CascadeLevel::Animations)
+    }
+
+    fn get_transition_rule(&self, pseudo: Option<&PseudoElement>)
+                           -> Option<Arc<RwLock<PropertyDeclarationBlock>>> {
+        get_animation_rule(self, pseudo, CascadeLevel::Transitions)
     }
 
     fn get_state(&self) -> ElementState {
         unsafe {
             ElementState::from_bits_truncate(Gecko_ElementState(self.0))
         }
     }
 
--- a/servo/components/style/gecko_bindings/bindings.rs
+++ b/servo/components/style/gecko_bindings/bindings.rs
@@ -1,26 +1,22 @@
 /* automatically generated by rust-bindgen */
 
 pub use nsstring::{nsACString, nsAString, nsString};
 type nsACString_internal = nsACString;
 type nsAString_internal = nsAString;
 use gecko_bindings::structs::mozilla::css::URLValue;
-pub type RawServoNamespaceRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoNamespaceRule>;
-pub type RawServoNamespaceRuleBorrowedOrNull<'a> = Option<&'a RawServoNamespaceRule>;
-pub type RawServoNamespaceRuleBorrowed<'a> = &'a RawServoNamespaceRule;
-enum RawServoNamespaceRuleVoid{ }
-pub struct RawServoNamespaceRule(RawServoNamespaceRuleVoid);
 use gecko_bindings::structs::RawGeckoDocument;
 use gecko_bindings::structs::RawGeckoElement;
 use gecko_bindings::structs::RawGeckoKeyframeList;
 use gecko_bindings::structs::RawGeckoComputedKeyframeValuesList;
 use gecko_bindings::structs::RawGeckoNode;
 use gecko_bindings::structs::RawGeckoAnimationValueList;
 use gecko_bindings::structs::RawServoAnimationValue;
+use gecko_bindings::structs::RawServoAnimationValueMap;
 use gecko_bindings::structs::RawServoDeclarationBlock;
 use gecko_bindings::structs::RawGeckoPresContext;
 use gecko_bindings::structs::RawGeckoPresContextOwned;
 use gecko_bindings::structs::RawGeckoStyleAnimationList;
 use gecko_bindings::structs::GeckoParserExtraData;
 use gecko_bindings::structs::RefPtr;
 use gecko_bindings::structs::ThreadSafeURIHolder;
 use gecko_bindings::structs::ThreadSafePrincipalHolder;
@@ -174,17 +170,16 @@ 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::ServoStyleSheet;
 use gecko_bindings::structs::EffectCompositor_CascadeLevel;
-use gecko_bindings::structs::RawServoAnimationValueBorrowedListBorrowed;
 pub type nsTArrayBorrowed_uintptr_t<'a> = &'a mut ::gecko_bindings::structs::nsTArray<usize>;
 pub type ServoCssRulesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoCssRules>;
 pub type ServoCssRulesBorrowed<'a> = &'a ServoCssRules;
 pub type ServoCssRulesBorrowedOrNull<'a> = Option<&'a ServoCssRules>;
 enum ServoCssRulesVoid { }
 pub struct ServoCssRules(ServoCssRulesVoid);
 pub type RawServoStyleSheetStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoStyleSheet>;
 pub type RawServoStyleSheetBorrowed<'a> = &'a RawServoStyleSheet;
@@ -207,26 +202,34 @@ pub struct RawServoStyleRule(RawServoSty
 pub type RawServoImportRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoImportRule>;
 pub type RawServoImportRuleBorrowed<'a> = &'a RawServoImportRule;
 pub type RawServoImportRuleBorrowedOrNull<'a> = Option<&'a RawServoImportRule>;
 enum RawServoImportRuleVoid { }
 pub struct RawServoImportRule(RawServoImportRuleVoid);
 pub type RawServoAnimationValueStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoAnimationValue>;
 pub type RawServoAnimationValueBorrowed<'a> = &'a RawServoAnimationValue;
 pub type RawServoAnimationValueBorrowedOrNull<'a> = Option<&'a RawServoAnimationValue>;
+pub type RawServoAnimationValueMapStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoAnimationValueMap>;
+pub type RawServoAnimationValueMapBorrowed<'a> = &'a RawServoAnimationValueMap;
+pub type RawServoAnimationValueMapBorrowedOrNull<'a> = Option<&'a RawServoAnimationValueMap>;
 pub type RawServoMediaListStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoMediaList>;
 pub type RawServoMediaListBorrowed<'a> = &'a RawServoMediaList;
 pub type RawServoMediaListBorrowedOrNull<'a> = Option<&'a RawServoMediaList>;
 enum RawServoMediaListVoid { }
 pub struct RawServoMediaList(RawServoMediaListVoid);
 pub type RawServoMediaRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoMediaRule>;
 pub type RawServoMediaRuleBorrowed<'a> = &'a RawServoMediaRule;
 pub type RawServoMediaRuleBorrowedOrNull<'a> = Option<&'a RawServoMediaRule>;
 enum RawServoMediaRuleVoid { }
 pub struct RawServoMediaRule(RawServoMediaRuleVoid);
+pub type RawServoNamespaceRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoNamespaceRule>;
+pub type RawServoNamespaceRuleBorrowed<'a> = &'a RawServoNamespaceRule;
+pub type RawServoNamespaceRuleBorrowedOrNull<'a> = Option<&'a RawServoNamespaceRule>;
+enum RawServoNamespaceRuleVoid { }
+pub struct RawServoNamespaceRule(RawServoNamespaceRuleVoid);
 pub type RawServoStyleSetOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoStyleSet>;
 pub type RawServoStyleSetOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoStyleSet>;
 pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet;
 pub type RawServoStyleSetBorrowedOrNull<'a> = Option<&'a RawServoStyleSet>;
 pub type RawServoStyleSetBorrowedMut<'a> = &'a mut RawServoStyleSet;
 pub type RawServoStyleSetBorrowedMutOrNull<'a> = Option<&'a mut RawServoStyleSet>;
 enum RawServoStyleSetVoid { }
 pub struct RawServoStyleSet(RawServoStyleSetVoid);
@@ -321,28 +324,42 @@ extern "C" {
 }
 extern "C" {
     pub fn Servo_AnimationValue_AddRef(ptr: RawServoAnimationValueBorrowed);
 }
 extern "C" {
     pub fn Servo_AnimationValue_Release(ptr: RawServoAnimationValueBorrowed);
 }
 extern "C" {
+    pub fn Servo_AnimationValueMap_AddRef(ptr:
+                                              RawServoAnimationValueMapBorrowed);
+}
+extern "C" {
+    pub fn Servo_AnimationValueMap_Release(ptr:
+                                               RawServoAnimationValueMapBorrowed);
+}
+extern "C" {
     pub fn Servo_MediaList_AddRef(ptr: RawServoMediaListBorrowed);
 }
 extern "C" {
     pub fn Servo_MediaList_Release(ptr: RawServoMediaListBorrowed);
 }
 extern "C" {
     pub fn Servo_MediaRule_AddRef(ptr: RawServoMediaRuleBorrowed);
 }
 extern "C" {
     pub fn Servo_MediaRule_Release(ptr: RawServoMediaRuleBorrowed);
 }
 extern "C" {
+    pub fn Servo_NamespaceRule_AddRef(ptr: RawServoNamespaceRuleBorrowed);
+}
+extern "C" {
+    pub fn Servo_NamespaceRule_Release(ptr: RawServoNamespaceRuleBorrowed);
+}
+extern "C" {
     pub fn Servo_StyleSet_Drop(ptr: RawServoStyleSetOwned);
 }
 extern "C" {
     pub fn Gecko_AddRefPrincipalArbitraryThread(aPtr:
                                                     *mut ThreadSafePrincipalHolder);
 }
 extern "C" {
     pub fn Gecko_ReleasePrincipalArbitraryThread(aPtr:
@@ -559,18 +576,20 @@ extern "C" {
     pub fn Gecko_GetHTMLPresentationAttrDeclarationBlock(element:
                                                              RawGeckoElementBorrowed)
      -> RawServoDeclarationBlockStrongBorrowedOrNull;
 }
 extern "C" {
     pub fn Gecko_GetAnimationRule(aElement: RawGeckoElementBorrowed,
                                   aPseudoTag: *mut nsIAtom,
                                   aCascadeLevel:
-                                      EffectCompositor_CascadeLevel)
-     -> RawServoDeclarationBlockStrong;
+                                      EffectCompositor_CascadeLevel,
+                                  aAnimationValues:
+                                      RawServoAnimationValueMapBorrowed)
+     -> bool;
 }
 extern "C" {
     pub fn Gecko_StyleAnimationsEquals(arg1:
                                            RawGeckoStyleAnimationListBorrowed,
                                        arg2:
                                            RawGeckoStyleAnimationListBorrowed)
      -> bool;
 }
@@ -1291,37 +1310,36 @@ extern "C" {
 extern "C" {
     pub fn Servo_StyleSheet_Empty(parsing_mode: SheetParsingMode)
      -> RawServoStyleSheetStrong;
 }
 extern "C" {
     pub fn Servo_StyleSheet_FromUTF8Bytes(loader: *mut Loader,
                                           gecko_stylesheet:
                                               *mut ServoStyleSheet,
-                                          data: *const nsACString_internal,
+                                          data: *const nsACString,
                                           parsing_mode: SheetParsingMode,
-                                          base_url:
-                                              *const nsACString_internal,
+                                          base_url: *const nsACString,
                                           base: *mut ThreadSafeURIHolder,
                                           referrer: *mut ThreadSafeURIHolder,
                                           principal:
                                               *mut ThreadSafePrincipalHolder)
      -> RawServoStyleSheetStrong;
 }
 extern "C" {
     pub fn Servo_ImportRule_GetSheet(import_rule: RawServoImportRuleBorrowed)
      -> RawServoStyleSheetStrong;
 }
 extern "C" {
     pub fn Servo_StyleSheet_ClearAndUpdate(stylesheet:
                                                RawServoStyleSheetBorrowed,
                                            loader: *mut Loader,
                                            gecko_stylesheet:
                                                *mut ServoStyleSheet,
-                                           data: *const nsACString_internal,
+                                           data: *const nsACString,
                                            base: *mut ThreadSafeURIHolder,
                                            referrer: *mut ThreadSafeURIHolder,
                                            principal:
                                                *mut ThreadSafePrincipalHolder);
 }
 extern "C" {
     pub fn Servo_StyleSheet_HasRules(sheet: RawServoStyleSheetBorrowed)
      -> bool;
@@ -1365,136 +1383,145 @@ extern "C" {
     pub fn Servo_StyleSet_FlushStyleSheets(set: RawServoStyleSetBorrowed);
 }
 extern "C" {
     pub fn Servo_StyleSet_NoteStyleSheetsChanged(set:
                                                      RawServoStyleSetBorrowed);
 }
 extern "C" {
     pub fn Servo_StyleSet_FillKeyframesForName(set: RawServoStyleSetBorrowed,
-                                               property:
-                                                   *const nsACString_internal,
+                                               property: *const nsACString,
                                                timing_function:
                                                    *const nsTimingFunction,
                                                computed_values:
                                                    ServoComputedValuesBorrowed,
                                                keyframe_list:
                                                    RawGeckoKeyframeListBorrowedMut)
      -> bool;
 }
 extern "C" {
     pub fn Servo_CssRules_ListTypes(rules: ServoCssRulesBorrowed,
                                     result: nsTArrayBorrowed_uintptr_t);
 }
 extern "C" {
+    pub fn Servo_CssRules_InsertRule(rules: ServoCssRulesBorrowed,
+                                     sheet: RawServoStyleSheetBorrowed,
+                                     rule: *const nsACString, index: u32,
+                                     nested: bool, rule_type: *mut u16)
+     -> nsresult;
+}
+extern "C" {
+    pub fn Servo_CssRules_DeleteRule(rules: ServoCssRulesBorrowed, index: u32)
+     -> nsresult;
+}
+extern "C" {
     pub fn Servo_CssRules_GetStyleRuleAt(rules: ServoCssRulesBorrowed,
                                          index: u32)
      -> RawServoStyleRuleStrong;
 }
 extern "C" {
+    pub fn Servo_StyleRule_Debug(rule: RawServoStyleRuleBorrowed,
+                                 result: *mut nsACString);
+}
+extern "C" {
+    pub fn Servo_StyleRule_GetCssText(rule: RawServoStyleRuleBorrowed,
+                                      result: *mut nsAString);
+}
+extern "C" {
     pub fn Servo_CssRules_GetMediaRuleAt(rules: ServoCssRulesBorrowed,
                                          index: u32)
      -> RawServoMediaRuleStrong;
 }
 extern "C" {
+    pub fn Servo_MediaRule_Debug(rule: RawServoMediaRuleBorrowed,
+                                 result: *mut nsACString);
+}
+extern "C" {
+    pub fn Servo_MediaRule_GetCssText(rule: RawServoMediaRuleBorrowed,
+                                      result: *mut nsAString);
+}
+extern "C" {
     pub fn Servo_CssRules_GetNamespaceRuleAt(rules: ServoCssRulesBorrowed,
                                              index: u32)
      -> RawServoNamespaceRuleStrong;
 }
 extern "C" {
-    pub fn Servo_CssRules_InsertRule(rules: ServoCssRulesBorrowed,
-                                     sheet: RawServoStyleSheetBorrowed,
-                                     rule: *const nsACString_internal,
-                                     index: u32, nested: bool,
-                                     rule_type: *mut u16) -> nsresult;
+    pub fn Servo_NamespaceRule_Debug(rule: RawServoNamespaceRuleBorrowed,
+                                     result: *mut nsACString);
 }
 extern "C" {
-    pub fn Servo_CssRules_DeleteRule(rules: ServoCssRulesBorrowed, index: u32)
-     -> nsresult;
-}
-extern "C" {
-    pub fn Servo_StyleRule_Debug(rule: RawServoStyleRuleBorrowed,
-                                 result: *mut nsACString_internal);
+    pub fn Servo_NamespaceRule_GetCssText(rule: RawServoNamespaceRuleBorrowed,
+                                          result: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_StyleRule_GetStyle(rule: RawServoStyleRuleBorrowed)
      -> RawServoDeclarationBlockStrong;
 }
 extern "C" {
     pub fn Servo_StyleRule_SetStyle(rule: RawServoStyleRuleBorrowed,
                                     declarations:
                                         RawServoDeclarationBlockBorrowed);
 }
 extern "C" {
-    pub fn Servo_StyleRule_GetCssText(rule: RawServoStyleRuleBorrowed,
-                                      result: *mut nsAString_internal);
-}
-extern "C" {
     pub fn Servo_StyleRule_GetSelectorText(rule: RawServoStyleRuleBorrowed,
-                                           result: *mut nsAString_internal);
-}
-extern "C" {
-    pub fn Servo_MediaRule_Debug(rule: RawServoMediaRuleBorrowed,
-                                 result: *mut nsACString_internal);
+                                           result: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_MediaRule_GetMedia(rule: RawServoMediaRuleBorrowed)
      -> RawServoMediaListStrong;
 }
 extern "C" {
     pub fn Servo_MediaRule_GetRules(rule: RawServoMediaRuleBorrowed)
      -> ServoCssRulesStrong;
 }
 extern "C" {
-    pub fn Servo_MediaRule_GetCssText(rule: RawServoMediaRuleBorrowed,
-                                      result: *mut nsAString_internal);
-}
-extern "C" {
-    pub fn Servo_NamespaceRule_Debug(rule: RawServoNamespaceRuleBorrowed,
-                                     result: *mut nsACString_internal);
+    pub fn Servo_NamespaceRule_GetPrefix(rule: RawServoNamespaceRuleBorrowed)
+     -> *mut nsIAtom;
 }
 extern "C" {
-    pub fn Servo_NamespaceRule_GetCssText(rule: RawServoNamespaceRuleBorrowed,
-                                          result: *mut nsAString_internal);
+    pub fn Servo_NamespaceRule_GetURI(rule: RawServoNamespaceRuleBorrowed)
+     -> *mut nsIAtom;
 }
 extern "C" {
-    pub fn Servo_ParseProperty(property: *const nsACString_internal,
-                               value: *const nsACString_internal,
-                               base: *const nsACString_internal,
+    pub fn Servo_ParseProperty(property: *const nsACString,
+                               value: *const nsACString,
+                               base: *const nsACString,
                                data: *const GeckoParserExtraData)
      -> RawServoDeclarationBlockStrong;
 }
 extern "C" {
     pub fn Servo_GetComputedKeyframeValues(keyframes:
                                                RawGeckoKeyframeListBorrowed,
                                            style: ServoComputedValuesBorrowed,
                                            parent_style:
                                                ServoComputedValuesBorrowedOrNull,
                                            set: RawServoStyleSetBorrowed,
                                            result:
                                                RawGeckoComputedKeyframeValuesListBorrowedMut);
 }
 extern "C" {
+    pub fn Servo_AnimationValueMap_Push(arg1:
+                                            RawServoAnimationValueMapBorrowed,
+                                        property: nsCSSPropertyID,
+                                        value:
+                                            RawServoAnimationValueBorrowed);
+}
+extern "C" {
     pub fn Servo_AnimationValues_Interpolate(from:
                                                  RawServoAnimationValueBorrowed,
                                              to:
                                                  RawServoAnimationValueBorrowed,
                                              progress: f64)
      -> RawServoAnimationValueStrong;
 }
 extern "C" {
-    pub fn Servo_AnimationValues_Uncompute(value:
-                                               RawServoAnimationValueBorrowedListBorrowed)
-     -> RawServoDeclarationBlockStrong;
-}
-extern "C" {
     pub fn Servo_AnimationValue_Serialize(value:
                                               RawServoAnimationValueBorrowed,
                                           property: nsCSSPropertyID,
-                                          buffer: *mut nsAString_internal);
+                                          buffer: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_AnimationValue_GetOpacity(value:
                                                RawServoAnimationValueBorrowed)
      -> f32;
 }
 extern "C" {
     pub fn Servo_AnimationValue_GetTransform(value:
@@ -1505,18 +1532,18 @@ extern "C" {
 extern "C" {
     pub fn Servo_AnimationValue_DeepEqual(arg1:
                                               RawServoAnimationValueBorrowed,
                                           arg2:
                                               RawServoAnimationValueBorrowed)
      -> bool;
 }
 extern "C" {
-    pub fn Servo_ParseStyleAttribute(data: *const nsACString_internal,
-                                     base: *const nsACString_internal,
+    pub fn Servo_ParseStyleAttribute(data: *const nsACString,
+                                     base: *const nsACString,
                                      extraData: *const GeckoParserExtraData)
      -> RawServoDeclarationBlockStrong;
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_CreateEmpty()
      -> RawServoDeclarationBlockStrong;
 }
 extern "C" {
@@ -1527,93 +1554,83 @@ extern "C" {
 extern "C" {
     pub fn Servo_DeclarationBlock_Equals(a: RawServoDeclarationBlockBorrowed,
                                          b: RawServoDeclarationBlockBorrowed)
      -> bool;
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_GetCssText(declarations:
                                                  RawServoDeclarationBlockBorrowed,
-                                             result: *mut nsAString_internal);
+                                             result: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_SerializeOneValue(declarations:
                                                         RawServoDeclarationBlockBorrowed,
                                                     property: nsCSSPropertyID,
-                                                    buffer:
-                                                        *mut nsAString_internal);
+                                                    buffer: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_Count(declarations:
                                             RawServoDeclarationBlockBorrowed)
      -> u32;
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_GetNthProperty(declarations:
                                                      RawServoDeclarationBlockBorrowed,
                                                  index: u32,
-                                                 result:
-                                                     *mut nsAString_internal)
+                                                 result: *mut nsAString)
      -> bool;
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_GetPropertyValue(declarations:
                                                        RawServoDeclarationBlockBorrowed,
                                                    property:
-                                                       *const nsACString_internal,
-                                                   value:
-                                                       *mut nsAString_internal);
+                                                       *const nsACString,
+                                                   value: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_GetPropertyValueById(declarations:
                                                            RawServoDeclarationBlockBorrowed,
                                                        property:
                                                            nsCSSPropertyID,
-                                                       value:
-                                                           *mut nsAString_internal);
+                                                       value: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_GetPropertyIsImportant(declarations:
                                                              RawServoDeclarationBlockBorrowed,
                                                          property:
-                                                             *const nsACString_internal)
+                                                             *const nsACString)
      -> bool;
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_SetProperty(declarations:
                                                   RawServoDeclarationBlockBorrowed,
-                                              property:
-                                                  *const nsACString_internal,
-                                              value:
-                                                  *const nsACString_internal,
+                                              property: *const nsACString,
+                                              value: *const nsACString,
                                               is_important: bool,
-                                              base:
-                                                  *const nsACString_internal,
+                                              base: *const nsACString,
                                               data:
                                                   *const GeckoParserExtraData)
      -> bool;
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_SetPropertyById(declarations:
                                                       RawServoDeclarationBlockBorrowed,
                                                   property: nsCSSPropertyID,
-                                                  value:
-                                                      *const nsACString_internal,
+                                                  value: *const nsACString,
                                                   is_important: bool,
-                                                  base:
-                                                      *const nsACString_internal,
+                                                  base: *const nsACString,
                                                   data:
                                                       *const GeckoParserExtraData)
      -> bool;
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_RemoveProperty(declarations:
                                                      RawServoDeclarationBlockBorrowed,
-                                                 property:
-                                                     *const nsACString_internal);
+                                                 property: *const nsACString);
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_RemovePropertyById(declarations:
                                                          RawServoDeclarationBlockBorrowed,
                                                      property:
                                                          nsCSSPropertyID);
 }
 extern "C" {
@@ -1667,57 +1684,53 @@ extern "C" {
     pub fn Servo_DeclarationBlock_SetColorValue(declarations:
                                                     RawServoDeclarationBlockBorrowed,
                                                 property: nsCSSPropertyID,
                                                 value: nscolor);
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_SetFontFamily(declarations:
                                                     RawServoDeclarationBlockBorrowed,
-                                                value:
-                                                    *const nsAString_internal);
+                                                value: *const nsAString);
 }
 extern "C" {
     pub fn Servo_DeclarationBlock_SetTextDecorationColorOverride(declarations:
                                                                      RawServoDeclarationBlockBorrowed);
 }
 extern "C" {
     pub fn Servo_MediaList_GetText(list: RawServoMediaListBorrowed,
-                                   result: *mut nsAString_internal);
+                                   result: *mut nsAString);
 }
 extern "C" {
     pub fn Servo_MediaList_SetText(list: RawServoMediaListBorrowed,
-                                   text: *const nsACString_internal);
+                                   text: *const nsACString);
 }
 extern "C" {
     pub fn Servo_MediaList_GetLength(list: RawServoMediaListBorrowed) -> u32;
 }
 extern "C" {
     pub fn Servo_MediaList_GetMediumAt(list: RawServoMediaListBorrowed,
-                                       index: u32,
-                                       result: *mut nsAString_internal)
+                                       index: u32, result: *mut nsAString)
      -> bool;
 }
 extern "C" {
     pub fn Servo_MediaList_AppendMedium(list: RawServoMediaListBorrowed,
-                                        new_medium:
-                                            *const nsACString_internal);
+                                        new_medium: *const nsACString);
 }
 extern "C" {
     pub fn Servo_MediaList_DeleteMedium(list: RawServoMediaListBorrowed,
-                                        old_medium:
-                                            *const nsACString_internal)
+                                        old_medium: *const nsACString)
      -> bool;
 }
 extern "C" {
-    pub fn Servo_CSSSupports2(name: *const nsACString_internal,
-                              value: *const nsACString_internal) -> bool;
+    pub fn Servo_CSSSupports2(name: *const nsACString,
+                              value: *const nsACString) -> bool;
 }
 extern "C" {
-    pub fn Servo_CSSSupports(cond: *const nsACString_internal) -> bool;
+    pub fn Servo_CSSSupports(cond: *const nsACString) -> bool;
 }
 extern "C" {
     pub fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null:
                                                        ServoComputedValuesBorrowedOrNull,
                                                    pseudoTag: *mut nsIAtom,
                                                    skip_display_fixup: bool,
                                                    set:
                                                        RawServoStyleSetBorrowed)
--- a/servo/components/style/gecko_bindings/structs_debug.rs
+++ b/servo/components/style/gecko_bindings/structs_debug.rs
@@ -1439,16 +1439,202 @@ pub mod root {
             pub struct LinkedListElementTraits<T> {
                 pub _address: u8,
                 pub _phantom_0: ::std::marker::PhantomData<T>,
             }
             pub type LinkedListElementTraits_RawType<T> = *mut T;
             pub type LinkedListElementTraits_ConstRawType<T> = *mut T;
             pub type LinkedListElementTraits_ClientType<T> = *mut T;
             pub type LinkedListElementTraits_ConstClientType<T> = *mut T;
+            #[repr(C)]
+            #[derive(Debug, Copy)]
+            pub struct nsStringRepr {
+                pub mData: *mut root::mozilla::detail::nsStringRepr_char_type,
+                pub mLength: root::mozilla::detail::nsStringRepr_size_type,
+                pub mFlags: u32,
+            }
+            pub type nsStringRepr_fallible_t = root::mozilla::fallible_t;
+            pub type nsStringRepr_char_type = u16;
+            pub type nsStringRepr_self_type =
+                root::mozilla::detail::nsStringRepr;
+            pub type nsStringRepr_base_string_type =
+                root::mozilla::detail::nsStringRepr_self_type;
+            pub type nsStringRepr_substring_type = root::nsAString;
+            pub type nsStringRepr_substring_tuple_type =
+                root::nsSubstringTuple;
+            pub type nsStringRepr_string_type = ::nsstring::nsStringRepr;
+            pub type nsStringRepr_const_iterator =
+                root::nsReadingIterator<u16>;
+            pub type nsStringRepr_iterator = root::nsWritingIterator<u16>;
+            pub type nsStringRepr_comparator_type = root::nsStringComparator;
+            pub type nsStringRepr_char_iterator =
+                *mut root::mozilla::detail::nsStringRepr_char_type;
+            pub type nsStringRepr_const_char_iterator =
+                *const root::mozilla::detail::nsStringRepr_char_type;
+            pub type nsStringRepr_index_type = u32;
+            pub type nsStringRepr_size_type = u32;
+            pub const nsStringRepr_F_NONE:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_NONE;
+            pub const nsStringRepr_F_TERMINATED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_TERMINATED;
+            pub const nsStringRepr_F_VOIDED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_VOIDED;
+            pub const nsStringRepr_F_SHARED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_SHARED;
+            pub const nsStringRepr_F_OWNED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_OWNED;
+            pub const nsStringRepr_F_FIXED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_FIXED;
+            pub const nsStringRepr_F_LITERAL:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_LITERAL;
+            pub const nsStringRepr_F_CLASS_FIXED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_CLASS_FIXED;
+            #[repr(u32)]
+            #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+            pub enum nsStringRepr__bindgen_ty_1 {
+                F_NONE = 0,
+                F_TERMINATED = 1,
+                F_VOIDED = 2,
+                F_SHARED = 4,
+                F_OWNED = 8,
+                F_FIXED = 16,
+                F_LITERAL = 32,
+                F_CLASS_FIXED = 65536,
+            }
+            #[test]
+            fn bindgen_test_layout_nsStringRepr() {
+                assert_eq!(::std::mem::size_of::<nsStringRepr>() , 16usize ,
+                           concat ! (
+                           "Size of: " , stringify ! ( nsStringRepr ) ));
+                assert_eq! (::std::mem::align_of::<nsStringRepr>() , 8usize ,
+                            concat ! (
+                            "Alignment of " , stringify ! ( nsStringRepr ) ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsStringRepr ) ) . mData as *
+                            const _ as usize } , 0usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsStringRepr ) , "::" , stringify ! ( mData ) ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsStringRepr ) ) . mLength as
+                            * const _ as usize } , 8usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsStringRepr ) , "::" , stringify ! ( mLength )
+                            ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsStringRepr ) ) . mFlags as
+                            * const _ as usize } , 12usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsStringRepr ) , "::" , stringify ! ( mFlags ) ));
+            }
+            impl Clone for nsStringRepr {
+                fn clone(&self) -> Self { *self }
+            }
+            #[repr(C)]
+            #[derive(Debug, Copy)]
+            pub struct nsCStringRepr {
+                pub mData: *mut root::mozilla::detail::nsCStringRepr_char_type,
+                pub mLength: root::mozilla::detail::nsCStringRepr_size_type,
+                pub mFlags: u32,
+            }
+            pub type nsCStringRepr_fallible_t = root::mozilla::fallible_t;
+            pub type nsCStringRepr_char_type = ::std::os::raw::c_char;
+            pub type nsCStringRepr_self_type =
+                root::mozilla::detail::nsCStringRepr;
+            pub type nsCStringRepr_base_string_type =
+                root::mozilla::detail::nsCStringRepr_self_type;
+            pub type nsCStringRepr_substring_type = root::nsACString;
+            pub type nsCStringRepr_substring_tuple_type =
+                root::nsCSubstringTuple;
+            pub type nsCStringRepr_string_type = root::nsCString;
+            pub type nsCStringRepr_const_iterator =
+                root::nsReadingIterator<::std::os::raw::c_char>;
+            pub type nsCStringRepr_iterator =
+                root::nsWritingIterator<::std::os::raw::c_char>;
+            pub type nsCStringRepr_comparator_type =
+                root::nsCStringComparator;
+            pub type nsCStringRepr_char_iterator =
+                *mut root::mozilla::detail::nsCStringRepr_char_type;
+            pub type nsCStringRepr_const_char_iterator =
+                *const root::mozilla::detail::nsCStringRepr_char_type;
+            pub type nsCStringRepr_index_type = u32;
+            pub type nsCStringRepr_size_type = u32;
+            pub const nsCStringRepr_F_NONE:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_NONE;
+            pub const nsCStringRepr_F_TERMINATED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_TERMINATED;
+            pub const nsCStringRepr_F_VOIDED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_VOIDED;
+            pub const nsCStringRepr_F_SHARED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_SHARED;
+            pub const nsCStringRepr_F_OWNED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_OWNED;
+            pub const nsCStringRepr_F_FIXED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_FIXED;
+            pub const nsCStringRepr_F_LITERAL:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_LITERAL;
+            pub const nsCStringRepr_F_CLASS_FIXED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_CLASS_FIXED;
+            #[repr(u32)]
+            #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+            pub enum nsCStringRepr__bindgen_ty_1 {
+                F_NONE = 0,
+                F_TERMINATED = 1,
+                F_VOIDED = 2,
+                F_SHARED = 4,
+                F_OWNED = 8,
+                F_FIXED = 16,
+                F_LITERAL = 32,
+                F_CLASS_FIXED = 65536,
+            }
+            #[test]
+            fn bindgen_test_layout_nsCStringRepr() {
+                assert_eq!(::std::mem::size_of::<nsCStringRepr>() , 16usize ,
+                           concat ! (
+                           "Size of: " , stringify ! ( nsCStringRepr ) ));
+                assert_eq! (::std::mem::align_of::<nsCStringRepr>() , 8usize ,
+                            concat ! (
+                            "Alignment of " , stringify ! ( nsCStringRepr )
+                            ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsCStringRepr ) ) . mData as
+                            * const _ as usize } , 0usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsCStringRepr ) , "::" , stringify ! ( mData ) ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsCStringRepr ) ) . mLength
+                            as * const _ as usize } , 8usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsCStringRepr ) , "::" , stringify ! ( mLength )
+                            ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsCStringRepr ) ) . mFlags as
+                            * const _ as usize } , 12usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsCStringRepr ) , "::" , stringify ! ( mFlags )
+                            ));
+            }
+            impl Clone for nsCStringRepr {
+                fn clone(&self) -> Self { *self }
+            }
         }
         pub type MallocSizeOf =
             ::std::option::Option<unsafe extern "C" fn(p:
                                                            *const ::std::os::raw::c_void)
                                       -> ::std::os::raw::c_ulong>;
         #[repr(C)]
         #[derive(Debug)]
         pub struct OwningNonNull<T> {
@@ -1986,20 +2172,20 @@ pub mod root {
                                ));
                     assert_eq! (::std::mem::align_of::<FastErrorResult>() ,
                                 8usize , concat ! (
                                 "Alignment of " , stringify ! (
                                 FastErrorResult ) ));
                 }
                 #[repr(C)]
                 pub struct FakeString {
-                    pub mData: *mut root::nsAString_internal_char_type,
-                    pub mLength: root::nsAString_internal_size_type,
+                    pub mData: *mut root::mozilla::detail::nsStringRepr_char_type,
+                    pub mLength: root::mozilla::detail::nsStringRepr_size_type,
                     pub mFlags: u32,
-                    pub mInlineStorage: [root::nsAString_internal_char_type; 64usize],
+                    pub mInlineStorage: [root::mozilla::detail::nsStringRepr_char_type; 64usize],
                 }
                 #[repr(C)]
                 #[derive(Debug)]
                 pub struct FakeString_StringAsserter {
                     pub _base: ::nsstring::nsStringRepr,
                 }
                 #[test]
                 fn bindgen_test_layout_FakeString_StringAsserter() {
@@ -2944,17 +3130,17 @@ pub mod root {
             }
             #[repr(C)]
             #[derive(Debug)]
             pub struct NodeInfo_NodeInfoInner {
                 pub mName: root::nsCOMPtr<root::nsIAtom>,
                 pub mPrefix: root::nsCOMPtr<root::nsIAtom>,
                 pub mNamespaceID: i32,
                 pub mNodeType: u16,
-                pub mNameString: *const root::nsAString_internal,
+                pub mNameString: *const root::nsAString,
                 pub mExtraName: root::nsCOMPtr<root::nsIAtom>,
             }
             #[test]
             fn bindgen_test_layout_NodeInfo_NodeInfoInner() {
                 assert_eq!(::std::mem::size_of::<NodeInfo_NodeInfoInner>() ,
                            40usize , concat ! (
                            "Size of: " , stringify ! ( NodeInfo_NodeInfoInner
                            ) ));
@@ -4108,16 +4294,17 @@ pub mod root {
                 pub _base_1: root::nsWrapperCache,
                 pub mRefCnt: root::nsCycleCollectingAutoRefCnt,
                 pub _mOwningThread: root::nsAutoOwningThread,
                 pub mOwner: root::nsCOMPtr<root::nsISupports>,
                 pub mTime: root::DOMHighResTimeStamp,
                 pub mRootBounds: root::RefPtr<root::mozilla::dom::DOMRect>,
                 pub mBoundingClientRect: root::RefPtr<root::mozilla::dom::DOMRect>,
                 pub mIntersectionRect: root::RefPtr<root::mozilla::dom::DOMRect>,
+                pub mIsIntersecting: bool,
                 pub mTarget: root::RefPtr<root::mozilla::dom::Element>,
                 pub mIntersectionRatio: f64,
             }
             pub type DOMIntersectionObserverEntry_HasThreadSafeRefCnt =
                 root::mozilla::FalseType;
             #[repr(C)]
             #[derive(Debug, Copy)]
             pub struct DOMIntersectionObserverEntry_cycleCollection {
@@ -4142,17 +4329,17 @@ pub mod root {
                       "_ZN7mozilla3dom28DOMIntersectionObserverEntry21_cycleCollectorGlobalE"]
                 pub static mut
                            DOMIntersectionObserverEntry__cycleCollectorGlobal:
                            root::mozilla::dom::DOMIntersectionObserverEntry_cycleCollection;
             }
             #[test]
             fn bindgen_test_layout_DOMIntersectionObserverEntry() {
                 assert_eq!(::std::mem::size_of::<DOMIntersectionObserverEntry>()
-                           , 104usize , concat ! (
+                           , 112usize , concat ! (
                            "Size of: " , stringify ! (
                            DOMIntersectionObserverEntry ) ));
                 assert_eq! (::std::mem::align_of::<DOMIntersectionObserverEntry>()
                             , 8usize , concat ! (
                             "Alignment of " , stringify ! (
                             DOMIntersectionObserverEntry ) ));
             }
             #[repr(C)]
@@ -8022,19 +8209,16 @@ pub mod root {
                         "Alignment of " , stringify ! ( StyleAnimationValue )
                         ));
         }
         impl Clone for StyleAnimationValue {
             fn clone(&self) -> Self { *self }
         }
         #[repr(C)]
         #[derive(Debug, Copy, Clone)]
-        pub struct ServoAnimationRule([u8; 0]);
-        #[repr(C)]
-        #[derive(Debug, Copy, Clone)]
         pub struct AnimationPerformanceWarning([u8; 0]);
         pub type CSSPseudoClassTypeBase = u8;
         #[repr(u8)]
         #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
         pub enum CSSPseudoClassType {
             empty = 0,
             mozOnlyWhitespace = 1,
             mozEmptyExceptChildrenWithLocalname = 2,
@@ -8164,22 +8348,16 @@ pub mod root {
         #[derive(Debug, Copy, Clone)]
         pub struct pair<_T1, _T2> {
             pub first: _T1,
             pub second: _T2,
         }
         pub type pair_first_type<_T1> = _T1;
         pub type pair_second_type<_T2> = _T2;
         #[repr(C)]
-        pub struct atomic<_Tp> {
-            pub _base: (),
-            pub _phantom_0: ::std::marker::PhantomData<_Tp>,
-        }
-        pub type atomic___base = [u8; 0usize];
-        #[repr(C)]
         #[derive(Debug, Copy)]
         pub struct input_iterator_tag {
             pub _address: u8,
         }
         #[test]
         fn bindgen_test_layout_input_iterator_tag() {
             assert_eq!(::std::mem::size_of::<input_iterator_tag>() , 1usize ,
                        concat ! (
@@ -8188,284 +8366,269 @@ pub mod root {
                         , concat ! (
                         "Alignment of " , stringify ! ( input_iterator_tag )
                         ));
         }
         impl Clone for input_iterator_tag {
             fn clone(&self) -> Self { *self }
         }
         #[repr(C)]
-        #[derive(Debug, Copy)]
-        pub struct forward_iterator_tag {
-            pub _address: u8,
-        }
-        #[test]
-        fn bindgen_test_layout_forward_iterator_tag() {
-            assert_eq!(::std::mem::size_of::<forward_iterator_tag>() , 1usize
-                       , concat ! (
-                       "Size of: " , stringify ! ( forward_iterator_tag ) ));
-            assert_eq! (::std::mem::align_of::<forward_iterator_tag>() ,
-                        1usize , concat ! (
-                        "Alignment of " , stringify ! ( forward_iterator_tag )
-                        ));
-        }
-        impl Clone for forward_iterator_tag {
-            fn clone(&self) -> Self { *self }
-        }
-        #[repr(C)]
-        #[derive(Debug, Copy)]
-        pub struct bidirectional_iterator_tag {
-            pub _address: u8,
-        }
-        #[test]
-        fn bindgen_test_layout_bidirectional_iterator_tag() {
-            assert_eq!(::std::mem::size_of::<bidirectional_iterator_tag>() ,
-                       1usize , concat ! (
-                       "Size of: " , stringify ! ( bidirectional_iterator_tag
-                       ) ));
-            assert_eq! (::std::mem::align_of::<bidirectional_iterator_tag>() ,
-                        1usize , concat ! (
-                        "Alignment of " , stringify ! (
-                        bidirectional_iterator_tag ) ));
-        }
-        impl Clone for bidirectional_iterator_tag {
-            fn clone(&self) -> Self { *self }
-        }
-        #[repr(C)]
-        #[derive(Debug, Copy)]
-        pub struct random_access_iterator_tag {
-            pub _address: u8,
-        }
-        #[test]
-        fn bindgen_test_layout_random_access_iterator_tag() {
-            assert_eq!(::std::mem::size_of::<random_access_iterator_tag>() ,
-                       1usize , concat ! (
-                       "Size of: " , stringify ! ( random_access_iterator_tag
-                       ) ));
-            assert_eq! (::std::mem::align_of::<random_access_iterator_tag>() ,
-                        1usize , concat ! (
-                        "Alignment of " , stringify ! (
-                        random_access_iterator_tag ) ));
-        }
-        impl Clone for random_access_iterator_tag {
-            fn clone(&self) -> Self { *self }
-        }
-        #[repr(C)]
         #[derive(Debug, Copy, Clone)]
         pub struct iterator<_Category, _Tp, _Distance, _Pointer, _Reference> {
             pub _address: u8,
             pub _phantom_0: ::std::marker::PhantomData<_Category>,
             pub _phantom_1: ::std::marker::PhantomData<_Tp>,
             pub _phantom_2: ::std::marker::PhantomData<_Distance>,
             pub _phantom_3: ::std::marker::PhantomData<_Pointer>,
             pub _phantom_4: ::std::marker::PhantomData<_Reference>,
         }
+        pub type iterator_iterator_category<_Category> = _Category;
         pub type iterator_value_type<_Tp> = _Tp;
         pub type iterator_difference_type<_Distance> = _Distance;
         pub type iterator_pointer<_Pointer> = _Pointer;
         pub type iterator_reference<_Reference> = _Reference;
-        pub type iterator_iterator_category<_Category> = _Category;
-        #[repr(C)]
-        #[derive(Debug, Copy, Clone)]
-        pub struct __bit_const_reference<_Cp> {
-            pub __seg_: root::std::__bit_const_reference___storage_pointer<_Cp>,
-            pub __mask_: root::std::__bit_const_reference___storage_type<_Cp>,
-        }
-        pub type __bit_const_reference___storage_type<_Cp> = _Cp;
-        pub type __bit_const_reference___storage_pointer<_Cp> = _Cp;
-    }
-    pub type __int64_t = ::std::os::raw::c_longlong;
-    pub type __darwin_va_list = root::__builtin_va_list;
-    pub type __darwin_off_t = root::__int64_t;
-    pub type va_list = root::__darwin_va_list;
-    pub type fpos_t = root::__darwin_off_t;
-    #[repr(C)]
-    #[derive(Debug, Copy)]
-    pub struct __sbuf {
-        pub _base: *mut ::std::os::raw::c_uchar,
-        pub _size: ::std::os::raw::c_int,
-    }
-    #[test]
-    fn bindgen_test_layout___sbuf() {
-        assert_eq!(::std::mem::size_of::<__sbuf>() , 16usize , concat ! (
-                   "Size of: " , stringify ! ( __sbuf ) ));
-        assert_eq! (::std::mem::align_of::<__sbuf>() , 8usize , concat ! (
-                    "Alignment of " , stringify ! ( __sbuf ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sbuf ) ) . _base as * const _ as
-                    usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sbuf ) , "::" ,
-                    stringify ! ( _base ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sbuf ) ) . _size as * const _ as
-                    usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sbuf ) , "::" ,
-                    stringify ! ( _size ) ));
-    }
-    impl Clone for __sbuf {
-        fn clone(&self) -> Self { *self }
-    }
-    #[repr(C)]
-    #[derive(Debug, Copy, Clone)]
-    pub struct __sFILEX([u8; 0]);
-    #[repr(C)]
-    #[derive(Debug, Copy)]
-    pub struct __sFILE {
-        pub _p: *mut ::std::os::raw::c_uchar,
-        pub _r: ::std::os::raw::c_int,
-        pub _w: ::std::os::raw::c_int,
-        pub _flags: ::std::os::raw::c_short,
-        pub _file: ::std::os::raw::c_short,
-        pub _bf: root::__sbuf,
-        pub _lbfsize: ::std::os::raw::c_int,
-        pub _cookie: *mut ::std::os::raw::c_void,
-        pub _close: ::std::option::Option<unsafe extern "C" fn(arg1:
-                                                                   *mut ::std::os::raw::c_void)
-                                              -> ::std::os::raw::c_int>,
-        pub _read: ::std::option::Option<unsafe extern "C" fn(arg1:
-                                                                  *mut ::std::os::raw::c_void,
-                                                              arg2:
-                                                                  *mut ::std::os::raw::c_char,
-                                                              arg3:
-                                                                  ::std::os::raw::c_int)
-                                             -> ::std::os::raw::c_int>,
-        pub _seek: ::std::option::Option<unsafe extern "C" fn(arg1:
-                                                                  *mut ::std::os::raw::c_void,
-                                                              arg2:
-                                                                  root::fpos_t,
-                                                              arg3:
-                                                                  ::std::os::raw::c_int)
-                                             -> ::std::os::raw::c_longlong>,
-        pub _write: ::std::option::Option<unsafe extern "C" fn(arg1:
-                                                                   *mut ::std::os::raw::c_void,
-                                                               arg2:
-                                                                   *const ::std::os::raw::c_char,
-                                                               arg3:
-                                                                   ::std::os::raw::c_int)
-                                              -> ::std::os::raw::c_int>,
-        pub _ub: root::__sbuf,
-        pub _extra: *mut root::__sFILEX,
-        pub _ur: ::std::os::raw::c_int,
-        pub _ubuf: [::std::os::raw::c_uchar; 3usize],
-        pub _nbuf: [::std::os::raw::c_uchar; 1usize],
-        pub _lb: root::__sbuf,
-        pub _blksize: ::std::os::raw::c_int,
-        pub _offset: root::fpos_t,
-    }
-    #[test]
-    fn bindgen_test_layout___sFILE() {
-        assert_eq!(::std::mem::size_of::<__sFILE>() , 152usize , concat ! (
-                   "Size of: " , stringify ! ( __sFILE ) ));
-        assert_eq! (::std::mem::align_of::<__sFILE>() , 8usize , concat ! (
-                    "Alignment of " , stringify ! ( __sFILE ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _p as * const _ as
+        #[repr(C)]
+        #[derive(Debug)]
+        pub struct atomic<_Tp> {
+            pub _M_i: _Tp,
+        }
+        pub mod chrono {
+            #[allow(unused_imports)]
+            use self::super::super::super::root;
+        }
+    }
+    pub mod __gnu_cxx {
+        #[allow(unused_imports)]
+        use self::super::super::root;
+    }
+    pub type __off_t = ::std::os::raw::c_long;
+    pub type __off64_t = ::std::os::raw::c_long;
+    #[repr(C)]
+    #[derive(Debug, Copy)]
+    pub struct _IO_FILE {
+        pub _flags: ::std::os::raw::c_int,
+        pub _IO_read_ptr: *mut ::std::os::raw::c_char,
+        pub _IO_read_end: *mut ::std::os::raw::c_char,
+        pub _IO_read_base: *mut ::std::os::raw::c_char,
+        pub _IO_write_base: *mut ::std::os::raw::c_char,
+        pub _IO_write_ptr: *mut ::std::os::raw::c_char,
+        pub _IO_write_end: *mut ::std::os::raw::c_char,
+        pub _IO_buf_base: *mut ::std::os::raw::c_char,
+        pub _IO_buf_end: *mut ::std::os::raw::c_char,
+        pub _IO_save_base: *mut ::std::os::raw::c_char,
+        pub _IO_backup_base: *mut ::std::os::raw::c_char,
+        pub _IO_save_end: *mut ::std::os::raw::c_char,
+        pub _markers: *mut root::_IO_marker,
+        pub _chain: *mut root::_IO_FILE,
+        pub _fileno: ::std::os::raw::c_int,
+        pub _flags2: ::std::os::raw::c_int,
+        pub _old_offset: root::__off_t,
+        pub _cur_column: ::std::os::raw::c_ushort,
+        pub _vtable_offset: ::std::os::raw::c_char,
+        pub _shortbuf: [::std::os::raw::c_char; 1usize],
+        pub _lock: *mut root::_IO_lock_t,
+        pub _offset: root::__off64_t,
+        pub __pad1: *mut ::std::os::raw::c_void,
+        pub __pad2: *mut ::std::os::raw::c_void,
+        pub __pad3: *mut ::std::os::raw::c_void,
+        pub __pad4: *mut ::std::os::raw::c_void,
+        pub __pad5: usize,
+        pub _mode: ::std::os::raw::c_int,
+        pub _unused2: [::std::os::raw::c_char; 20usize],
+    }
+    #[test]
+    fn bindgen_test_layout__IO_FILE() {
+        assert_eq!(::std::mem::size_of::<_IO_FILE>() , 216usize , concat ! (
+                   "Size of: " , stringify ! ( _IO_FILE ) ));
+        assert_eq! (::std::mem::align_of::<_IO_FILE>() , 8usize , concat ! (
+                    "Alignment of " , stringify ! ( _IO_FILE ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _flags as * const _ as
                     usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _p ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _r as * const _ as
-                    usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _r ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _w as * const _ as
-                    usize } , 12usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _w ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _flags as * const _ as
-                    usize } , 16usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
                     stringify ! ( _flags ) ));
         assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _file as * const _ as
-                    usize } , 18usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _file ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _bf as * const _ as
-                    usize } , 24usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _bf ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _lbfsize as * const _
-                    as usize } , 40usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _lbfsize ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _cookie as * const _ as
-                    usize } , 48usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _cookie ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _close as * const _ as
-                    usize } , 56usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _close ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _read as * const _ as
-                    usize } , 64usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _read ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _seek as * const _ as
-                    usize } , 72usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _seek ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _write as * const _ as
-                    usize } , 80usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _write ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _ub as * const _ as
-                    usize } , 88usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _ub ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _extra as * const _ as
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_read_ptr as *
+                    const _ as usize } , 8usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_read_ptr ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_read_end as *
+                    const _ as usize } , 16usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_read_end ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_read_base as *
+                    const _ as usize } , 24usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_read_base ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_write_base as *
+                    const _ as usize } , 32usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_write_base ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_write_ptr as *
+                    const _ as usize } , 40usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_write_ptr ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_write_end as *
+                    const _ as usize } , 48usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_write_end ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_buf_base as *
+                    const _ as usize } , 56usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_buf_base ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_buf_end as * const
+                    _ as usize } , 64usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_buf_end ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_save_base as *
+                    const _ as usize } , 72usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_save_base ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_backup_base as *
+                    const _ as usize } , 80usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_backup_base ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _IO_save_end as *
+                    const _ as usize } , 88usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _IO_save_end ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _markers as * const _
+                    as usize } , 96usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _markers ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _chain as * const _ as
                     usize } , 104usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _extra ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _ur as * const _ as
-                    usize } , 112usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _ur ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _ubuf as * const _ as
-                    usize } , 116usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _ubuf ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _nbuf as * const _ as
-                    usize } , 119usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _nbuf ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _lb as * const _ as
-                    usize } , 120usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _lb ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _blksize as * const _
-                    as usize } , 136usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
-                    stringify ! ( _blksize ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const __sFILE ) ) . _offset as * const _ as
-                    usize } , 144usize , concat ! (
-                    "Alignment of field: " , stringify ! ( __sFILE ) , "::" ,
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _chain ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _fileno as * const _
+                    as usize } , 112usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _fileno ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _flags2 as * const _
+                    as usize } , 116usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _flags2 ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _old_offset as * const
+                    _ as usize } , 120usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _old_offset ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _cur_column as * const
+                    _ as usize } , 128usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _cur_column ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _vtable_offset as *
+                    const _ as usize } , 130usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _vtable_offset ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _shortbuf as * const _
+                    as usize } , 131usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _shortbuf ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _lock as * const _ as
+                    usize } , 136usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _lock ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _offset as * const _
+                    as usize } , 144usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
                     stringify ! ( _offset ) ));
-    }
-    impl Clone for __sFILE {
-        fn clone(&self) -> Self { *self }
-    }
-    pub type FILE = root::__sFILE;
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . __pad1 as * const _ as
+                    usize } , 152usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( __pad1 ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . __pad2 as * const _ as
+                    usize } , 160usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( __pad2 ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . __pad3 as * const _ as
+                    usize } , 168usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( __pad3 ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . __pad4 as * const _ as
+                    usize } , 176usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( __pad4 ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . __pad5 as * const _ as
+                    usize } , 184usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( __pad5 ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _mode as * const _ as
+                    usize } , 192usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _mode ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_FILE ) ) . _unused2 as * const _
+                    as usize } , 196usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" ,
+                    stringify ! ( _unused2 ) ));
+    }
+    impl Clone for _IO_FILE {
+        fn clone(&self) -> Self { *self }
+    }
+    pub type FILE = root::_IO_FILE;
+    pub type va_list = root::__builtin_va_list;
+    pub type _IO_lock_t = ::std::os::raw::c_void;
+    #[repr(C)]
+    #[derive(Debug, Copy)]
+    pub struct _IO_marker {
+        pub _next: *mut root::_IO_marker,
+        pub _sbuf: *mut root::_IO_FILE,
+        pub _pos: ::std::os::raw::c_int,
+    }
+    #[test]
+    fn bindgen_test_layout__IO_marker() {
+        assert_eq!(::std::mem::size_of::<_IO_marker>() , 24usize , concat ! (
+                   "Size of: " , stringify ! ( _IO_marker ) ));
+        assert_eq! (::std::mem::align_of::<_IO_marker>() , 8usize , concat ! (
+                    "Alignment of " , stringify ! ( _IO_marker ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_marker ) ) . _next as * const _
+                    as usize } , 0usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_marker ) , "::"
+                    , stringify ! ( _next ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_marker ) ) . _sbuf as * const _
+                    as usize } , 8usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_marker ) , "::"
+                    , stringify ! ( _sbuf ) ));
+        assert_eq! (unsafe {
+                    & ( * ( 0 as * const _IO_marker ) ) . _pos as * const _ as
+                    usize } , 16usize , concat ! (
+                    "Alignment of field: " , stringify ! ( _IO_marker ) , "::"
+                    , stringify ! ( _pos ) ));
+    }
+    impl Clone for _IO_marker {
+        fn clone(&self) -> Self { *self }
+    }
     /**
  * MozRefCountType is Mozilla's reference count type.
  *
  * We use the same type to represent the refcount of RefCounted objects
  * as well, in order to be able to use the leak detection facilities
  * that are implemented by XPCOM.
  *
  * Note that this type is not in the mozilla namespace so that it is
@@ -9798,114 +9961,43 @@ pub mod root {
         JS_HASH_KEY_EMPTY = 11,
         JS_ION_ERROR = 12,
         JS_ION_BAILOUT = 13,
         JS_OPTIMIZED_OUT = 14,
         JS_UNINITIALIZED_LEXICAL = 15,
         JS_GENERIC_MAGIC = 16,
         JS_WHY_MAGIC_COUNT = 17,
     }
-    #[repr(C)]
-    #[derive(Debug)]
-    pub struct nsAString_internal {
-        pub mData: *mut root::nsAString_internal_char_type,
-        pub mLength: root::nsAString_internal_size_type,
-        pub mFlags: u32,
-    }
-    pub type nsAString_internal_fallible_t = root::mozilla::fallible_t;
-    pub type nsAString_internal_char_type = u16;
-    pub type nsAString_internal_self_type = root::nsAString_internal;
-    pub type nsAString_internal_abstract_string_type =
-        root::nsAString_internal_self_type;
-    pub type nsAString_internal_base_string_type =
-        root::nsAString_internal_self_type;
-    pub type nsAString_internal_substring_type =
-        root::nsAString_internal_self_type;
-    pub type nsAString_internal_substring_tuple_type = root::nsSubstringTuple;
-    pub type nsAString_internal_string_type = ::nsstring::nsStringRepr;
-    pub type nsAString_internal_const_iterator = root::nsReadingIterator<u16>;
-    pub type nsAString_internal_iterator = root::nsWritingIterator<u16>;
-    pub type nsAString_internal_comparator_type = root::nsStringComparator;
-    pub type nsAString_internal_char_iterator =
-        *mut root::nsAString_internal_char_type;
-    pub type nsAString_internal_const_char_iterator =
-        *const root::nsAString_internal_char_type;
-    pub type nsAString_internal_size_type = u32;
-    pub type nsAString_internal_index_type = u32;
-    pub const nsAString_internal_F_NONE:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_NONE;
-    pub const nsAString_internal_F_TERMINATED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_TERMINATED;
-    pub const nsAString_internal_F_VOIDED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_VOIDED;
-    pub const nsAString_internal_F_SHARED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_SHARED;
-    pub const nsAString_internal_F_OWNED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_OWNED;
-    pub const nsAString_internal_F_FIXED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_FIXED;
-    pub const nsAString_internal_F_LITERAL:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_LITERAL;
-    pub const nsAString_internal_F_CLASS_FIXED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_CLASS_FIXED;
-    #[repr(u32)]
-    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-    pub enum nsAString_internal__bindgen_ty_1 {
-        F_NONE = 0,
-        F_TERMINATED = 1,
-        F_VOIDED = 2,
-        F_SHARED = 4,
-        F_OWNED = 8,
-        F_FIXED = 16,
-        F_LITERAL = 32,
-        F_CLASS_FIXED = 65536,
-    }
-    #[test]
-    fn bindgen_test_layout_nsAString_internal() {
-        assert_eq!(::std::mem::size_of::<nsAString_internal>() , 16usize ,
-                   concat ! ( "Size of: " , stringify ! ( nsAString_internal )
-                   ));
-        assert_eq! (::std::mem::align_of::<nsAString_internal>() , 8usize ,
-                    concat ! (
-                    "Alignment of " , stringify ! ( nsAString_internal ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsAString_internal ) ) . mData as *
-                    const _ as usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsAString_internal
-                    ) , "::" , stringify ! ( mData ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsAString_internal ) ) . mLength as *
-                    const _ as usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsAString_internal
-                    ) , "::" , stringify ! ( mLength ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsAString_internal ) ) . mFlags as *
-                    const _ as usize } , 12usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsAString_internal
-                    ) , "::" , stringify ! ( mFlags ) ));
+    /**
+ * double-byte (char16_t) string types
+ */
+    #[repr(C)]
+    #[derive(Debug)]
+    pub struct nsAString {
+        pub _base: root::mozilla::detail::nsStringRepr,
+    }
+    pub type nsAString_self_type = root::nsAString;
+    #[test]
+    fn bindgen_test_layout_nsAString() {
+        assert_eq!(::std::mem::size_of::<nsAString>() , 16usize , concat ! (
+                   "Size of: " , stringify ! ( nsAString ) ));
+        assert_eq! (::std::mem::align_of::<nsAString>() , 8usize , concat ! (
+                    "Alignment of " , stringify ! ( nsAString ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsSubstringTuple {
         pub mHead: *const root::nsSubstringTuple_self_type,
         pub mFragA: *const root::nsSubstringTuple_base_string_type,
         pub mFragB: *const root::nsSubstringTuple_base_string_type,
     }
     pub type nsSubstringTuple_char_type = u16;
     pub type nsSubstringTuple_self_type = root::nsSubstringTuple;
-    pub type nsSubstringTuple_substring_type = root::nsAString_internal;
-    pub type nsSubstringTuple_base_string_type = root::nsAString_internal;
+    pub type nsSubstringTuple_base_string_type =
+        root::mozilla::detail::nsStringRepr;
     pub type nsSubstringTuple_size_type = u32;
     #[test]
     fn bindgen_test_layout_nsSubstringTuple() {
         assert_eq!(::std::mem::size_of::<nsSubstringTuple>() , 24usize ,
                    concat ! ( "Size of: " , stringify ! ( nsSubstringTuple )
                    ));
         assert_eq! (::std::mem::align_of::<nsSubstringTuple>() , 8usize ,
                     concat ! (
@@ -9927,17 +10019,17 @@ pub mod root {
                     , "::" , stringify ! ( mFragB ) ));
     }
     impl Clone for nsSubstringTuple {
         fn clone(&self) -> Self { *self }
     }
     #[repr(C)]
     pub struct nsAutoString {
         pub _base: root::nsFixedString,
-        pub mStorage: [root::nsAString_internal_char_type; 64usize],
+        pub mStorage: [root::mozilla::detail::nsStringRepr_char_type; 64usize],
     }
     pub type nsAutoString_self_type = root::nsAutoString;
     pub const nsAutoString_kDefaultStorageSize:
               root::nsAutoString__bindgen_ty_1 =
         nsAutoString__bindgen_ty_1::kDefaultStorageSize;
     #[repr(u32)]
     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     pub enum nsAutoString__bindgen_ty_1 { kDefaultStorageSize = 64, }
@@ -9951,17 +10043,17 @@ pub mod root {
                     & ( * ( 0 as * const nsAutoString ) ) . mStorage as *
                     const _ as usize } , 32usize , concat ! (
                     "Alignment of field: " , stringify ! ( nsAutoString ) ,
                     "::" , stringify ! ( mStorage ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsDependentSubstring {
-        pub _base: root::nsAString_internal,
+        pub _base: root::nsAString,
     }
     pub type nsDependentSubstring_self_type = root::nsDependentSubstring;
     #[test]
     fn bindgen_test_layout_nsDependentSubstring() {
         assert_eq!(::std::mem::size_of::<nsDependentSubstring>() , 16usize ,
                    concat ! (
                    "Size of: " , stringify ! ( nsDependentSubstring ) ));
         assert_eq! (::std::mem::align_of::<nsDependentSubstring>() , 8usize ,
@@ -9984,117 +10076,43 @@ pub mod root {
                    ));
         assert_eq! (::std::mem::align_of::<nsStringComparator>() , 8usize ,
                     concat ! (
                     "Alignment of " , stringify ! ( nsStringComparator ) ));
     }
     impl Clone for nsStringComparator {
         fn clone(&self) -> Self { *self }
     }
-    #[repr(C)]
-    #[derive(Debug)]
-    pub struct nsACString_internal {
-        pub mData: *mut root::nsACString_internal_char_type,
-        pub mLength: root::nsACString_internal_size_type,
-        pub mFlags: u32,
-    }
-    pub type nsACString_internal_fallible_t = root::mozilla::fallible_t;
-    pub type nsACString_internal_char_type = ::std::os::raw::c_char;
-    pub type nsACString_internal_self_type = root::nsACString_internal;
-    pub type nsACString_internal_abstract_string_type =
-        root::nsACString_internal_self_type;
-    pub type nsACString_internal_base_string_type =
-        root::nsACString_internal_self_type;
-    pub type nsACString_internal_substring_type =
-        root::nsACString_internal_self_type;
-    pub type nsACString_internal_substring_tuple_type =
-        root::nsCSubstringTuple;
-    pub type nsACString_internal_string_type = root::nsCString;
-    pub type nsACString_internal_const_iterator =
-        root::nsReadingIterator<::std::os::raw::c_char>;
-    pub type nsACString_internal_iterator =
-        root::nsWritingIterator<::std::os::raw::c_char>;
-    pub type nsACString_internal_comparator_type = root::nsCStringComparator;
-    pub type nsACString_internal_char_iterator =
-        *mut root::nsACString_internal_char_type;
-    pub type nsACString_internal_const_char_iterator =
-        *const root::nsACString_internal_char_type;
-    pub type nsACString_internal_size_type = u32;
-    pub type nsACString_internal_index_type = u32;
-    pub const nsACString_internal_F_NONE:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_NONE;
-    pub const nsACString_internal_F_TERMINATED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_TERMINATED;
-    pub const nsACString_internal_F_VOIDED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_VOIDED;
-    pub const nsACString_internal_F_SHARED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_SHARED;
-    pub const nsACString_internal_F_OWNED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_OWNED;
-    pub const nsACString_internal_F_FIXED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_FIXED;
-    pub const nsACString_internal_F_LITERAL:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_LITERAL;
-    pub const nsACString_internal_F_CLASS_FIXED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_CLASS_FIXED;
-    #[repr(u32)]
-    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-    pub enum nsACString_internal__bindgen_ty_1 {
-        F_NONE = 0,
-        F_TERMINATED = 1,
-        F_VOIDED = 2,
-        F_SHARED = 4,
-        F_OWNED = 8,
-        F_FIXED = 16,
-        F_LITERAL = 32,
-        F_CLASS_FIXED = 65536,
-    }
-    #[test]
-    fn bindgen_test_layout_nsACString_internal() {
-        assert_eq!(::std::mem::size_of::<nsACString_internal>() , 16usize ,
-                   concat ! (
-                   "Size of: " , stringify ! ( nsACString_internal ) ));
-        assert_eq! (::std::mem::align_of::<nsACString_internal>() , 8usize ,
-                    concat ! (
-                    "Alignment of " , stringify ! ( nsACString_internal ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsACString_internal ) ) . mData as *
-                    const _ as usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsACString_internal
-                    ) , "::" , stringify ! ( mData ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsACString_internal ) ) . mLength as
-                    * const _ as usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsACString_internal
-                    ) , "::" , stringify ! ( mLength ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsACString_internal ) ) . mFlags as *
-                    const _ as usize } , 12usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsACString_internal
-                    ) , "::" , stringify ! ( mFlags ) ));
+    /**
+ * single-byte (char) string types
+ */
+    #[repr(C)]
+    #[derive(Debug)]
+    pub struct nsACString {
+        pub _base: root::mozilla::detail::nsCStringRepr,
+    }
+    pub type nsACString_self_type = root::nsACString;
+    #[test]
+    fn bindgen_test_layout_nsACString() {
+        assert_eq!(::std::mem::size_of::<nsACString>() , 16usize , concat ! (
+                   "Size of: " , stringify ! ( nsACString ) ));
+        assert_eq! (::std::mem::align_of::<nsACString>() , 8usize , concat ! (
+                    "Alignment of " , stringify ! ( nsACString ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsCSubstringTuple {
         pub mHead: *const root::nsCSubstringTuple_self_type,
         pub mFragA: *const root::nsCSubstringTuple_base_string_type,
         pub mFragB: *const root::nsCSubstringTuple_base_string_type,
     }
     pub type nsCSubstringTuple_char_type = ::std::os::raw::c_char;
     pub type nsCSubstringTuple_self_type = root::nsCSubstringTuple;
-    pub type nsCSubstringTuple_substring_type = root::nsACString_internal;
-    pub type nsCSubstringTuple_base_string_type = root::nsACString_internal;
+    pub type nsCSubstringTuple_base_string_type =
+        root::mozilla::detail::nsCStringRepr;
     pub type nsCSubstringTuple_size_type = u32;
     #[test]
     fn bindgen_test_layout_nsCSubstringTuple() {
         assert_eq!(::std::mem::size_of::<nsCSubstringTuple>() , 24usize ,
                    concat ! ( "Size of: " , stringify ! ( nsCSubstringTuple )
                    ));
         assert_eq! (::std::mem::align_of::<nsCSubstringTuple>() , 8usize ,
                     concat ! (
@@ -10116,17 +10134,17 @@ pub mod root {
                     , "::" , stringify ! ( mFragB ) ));
     }
     impl Clone for nsCSubstringTuple {
         fn clone(&self) -> Self { *self }
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsCString {
-        pub _base: root::nsACString_internal,
+        pub _base: root::nsACString,
     }
     pub type nsCString_self_type = root::nsCString;
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsCString_Segment {
         pub mBegin: u32,
         pub mLength: u32,
     }
@@ -10157,17 +10175,17 @@ pub mod root {
         assert_eq!(::std::mem::size_of::<nsCString>() , 16usize , concat ! (
                    "Size of: " , stringify ! ( nsCString ) ));
         assert_eq! (::std::mem::align_of::<nsCString>() , 8usize , concat ! (
                     "Alignment of " , stringify ! ( nsCString ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsDependentCSubstring {
-        pub _base: root::nsACString_internal,
+        pub _base: root::nsACString,
     }
     pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring;
     #[test]
     fn bindgen_test_layout_nsDependentCSubstring() {
         assert_eq!(::std::mem::size_of::<nsDependentCSubstring>() , 16usize ,
                    concat ! (
                    "Size of: " , stringify ! ( nsDependentCSubstring ) ));
         assert_eq! (::std::mem::align_of::<nsDependentCSubstring>() , 8usize ,
@@ -10194,17 +10212,17 @@ pub mod root {
                     "Alignment of " , stringify ! ( nsCStringComparator ) ));
     }
     impl Clone for nsCStringComparator {
         fn clone(&self) -> Self { *self }
     }
     /**
  * typedefs for backwards compatibility
  */
-    pub type nsSubstring = root::nsAString_internal;
+    pub type nsSubstring = root::nsAString;
     pub type nsAFlatCString = root::nsCString;
     #[repr(C)]
     pub struct nsISupports__bindgen_vtable {
     }
     /**
  * Basic component object model interface. Objects which implement
  * this interface support runtime interface discovery (QueryInterface)
  * and a reference counted memory model (AddRef/Release). This is
@@ -10330,26 +10348,26 @@ pub mod root {
     pub type nsWritingIterator_difference_type = isize;
     pub type nsWritingIterator_size_type = usize;
     pub type nsWritingIterator_value_type<CharT> = CharT;
     pub type nsWritingIterator_pointer<CharT> = *mut CharT;
     pub type nsWritingIterator_reference = [u8; 0usize];
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsSubstringSplitter {
-        pub mStr: *const root::nsAString_internal,
+        pub mStr: *const root::nsAString,
         pub mArray: root::mozilla::UniquePtr<[root::nsDependentSubstring; 0usize],
                                              root::mozilla::DefaultDelete<[root::nsDependentSubstring; 0usize]>>,
         pub mArraySize: root::nsSubstringSplitter_size_type,
         pub mDelim: root::nsSubstringSplitter_char_type,
     }
     pub type nsSubstringSplitter_size_type =
-        root::nsAString_internal_size_type;
+        root::mozilla::detail::nsStringRepr_size_type;
     pub type nsSubstringSplitter_char_type =
-        root::nsAString_internal_char_type;
+        root::mozilla::detail::nsStringRepr_char_type;
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsSubstringSplitter_nsTSubstringSplit_Iter {
         pub mObj: *const root::nsSubstringSplitter,
         pub mPos: root::nsSubstringSplitter_size_type,
     }
     #[test]
     fn bindgen_test_layout_nsSubstringSplitter_nsTSubstringSplit_Iter() {
@@ -10408,26 +10426,26 @@ pub mod root {
                     & ( * ( 0 as * const nsSubstringSplitter ) ) . mDelim as *
                     const _ as usize } , 20usize , concat ! (
                     "Alignment of field: " , stringify ! ( nsSubstringSplitter
                     ) , "::" , stringify ! ( mDelim ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsCSubstringSplitter {
-        pub mStr: *const root::nsACString_internal,
+        pub mStr: *const root::nsACString,
         pub mArray: root::mozilla::UniquePtr<[root::nsDependentCSubstring; 0usize],
                                              root::mozilla::DefaultDelete<[root::nsDependentCSubstring; 0usize]>>,
         pub mArraySize: root::nsCSubstringSplitter_size_type,
         pub mDelim: root::nsCSubstringSplitter_char_type,
     }
     pub type nsCSubstringSplitter_size_type =
-        root::nsACString_internal_size_type;
+        root::mozilla::detail::nsCStringRepr_size_type;
     pub type nsCSubstringSplitter_char_type =
-        root::nsACString_internal_char_type;
+        root::mozilla::detail::nsCStringRepr_char_type;
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsCSubstringSplitter_nsTSubstringSplit_Iter {
         pub mObj: *const root::nsCSubstringSplitter,
         pub mPos: root::nsCSubstringSplitter_size_type,
     }
     #[test]
     fn bindgen_test_layout_nsCSubstringSplitter_nsTSubstringSplit_Iter() {
@@ -10488,18 +10506,18 @@ pub mod root {
                     * const _ as usize } , 20usize , concat ! (
                     "Alignment of field: " , stringify ! (
                     nsCSubstringSplitter ) , "::" , stringify ! ( mDelim ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsFixedString {
         pub _base: ::nsstring::nsStringRepr,
-        pub mFixedCapacity: root::nsAString_internal_size_type,
-        pub mFixedBuf: *mut root::nsAString_internal_char_type,
+        pub mFixedCapacity: root::mozilla::detail::nsStringRepr_size_type,
+        pub mFixedBuf: *mut root::mozilla::detail::nsStringRepr_char_type,
     }
     pub type nsFixedString_self_type = root::nsFixedString;
     pub type nsFixedString_fixed_string_type = root::nsFixedString;
     #[test]
     fn bindgen_test_layout_nsFixedString() {
         assert_eq!(::std::mem::size_of::<nsFixedString>() , 32usize , concat !
                    ( "Size of: " , stringify ! ( nsFixedString ) ));
         assert_eq! (::std::mem::align_of::<nsFixedString>() , 8usize , concat
@@ -15615,73 +15633,73 @@ pub mod root {
                     & ( * ( 0 as * const nsNodeWeakReference ) ) . mNode as *
                     const _ as usize } , 24usize , concat ! (
                     "Alignment of field: " , stringify ! ( nsNodeWeakReference
                     ) , "::" , stringify ! ( mNode ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy, Clone)]
     pub struct nsDOMMutationObserver([u8; 0]);
-    pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_LISTENERMANAGER;
-    pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_PROPERTIES;
-    pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_ANONYMOUS_ROOT;
-    pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
-    pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_NATIVE_ANONYMOUS_ROOT;
-    pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_FORCE_XBL_BINDINGS;
-    pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_MAY_BE_IN_BINDING_MNGR;
-    pub const NODE_IS_EDITABLE: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_EDITABLE;
-    pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_NATIVE_ANONYMOUS;
-    pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_IN_SHADOW_TREE;
-    pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_EMPTY_SELECTOR;
-    pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_SLOW_SELECTOR;
-    pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_EDGE_CHILD_SELECTOR;
-    pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
-    pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_ALL_SELECTOR_FLAGS;
-    pub const NODE_NEEDS_FRAME: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_NEEDS_FRAME;
-    pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_DESCENDANTS_NEED_FRAMES;
-    pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_ACCESSKEY;
-    pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_DIRECTION_RTL;
-    pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_DIRECTION_LTR;
-    pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_ALL_DIRECTION_FLAGS;
-    pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_CHROME_ONLY_ACCESS;
-    pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
-    pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_SHARED_RESTYLE_BIT_1;
-    pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_SHARED_RESTYLE_BIT_2;
-    pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_SHARED_RESTYLE_BIT_1;
-    pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_TYPE_SPECIFIC_BITS_OFFSET;
-    #[repr(u32)]
-    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-    pub enum _bindgen_ty_28 {
+    pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_LISTENERMANAGER;
+    pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_PROPERTIES;
+    pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_IS_ANONYMOUS_ROOT;
+    pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
+    pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_IS_NATIVE_ANONYMOUS_ROOT;
+    pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_FORCE_XBL_BINDINGS;
+    pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_MAY_BE_IN_BINDING_MNGR;
+    pub const NODE_IS_EDITABLE: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_IS_EDITABLE;
+    pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_IS_NATIVE_ANONYMOUS;
+    pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_IS_IN_SHADOW_TREE;
+    pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_EMPTY_SELECTOR;
+    pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_SLOW_SELECTOR;
+    pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_EDGE_CHILD_SELECTOR;
+    pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
+    pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_ALL_SELECTOR_FLAGS;
+    pub const NODE_NEEDS_FRAME: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_NEEDS_FRAME;
+    pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_DESCENDANTS_NEED_FRAMES;
+    pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_ACCESSKEY;
+    pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_DIRECTION_RTL;
+    pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_HAS_DIRECTION_LTR;
+    pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_ALL_DIRECTION_FLAGS;
+    pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_CHROME_ONLY_ACCESS;
+    pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
+    pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_SHARED_RESTYLE_BIT_1;
+    pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_SHARED_RESTYLE_BIT_2;
+    pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_SHARED_RESTYLE_BIT_1;
+    pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_118 =
+        _bindgen_ty_118::NODE_TYPE_SPECIFIC_BITS_OFFSET;
+    #[repr(u32)]
+    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+    pub enum _bindgen_ty_118 {
         NODE_HAS_LISTENERMANAGER = 4,
         NODE_HAS_PROPERTIES = 8,
         NODE_IS_ANONYMOUS_ROOT = 16,
         NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE = 32,
         NODE_IS_NATIVE_ANONYMOUS_ROOT = 64,
         NODE_FORCE_XBL_BINDINGS = 128,
         NODE_MAY_BE_IN_BINDING_MNGR = 256,
         NODE_IS_EDITABLE = 512,
@@ -25813,46 +25831,47 @@ pub mod root {
                     "Alignment of field: " , stringify ! ( LookAndFeelInt ) ,
                     "::" , stringify ! ( value ) ));
     }
     impl Clone for LookAndFeelInt {
         fn clone(&self) -> Self { *self }
     }
     #[repr(C)]
     #[derive(Debug, Copy, Clone)]
+    pub struct RawServoStyleSet([u8; 0]);
+    #[repr(C)]
+    #[derive(Debug, Copy, Clone)]
     pub struct RawServoAnimationValue([u8; 0]);
     #[repr(C)]
     #[derive(Debug, Copy, Clone)]
-    pub struct RawServoStyleSet([u8; 0]);
+    pub struct RawServoAnimationValueMap([u8; 0]);
     pub type RawGeckoNode = root::nsINode;
     pub type RawGeckoElement = root::mozilla::dom::Element;
     pub type RawGeckoDocument = root::nsIDocument;
     pub type RawGeckoPresContext = root::nsPresContext;
     pub type RawGeckoKeyframeList = root::nsTArray<root::mozilla::Keyframe>;
     pub type RawGeckoComputedKeyframeValuesList =
         root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>;
     pub type RawGeckoAnimationValueList =
         root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>;
-    pub type RawServoAnimationValueBorrowedList =
-        root::nsTArray<*const root::RawServoAnimationValue>;
     pub type RawGeckoStyleAnimationList =
         root::nsStyleAutoArray<root::mozilla::StyleAnimation>;
+    pub type RawServoAnimationValueMapBorrowed =
+        *const 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;
     pub type RawGeckoPresContextOwned = *mut root::RawGeckoPresContext;
     pub type RawGeckoPresContextBorrowed = *const root::RawGeckoPresContext;
     pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
     pub type RawGeckoAnimationValueListBorrowedMut =
         *mut root::RawGeckoAnimationValueList;
-    pub type RawServoAnimationValueBorrowedListBorrowed =
-        *const root::RawServoAnimationValueBorrowedList;
     pub type RawGeckoKeyframeListBorrowedMut =
         *mut root::RawGeckoKeyframeList;
     pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList;
     pub type RawGeckoComputedKeyframeValuesListBorrowedMut =
         *mut root::RawGeckoComputedKeyframeValuesList;
     pub type RawGeckoStyleAnimationListBorrowed =
         *const root::RawGeckoStyleAnimationList;
     #[repr(C)]
--- a/servo/components/style/gecko_bindings/structs_release.rs
+++ b/servo/components/style/gecko_bindings/structs_release.rs
@@ -1439,16 +1439,202 @@ pub mod root {
             pub struct LinkedListElementTraits<T> {
                 pub _address: u8,
                 pub _phantom_0: ::std::marker::PhantomData<T>,
             }
             pub type LinkedListElementTraits_RawType<T> = *mut T;
             pub type LinkedListElementTraits_ConstRawType<T> = *mut T;
             pub type LinkedListElementTraits_ClientType<T> = *mut T;
             pub type LinkedListElementTraits_ConstClientType<T> = *mut T;
+            #[repr(C)]
+            #[derive(Debug, Copy)]
+            pub struct nsStringRepr {
+                pub mData: *mut root::mozilla::detail::nsStringRepr_char_type,
+                pub mLength: root::mozilla::detail::nsStringRepr_size_type,
+                pub mFlags: u32,
+            }
+            pub type nsStringRepr_fallible_t = root::mozilla::fallible_t;
+            pub type nsStringRepr_char_type = u16;
+            pub type nsStringRepr_self_type =
+                root::mozilla::detail::nsStringRepr;
+            pub type nsStringRepr_base_string_type =
+                root::mozilla::detail::nsStringRepr_self_type;
+            pub type nsStringRepr_substring_type = root::nsAString;
+            pub type nsStringRepr_substring_tuple_type =
+                root::nsSubstringTuple;
+            pub type nsStringRepr_string_type = ::nsstring::nsStringRepr;
+            pub type nsStringRepr_const_iterator =
+                root::nsReadingIterator<u16>;
+            pub type nsStringRepr_iterator = root::nsWritingIterator<u16>;
+            pub type nsStringRepr_comparator_type = root::nsStringComparator;
+            pub type nsStringRepr_char_iterator =
+                *mut root::mozilla::detail::nsStringRepr_char_type;
+            pub type nsStringRepr_const_char_iterator =
+                *const root::mozilla::detail::nsStringRepr_char_type;
+            pub type nsStringRepr_index_type = u32;
+            pub type nsStringRepr_size_type = u32;
+            pub const nsStringRepr_F_NONE:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_NONE;
+            pub const nsStringRepr_F_TERMINATED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_TERMINATED;
+            pub const nsStringRepr_F_VOIDED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_VOIDED;
+            pub const nsStringRepr_F_SHARED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_SHARED;
+            pub const nsStringRepr_F_OWNED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_OWNED;
+            pub const nsStringRepr_F_FIXED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_FIXED;
+            pub const nsStringRepr_F_LITERAL:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_LITERAL;
+            pub const nsStringRepr_F_CLASS_FIXED:
+                      root::mozilla::detail::nsStringRepr__bindgen_ty_1 =
+                nsStringRepr__bindgen_ty_1::F_CLASS_FIXED;
+            #[repr(u32)]
+            #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+            pub enum nsStringRepr__bindgen_ty_1 {
+                F_NONE = 0,
+                F_TERMINATED = 1,
+                F_VOIDED = 2,
+                F_SHARED = 4,
+                F_OWNED = 8,
+                F_FIXED = 16,
+                F_LITERAL = 32,
+                F_CLASS_FIXED = 65536,
+            }
+            #[test]
+            fn bindgen_test_layout_nsStringRepr() {
+                assert_eq!(::std::mem::size_of::<nsStringRepr>() , 16usize ,
+                           concat ! (
+                           "Size of: " , stringify ! ( nsStringRepr ) ));
+                assert_eq! (::std::mem::align_of::<nsStringRepr>() , 8usize ,
+                            concat ! (
+                            "Alignment of " , stringify ! ( nsStringRepr ) ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsStringRepr ) ) . mData as *
+                            const _ as usize } , 0usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsStringRepr ) , "::" , stringify ! ( mData ) ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsStringRepr ) ) . mLength as
+                            * const _ as usize } , 8usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsStringRepr ) , "::" , stringify ! ( mLength )
+                            ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsStringRepr ) ) . mFlags as
+                            * const _ as usize } , 12usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsStringRepr ) , "::" , stringify ! ( mFlags ) ));
+            }
+            impl Clone for nsStringRepr {
+                fn clone(&self) -> Self { *self }
+            }
+            #[repr(C)]
+            #[derive(Debug, Copy)]
+            pub struct nsCStringRepr {
+                pub mData: *mut root::mozilla::detail::nsCStringRepr_char_type,
+                pub mLength: root::mozilla::detail::nsCStringRepr_size_type,
+                pub mFlags: u32,
+            }
+            pub type nsCStringRepr_fallible_t = root::mozilla::fallible_t;
+            pub type nsCStringRepr_char_type = ::std::os::raw::c_char;
+            pub type nsCStringRepr_self_type =
+                root::mozilla::detail::nsCStringRepr;
+            pub type nsCStringRepr_base_string_type =
+                root::mozilla::detail::nsCStringRepr_self_type;
+            pub type nsCStringRepr_substring_type = root::nsACString;
+            pub type nsCStringRepr_substring_tuple_type =
+                root::nsCSubstringTuple;
+            pub type nsCStringRepr_string_type = root::nsCString;
+            pub type nsCStringRepr_const_iterator =
+                root::nsReadingIterator<::std::os::raw::c_char>;
+            pub type nsCStringRepr_iterator =
+                root::nsWritingIterator<::std::os::raw::c_char>;
+            pub type nsCStringRepr_comparator_type =
+                root::nsCStringComparator;
+            pub type nsCStringRepr_char_iterator =
+                *mut root::mozilla::detail::nsCStringRepr_char_type;
+            pub type nsCStringRepr_const_char_iterator =
+                *const root::mozilla::detail::nsCStringRepr_char_type;
+            pub type nsCStringRepr_index_type = u32;
+            pub type nsCStringRepr_size_type = u32;
+            pub const nsCStringRepr_F_NONE:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_NONE;
+            pub const nsCStringRepr_F_TERMINATED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_TERMINATED;
+            pub const nsCStringRepr_F_VOIDED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_VOIDED;
+            pub const nsCStringRepr_F_SHARED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_SHARED;
+            pub const nsCStringRepr_F_OWNED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_OWNED;
+            pub const nsCStringRepr_F_FIXED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_FIXED;
+            pub const nsCStringRepr_F_LITERAL:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_LITERAL;
+            pub const nsCStringRepr_F_CLASS_FIXED:
+                      root::mozilla::detail::nsCStringRepr__bindgen_ty_1 =
+                nsCStringRepr__bindgen_ty_1::F_CLASS_FIXED;
+            #[repr(u32)]
+            #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+            pub enum nsCStringRepr__bindgen_ty_1 {
+                F_NONE = 0,
+                F_TERMINATED = 1,
+                F_VOIDED = 2,
+                F_SHARED = 4,
+                F_OWNED = 8,
+                F_FIXED = 16,
+                F_LITERAL = 32,
+                F_CLASS_FIXED = 65536,
+            }
+            #[test]
+            fn bindgen_test_layout_nsCStringRepr() {
+                assert_eq!(::std::mem::size_of::<nsCStringRepr>() , 16usize ,
+                           concat ! (
+                           "Size of: " , stringify ! ( nsCStringRepr ) ));
+                assert_eq! (::std::mem::align_of::<nsCStringRepr>() , 8usize ,
+                            concat ! (
+                            "Alignment of " , stringify ! ( nsCStringRepr )
+                            ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsCStringRepr ) ) . mData as
+                            * const _ as usize } , 0usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsCStringRepr ) , "::" , stringify ! ( mData ) ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsCStringRepr ) ) . mLength
+                            as * const _ as usize } , 8usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsCStringRepr ) , "::" , stringify ! ( mLength )
+                            ));
+                assert_eq! (unsafe {
+                            & ( * ( 0 as * const nsCStringRepr ) ) . mFlags as
+                            * const _ as usize } , 12usize , concat ! (
+                            "Alignment of field: " , stringify ! (
+                            nsCStringRepr ) , "::" , stringify ! ( mFlags )
+                            ));
+            }
+            impl Clone for nsCStringRepr {
+                fn clone(&self) -> Self { *self }
+            }
         }
         pub type MallocSizeOf =
             ::std::option::Option<unsafe extern "C" fn(p:
                                                            *const ::std::os::raw::c_void)
                                       -> ::std::os::raw::c_ulong>;
         #[repr(C)]
         #[derive(Debug)]
         pub struct OwningNonNull<T> {
@@ -1985,20 +2171,20 @@ pub mod root {
                                ));
                     assert_eq! (::std::mem::align_of::<FastErrorResult>() ,
                                 8usize , concat ! (
                                 "Alignment of " , stringify ! (
                                 FastErrorResult ) ));
                 }
                 #[repr(C)]
                 pub struct FakeString {
-                    pub mData: *mut root::nsAString_internal_char_type,
-                    pub mLength: root::nsAString_internal_size_type,
+                    pub mData: *mut root::mozilla::detail::nsStringRepr_char_type,
+                    pub mLength: root::mozilla::detail::nsStringRepr_size_type,
                     pub mFlags: u32,
-                    pub mInlineStorage: [root::nsAString_internal_char_type; 64usize],
+                    pub mInlineStorage: [root::mozilla::detail::nsStringRepr_char_type; 64usize],
                 }
                 #[repr(C)]
                 #[derive(Debug)]
                 pub struct FakeString_StringAsserter {
                     pub _base: ::nsstring::nsStringRepr,
                 }
                 #[test]
                 fn bindgen_test_layout_FakeString_StringAsserter() {
@@ -2933,17 +3119,17 @@ pub mod root {
             }
             #[repr(C)]
             #[derive(Debug)]
             pub struct NodeInfo_NodeInfoInner {
                 pub mName: root::nsCOMPtr<root::nsIAtom>,
                 pub mPrefix: root::nsCOMPtr<root::nsIAtom>,
                 pub mNamespaceID: i32,
                 pub mNodeType: u16,
-                pub mNameString: *const root::nsAString_internal,
+                pub mNameString: *const root::nsAString,
                 pub mExtraName: root::nsCOMPtr<root::nsIAtom>,
             }
             #[test]
             fn bindgen_test_layout_NodeInfo_NodeInfoInner() {
                 assert_eq!(::std::mem::size_of::<NodeInfo_NodeInfoInner>() ,
                            40usize , concat ! (
                            "Size of: " , stringify ! ( NodeInfo_NodeInfoInner
                            ) ));
@@ -4079,16 +4265,17 @@ pub mod root {
                 pub _base: root::nsISupports,
                 pub _base_1: root::nsWrapperCache,
                 pub mRefCnt: root::nsCycleCollectingAutoRefCnt,
                 pub mOwner: root::nsCOMPtr<root::nsISupports>,
                 pub mTime: root::DOMHighResTimeStamp,
                 pub mRootBounds: root::RefPtr<root::mozilla::dom::DOMRect>,
                 pub mBoundingClientRect: root::RefPtr<root::mozilla::dom::DOMRect>,
                 pub mIntersectionRect: root::RefPtr<root::mozilla::dom::DOMRect>,
+                pub mIsIntersecting: bool,
                 pub mTarget: root::RefPtr<root::mozilla::dom::Element>,
                 pub mIntersectionRatio: f64,
             }
             pub type DOMIntersectionObserverEntry_HasThreadSafeRefCnt =
                 root::mozilla::FalseType;
             #[repr(C)]
             #[derive(Debug, Copy)]
             pub struct DOMIntersectionObserverEntry_cycleCollection {
@@ -4113,17 +4300,17 @@ pub mod root {
                       "_ZN7mozilla3dom28DOMIntersectionObserverEntry21_cycleCollectorGlobalE"]
                 pub static mut
                            DOMIntersectionObserverEntry__cycleCollectorGlobal:
                            root::mozilla::dom::DOMIntersectionObserverEntry_cycleCollection;
             }
             #[test]
             fn bindgen_test_layout_DOMIntersectionObserverEntry() {
                 assert_eq!(::std::mem::size_of::<DOMIntersectionObserverEntry>()
-                           , 96usize , concat ! (
+                           , 104usize , concat ! (
                            "Size of: " , stringify ! (
                            DOMIntersectionObserverEntry ) ));
                 assert_eq! (::std::mem::align_of::<DOMIntersectionObserverEntry>()
                             , 8usize , concat ! (
                             "Alignment of " , stringify ! (
                             DOMIntersectionObserverEntry ) ));
             }
             #[repr(C)]
@@ -7834,19 +8021,16 @@ pub mod root {
                         "Alignment of " , stringify ! ( StyleAnimationValue )
                         ));
         }
         impl Clone for StyleAnimationValue {
             fn clone(&self) -> Self { *self }
         }
         #[repr(C)]
         #[derive(Debug, Copy, Clone)]
-        pub struct ServoAnimationRule([u8; 0]);
-        #[repr(C)]
-        #[derive(Debug, Copy, Clone)]
         pub struct AnimationPerformanceWarning([u8; 0]);
         pub type CSSPseudoClassTypeBase = u8;
         #[repr(u8)]
         #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
         pub enum CSSPseudoClassType {
             empty = 0,
             mozOnlyWhitespace = 1,
             mozEmptyExceptChildrenWithLocalname = 2,
@@ -7976,22 +8160,16 @@ pub mod root {
         #[derive(Debug, Copy, Clone)]
         pub struct pair<_T1, _T2> {
             pub first: _T1,
             pub second: _T2,
         }
         pub type pair_first_type<_T1> = _T1;
         pub type pair_second_type<_T2> = _T2;
         #[repr(C)]
-        pub struct atomic<_Tp> {
-            pub _base: (),
-            pub _phantom_0: ::std::marker::PhantomData<_Tp>,
-        }
-        pub type atomic___base = [u8; 0usize];
-        #[repr(C)]
         #[derive(Debug, Copy)]
         pub struct input_iterator_tag {
             pub _address: u8,
         }
         #[test]
         fn bindgen_test_layout_input_iterator_tag() {
             assert_eq!(::std::mem::size_of::<input_iterator_tag>() , 1usize ,
                        concat ! (
@@ -8000,97 +8178,41 @@ pub mod root {
                         , concat ! (
                         "Alignment of " , stringify ! ( input_iterator_tag )
                         ));
         }
         impl Clone for input_iterator_tag {
             fn clone(&self) -> Self { *self }
         }
         #[repr(C)]
-        #[derive(Debug, Copy)]
-        pub struct forward_iterator_tag {
-            pub _address: u8,
-        }
-        #[test]
-        fn bindgen_test_layout_forward_iterator_tag() {
-            assert_eq!(::std::mem::size_of::<forward_iterator_tag>() , 1usize
-                       , concat ! (
-                       "Size of: " , stringify ! ( forward_iterator_tag ) ));
-            assert_eq! (::std::mem::align_of::<forward_iterator_tag>() ,
-                        1usize , concat ! (
-                        "Alignment of " , stringify ! ( forward_iterator_tag )
-                        ));
-        }
-        impl Clone for forward_iterator_tag {
-            fn clone(&self) -> Self { *self }
-        }
-        #[repr(C)]
-        #[derive(Debug, Copy)]
-        pub struct bidirectional_iterator_tag {
-            pub _address: u8,
-        }
-        #[test]
-        fn bindgen_test_layout_bidirectional_iterator_tag() {
-            assert_eq!(::std::mem::size_of::<bidirectional_iterator_tag>() ,
-                       1usize , concat ! (
-                       "Size of: " , stringify ! ( bidirectional_iterator_tag
-                       ) ));
-            assert_eq! (::std::mem::align_of::<bidirectional_iterator_tag>() ,
-                        1usize , concat ! (
-                        "Alignment of " , stringify ! (
-                        bidirectional_iterator_tag ) ));
-        }
-        impl Clone for bidirectional_iterator_tag {
-            fn clone(&self) -> Self { *self }
-        }
-        #[repr(C)]
-        #[derive(Debug, Copy)]
-        pub struct random_access_iterator_tag {
-            pub _address: u8,
-        }
-        #[test]
-        fn bindgen_test_layout_random_access_iterator_tag() {
-            assert_eq!(::std::mem::size_of::<random_access_iterator_tag>() ,
-                       1usize , concat ! (
-                       "Size of: " , stringify ! ( random_access_iterator_tag
-                       ) ));
-            assert_eq! (::std::mem::align_of::<random_access_iterator_tag>() ,
-                        1usize , concat ! (
-                        "Alignment of " , stringify ! (
-                        random_access_iterator_tag ) ));
-        }
-        impl Clone for random_access_iterator_tag {
-            fn clone(&self) -> Self { *self }
-        }
-        #[repr(C)]
         #[derive(Debug, Copy, Clone)]
         pub struct iterator<_Category, _Tp, _Distance, _Pointer, _Reference> {
             pub _address: u8,
             pub _phantom_0: ::std::marker::PhantomData<_Category>,
             pub _phantom_1: ::std::marker::PhantomData<_Tp>,
             pub _phantom_2: ::std::marker::PhantomData<_Distance>,
             pub _phantom_3: ::std::marker::PhantomData<_Pointer>,
             pub _phantom_4: ::std::marker::PhantomData<_Reference>,
         }
+        pub type iterator_iterator_category<_Category> = _Category;
         pub type iterator_value_type<_Tp> = _Tp;
         pub type iterator_difference_type<_Distance> = _Distance;
         pub type iterator_pointer<_Pointer> = _Pointer;
         pub type iterator_reference<_Reference> = _Reference;
-        pub type iterator_iterator_category<_Category> = _Category;
-        #[repr(C)]
-        #[derive(Debug, Copy, Clone)]
-        pub struct __bit_const_reference<_Cp> {
-            pub __seg_: root::std::__bit_const_reference___storage_pointer<_Cp>,
-            pub __mask_: root::std::__bit_const_reference___storage_type<_Cp>,
-        }
-        pub type __bit_const_reference___storage_type<_Cp> = _Cp;
-        pub type __bit_const_reference___storage_pointer<_Cp> = _Cp;
-    }
-    pub type __darwin_va_list = root::__builtin_va_list;
-    pub type va_list = root::__darwin_va_list;
+        #[repr(C)]
+        #[derive(Debug)]
+        pub struct atomic<_Tp> {
+            pub _M_i: _Tp,
+        }
+    }
+    pub mod __gnu_cxx {
+        #[allow(unused_imports)]
+        use self::super::super::root;
+    }
+    pub type va_list = root::__builtin_va_list;
     /**
  * MozRefCountType is Mozilla's reference count type.
  *
  * We use the same type to represent the refcount of RefCounted objects
  * as well, in order to be able to use the leak detection facilities
  * that are implemented by XPCOM.
  *
  * Note that this type is not in the mozilla namespace so that it is
@@ -9417,114 +9539,43 @@ pub mod root {
         JS_HASH_KEY_EMPTY = 11,
         JS_ION_ERROR = 12,
         JS_ION_BAILOUT = 13,
         JS_OPTIMIZED_OUT = 14,
         JS_UNINITIALIZED_LEXICAL = 15,
         JS_GENERIC_MAGIC = 16,
         JS_WHY_MAGIC_COUNT = 17,
     }
-    #[repr(C)]
-    #[derive(Debug)]
-    pub struct nsAString_internal {
-        pub mData: *mut root::nsAString_internal_char_type,
-        pub mLength: root::nsAString_internal_size_type,
-        pub mFlags: u32,
-    }
-    pub type nsAString_internal_fallible_t = root::mozilla::fallible_t;
-    pub type nsAString_internal_char_type = u16;
-    pub type nsAString_internal_self_type = root::nsAString_internal;
-    pub type nsAString_internal_abstract_string_type =
-        root::nsAString_internal_self_type;
-    pub type nsAString_internal_base_string_type =
-        root::nsAString_internal_self_type;
-    pub type nsAString_internal_substring_type =
-        root::nsAString_internal_self_type;
-    pub type nsAString_internal_substring_tuple_type = root::nsSubstringTuple;
-    pub type nsAString_internal_string_type = ::nsstring::nsStringRepr;
-    pub type nsAString_internal_const_iterator = root::nsReadingIterator<u16>;
-    pub type nsAString_internal_iterator = root::nsWritingIterator<u16>;
-    pub type nsAString_internal_comparator_type = root::nsStringComparator;
-    pub type nsAString_internal_char_iterator =
-        *mut root::nsAString_internal_char_type;
-    pub type nsAString_internal_const_char_iterator =
-        *const root::nsAString_internal_char_type;
-    pub type nsAString_internal_size_type = u32;
-    pub type nsAString_internal_index_type = u32;
-    pub const nsAString_internal_F_NONE:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_NONE;
-    pub const nsAString_internal_F_TERMINATED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_TERMINATED;
-    pub const nsAString_internal_F_VOIDED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_VOIDED;
-    pub const nsAString_internal_F_SHARED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_SHARED;
-    pub const nsAString_internal_F_OWNED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_OWNED;
-    pub const nsAString_internal_F_FIXED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_FIXED;
-    pub const nsAString_internal_F_LITERAL:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_LITERAL;
-    pub const nsAString_internal_F_CLASS_FIXED:
-              root::nsAString_internal__bindgen_ty_1 =
-        nsAString_internal__bindgen_ty_1::F_CLASS_FIXED;
-    #[repr(u32)]
-    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-    pub enum nsAString_internal__bindgen_ty_1 {
-        F_NONE = 0,
-        F_TERMINATED = 1,
-        F_VOIDED = 2,
-        F_SHARED = 4,
-        F_OWNED = 8,
-        F_FIXED = 16,
-        F_LITERAL = 32,
-        F_CLASS_FIXED = 65536,
-    }
-    #[test]
-    fn bindgen_test_layout_nsAString_internal() {
-        assert_eq!(::std::mem::size_of::<nsAString_internal>() , 16usize ,
-                   concat ! ( "Size of: " , stringify ! ( nsAString_internal )
-                   ));
-        assert_eq! (::std::mem::align_of::<nsAString_internal>() , 8usize ,
-                    concat ! (
-                    "Alignment of " , stringify ! ( nsAString_internal ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsAString_internal ) ) . mData as *
-                    const _ as usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsAString_internal
-                    ) , "::" , stringify ! ( mData ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsAString_internal ) ) . mLength as *
-                    const _ as usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsAString_internal
-                    ) , "::" , stringify ! ( mLength ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsAString_internal ) ) . mFlags as *
-                    const _ as usize } , 12usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsAString_internal
-                    ) , "::" , stringify ! ( mFlags ) ));
+    /**
+ * double-byte (char16_t) string types
+ */
+    #[repr(C)]
+    #[derive(Debug)]
+    pub struct nsAString {
+        pub _base: root::mozilla::detail::nsStringRepr,
+    }
+    pub type nsAString_self_type = root::nsAString;
+    #[test]
+    fn bindgen_test_layout_nsAString() {
+        assert_eq!(::std::mem::size_of::<nsAString>() , 16usize , concat ! (
+                   "Size of: " , stringify ! ( nsAString ) ));
+        assert_eq! (::std::mem::align_of::<nsAString>() , 8usize , concat ! (
+                    "Alignment of " , stringify ! ( nsAString ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsSubstringTuple {
         pub mHead: *const root::nsSubstringTuple_self_type,
         pub mFragA: *const root::nsSubstringTuple_base_string_type,
         pub mFragB: *const root::nsSubstringTuple_base_string_type,
     }
     pub type nsSubstringTuple_char_type = u16;
     pub type nsSubstringTuple_self_type = root::nsSubstringTuple;
-    pub type nsSubstringTuple_substring_type = root::nsAString_internal;
-    pub type nsSubstringTuple_base_string_type = root::nsAString_internal;
+    pub type nsSubstringTuple_base_string_type =
+        root::mozilla::detail::nsStringRepr;
     pub type nsSubstringTuple_size_type = u32;
     #[test]
     fn bindgen_test_layout_nsSubstringTuple() {
         assert_eq!(::std::mem::size_of::<nsSubstringTuple>() , 24usize ,
                    concat ! ( "Size of: " , stringify ! ( nsSubstringTuple )
                    ));
         assert_eq! (::std::mem::align_of::<nsSubstringTuple>() , 8usize ,
                     concat ! (
@@ -9546,17 +9597,17 @@ pub mod root {
                     , "::" , stringify ! ( mFragB ) ));
     }
     impl Clone for nsSubstringTuple {
         fn clone(&self) -> Self { *self }
     }
     #[repr(C)]
     pub struct nsAutoString {
         pub _base: root::nsFixedString,
-        pub mStorage: [root::nsAString_internal_char_type; 64usize],
+        pub mStorage: [root::mozilla::detail::nsStringRepr_char_type; 64usize],
     }
     pub type nsAutoString_self_type = root::nsAutoString;
     pub const nsAutoString_kDefaultStorageSize:
               root::nsAutoString__bindgen_ty_1 =
         nsAutoString__bindgen_ty_1::kDefaultStorageSize;
     #[repr(u32)]
     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     pub enum nsAutoString__bindgen_ty_1 { kDefaultStorageSize = 64, }
@@ -9570,17 +9621,17 @@ pub mod root {
                     & ( * ( 0 as * const nsAutoString ) ) . mStorage as *
                     const _ as usize } , 32usize , concat ! (
                     "Alignment of field: " , stringify ! ( nsAutoString ) ,
                     "::" , stringify ! ( mStorage ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsDependentSubstring {
-        pub _base: root::nsAString_internal,
+        pub _base: root::nsAString,
     }
     pub type nsDependentSubstring_self_type = root::nsDependentSubstring;
     #[test]
     fn bindgen_test_layout_nsDependentSubstring() {
         assert_eq!(::std::mem::size_of::<nsDependentSubstring>() , 16usize ,
                    concat ! (
                    "Size of: " , stringify ! ( nsDependentSubstring ) ));
         assert_eq! (::std::mem::align_of::<nsDependentSubstring>() , 8usize ,
@@ -9603,117 +9654,43 @@ pub mod root {
                    ));
         assert_eq! (::std::mem::align_of::<nsStringComparator>() , 8usize ,
                     concat ! (
                     "Alignment of " , stringify ! ( nsStringComparator ) ));
     }
     impl Clone for nsStringComparator {
         fn clone(&self) -> Self { *self }
     }
-    #[repr(C)]
-    #[derive(Debug)]
-    pub struct nsACString_internal {
-        pub mData: *mut root::nsACString_internal_char_type,
-        pub mLength: root::nsACString_internal_size_type,
-        pub mFlags: u32,
-    }
-    pub type nsACString_internal_fallible_t = root::mozilla::fallible_t;
-    pub type nsACString_internal_char_type = ::std::os::raw::c_char;
-    pub type nsACString_internal_self_type = root::nsACString_internal;
-    pub type nsACString_internal_abstract_string_type =
-        root::nsACString_internal_self_type;
-    pub type nsACString_internal_base_string_type =
-        root::nsACString_internal_self_type;
-    pub type nsACString_internal_substring_type =
-        root::nsACString_internal_self_type;
-    pub type nsACString_internal_substring_tuple_type =
-        root::nsCSubstringTuple;
-    pub type nsACString_internal_string_type = root::nsCString;
-    pub type nsACString_internal_const_iterator =
-        root::nsReadingIterator<::std::os::raw::c_char>;
-    pub type nsACString_internal_iterator =
-        root::nsWritingIterator<::std::os::raw::c_char>;
-    pub type nsACString_internal_comparator_type = root::nsCStringComparator;
-    pub type nsACString_internal_char_iterator =
-        *mut root::nsACString_internal_char_type;
-    pub type nsACString_internal_const_char_iterator =
-        *const root::nsACString_internal_char_type;
-    pub type nsACString_internal_size_type = u32;
-    pub type nsACString_internal_index_type = u32;
-    pub const nsACString_internal_F_NONE:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_NONE;
-    pub const nsACString_internal_F_TERMINATED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_TERMINATED;
-    pub const nsACString_internal_F_VOIDED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_VOIDED;
-    pub const nsACString_internal_F_SHARED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_SHARED;
-    pub const nsACString_internal_F_OWNED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_OWNED;
-    pub const nsACString_internal_F_FIXED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_FIXED;
-    pub const nsACString_internal_F_LITERAL:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_LITERAL;
-    pub const nsACString_internal_F_CLASS_FIXED:
-              root::nsACString_internal__bindgen_ty_1 =
-        nsACString_internal__bindgen_ty_1::F_CLASS_FIXED;
-    #[repr(u32)]
-    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-    pub enum nsACString_internal__bindgen_ty_1 {
-        F_NONE = 0,
-        F_TERMINATED = 1,
-        F_VOIDED = 2,
-        F_SHARED = 4,
-        F_OWNED = 8,
-        F_FIXED = 16,
-        F_LITERAL = 32,
-        F_CLASS_FIXED = 65536,
-    }
-    #[test]
-    fn bindgen_test_layout_nsACString_internal() {
-        assert_eq!(::std::mem::size_of::<nsACString_internal>() , 16usize ,
-                   concat ! (
-                   "Size of: " , stringify ! ( nsACString_internal ) ));
-        assert_eq! (::std::mem::align_of::<nsACString_internal>() , 8usize ,
-                    concat ! (
-                    "Alignment of " , stringify ! ( nsACString_internal ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsACString_internal ) ) . mData as *
-                    const _ as usize } , 0usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsACString_internal
-                    ) , "::" , stringify ! ( mData ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsACString_internal ) ) . mLength as
-                    * const _ as usize } , 8usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsACString_internal
-                    ) , "::" , stringify ! ( mLength ) ));
-        assert_eq! (unsafe {
-                    & ( * ( 0 as * const nsACString_internal ) ) . mFlags as *
-                    const _ as usize } , 12usize , concat ! (
-                    "Alignment of field: " , stringify ! ( nsACString_internal
-                    ) , "::" , stringify ! ( mFlags ) ));
+    /**
+ * single-byte (char) string types
+ */
+    #[repr(C)]
+    #[derive(Debug)]
+    pub struct nsACString {
+        pub _base: root::mozilla::detail::nsCStringRepr,
+    }
+    pub type nsACString_self_type = root::nsACString;
+    #[test]
+    fn bindgen_test_layout_nsACString() {
+        assert_eq!(::std::mem::size_of::<nsACString>() , 16usize , concat ! (
+                   "Size of: " , stringify ! ( nsACString ) ));
+        assert_eq! (::std::mem::align_of::<nsACString>() , 8usize , concat ! (
+                    "Alignment of " , stringify ! ( nsACString ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsCSubstringTuple {
         pub mHead: *const root::nsCSubstringTuple_self_type,
         pub mFragA: *const root::nsCSubstringTuple_base_string_type,
         pub mFragB: *const root::nsCSubstringTuple_base_string_type,
     }
     pub type nsCSubstringTuple_char_type = ::std::os::raw::c_char;
     pub type nsCSubstringTuple_self_type = root::nsCSubstringTuple;
-    pub type nsCSubstringTuple_substring_type = root::nsACString_internal;
-    pub type nsCSubstringTuple_base_string_type = root::nsACString_internal;
+    pub type nsCSubstringTuple_base_string_type =
+        root::mozilla::detail::nsCStringRepr;
     pub type nsCSubstringTuple_size_type = u32;
     #[test]
     fn bindgen_test_layout_nsCSubstringTuple() {
         assert_eq!(::std::mem::size_of::<nsCSubstringTuple>() , 24usize ,
                    concat ! ( "Size of: " , stringify ! ( nsCSubstringTuple )
                    ));
         assert_eq! (::std::mem::align_of::<nsCSubstringTuple>() , 8usize ,
                     concat ! (
@@ -9735,17 +9712,17 @@ pub mod root {
                     , "::" , stringify ! ( mFragB ) ));
     }
     impl Clone for nsCSubstringTuple {
         fn clone(&self) -> Self { *self }
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsCString {
-        pub _base: root::nsACString_internal,
+        pub _base: root::nsACString,
     }
     pub type nsCString_self_type = root::nsCString;
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsCString_Segment {
         pub mBegin: u32,
         pub mLength: u32,
     }
@@ -9776,17 +9753,17 @@ pub mod root {
         assert_eq!(::std::mem::size_of::<nsCString>() , 16usize , concat ! (
                    "Size of: " , stringify ! ( nsCString ) ));
         assert_eq! (::std::mem::align_of::<nsCString>() , 8usize , concat ! (
                     "Alignment of " , stringify ! ( nsCString ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsDependentCSubstring {
-        pub _base: root::nsACString_internal,
+        pub _base: root::nsACString,
     }
     pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring;
     #[test]
     fn bindgen_test_layout_nsDependentCSubstring() {
         assert_eq!(::std::mem::size_of::<nsDependentCSubstring>() , 16usize ,
                    concat ! (
                    "Size of: " , stringify ! ( nsDependentCSubstring ) ));
         assert_eq! (::std::mem::align_of::<nsDependentCSubstring>() , 8usize ,
@@ -9813,17 +9790,17 @@ pub mod root {
                     "Alignment of " , stringify ! ( nsCStringComparator ) ));
     }
     impl Clone for nsCStringComparator {
         fn clone(&self) -> Self { *self }
     }
     /**
  * typedefs for backwards compatibility
  */
-    pub type nsSubstring = root::nsAString_internal;
+    pub type nsSubstring = root::nsAString;
     pub type nsAFlatCString = root::nsCString;
     #[repr(C)]
     pub struct nsISupports__bindgen_vtable {
     }
     /**
  * Basic component object model interface. Objects which implement
  * this interface support runtime interface discovery (QueryInterface)
  * and a reference counted memory model (AddRef/Release). This is
@@ -9949,26 +9926,26 @@ pub mod root {
     pub type nsWritingIterator_difference_type = isize;
     pub type nsWritingIterator_size_type = usize;
     pub type nsWritingIterator_value_type<CharT> = CharT;
     pub type nsWritingIterator_pointer<CharT> = *mut CharT;
     pub type nsWritingIterator_reference = [u8; 0usize];
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsSubstringSplitter {
-        pub mStr: *const root::nsAString_internal,
+        pub mStr: *const root::nsAString,
         pub mArray: root::mozilla::UniquePtr<[root::nsDependentSubstring; 0usize],
                                              root::mozilla::DefaultDelete<[root::nsDependentSubstring; 0usize]>>,
         pub mArraySize: root::nsSubstringSplitter_size_type,
         pub mDelim: root::nsSubstringSplitter_char_type,
     }
     pub type nsSubstringSplitter_size_type =
-        root::nsAString_internal_size_type;
+        root::mozilla::detail::nsStringRepr_size_type;
     pub type nsSubstringSplitter_char_type =
-        root::nsAString_internal_char_type;
+        root::mozilla::detail::nsStringRepr_char_type;
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsSubstringSplitter_nsTSubstringSplit_Iter {
         pub mObj: *const root::nsSubstringSplitter,
         pub mPos: root::nsSubstringSplitter_size_type,
     }
     #[test]
     fn bindgen_test_layout_nsSubstringSplitter_nsTSubstringSplit_Iter() {
@@ -10027,26 +10004,26 @@ pub mod root {
                     & ( * ( 0 as * const nsSubstringSplitter ) ) . mDelim as *
                     const _ as usize } , 20usize , concat ! (
                     "Alignment of field: " , stringify ! ( nsSubstringSplitter
                     ) , "::" , stringify ! ( mDelim ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsCSubstringSplitter {
-        pub mStr: *const root::nsACString_internal,
+        pub mStr: *const root::nsACString,
         pub mArray: root::mozilla::UniquePtr<[root::nsDependentCSubstring; 0usize],
                                              root::mozilla::DefaultDelete<[root::nsDependentCSubstring; 0usize]>>,
         pub mArraySize: root::nsCSubstringSplitter_size_type,
         pub mDelim: root::nsCSubstringSplitter_char_type,
     }
     pub type nsCSubstringSplitter_size_type =
-        root::nsACString_internal_size_type;
+        root::mozilla::detail::nsCStringRepr_size_type;
     pub type nsCSubstringSplitter_char_type =
-        root::nsACString_internal_char_type;
+        root::mozilla::detail::nsCStringRepr_char_type;
     #[repr(C)]
     #[derive(Debug, Copy)]
     pub struct nsCSubstringSplitter_nsTSubstringSplit_Iter {
         pub mObj: *const root::nsCSubstringSplitter,
         pub mPos: root::nsCSubstringSplitter_size_type,
     }
     #[test]
     fn bindgen_test_layout_nsCSubstringSplitter_nsTSubstringSplit_Iter() {
@@ -10107,18 +10084,18 @@ pub mod root {
                     * const _ as usize } , 20usize , concat ! (
                     "Alignment of field: " , stringify ! (
                     nsCSubstringSplitter ) , "::" , stringify ! ( mDelim ) ));
     }
     #[repr(C)]
     #[derive(Debug)]
     pub struct nsFixedString {
         pub _base: ::nsstring::nsStringRepr,
-        pub mFixedCapacity: root::nsAString_internal_size_type,
-        pub mFixedBuf: *mut root::nsAString_internal_char_type,
+        pub mFixedCapacity: root::mozilla::detail::nsStringRepr_size_type,
+        pub mFixedBuf: *mut root::mozilla::detail::nsStringRepr_char_type,
     }
     pub type nsFixedString_self_type = root::nsFixedString;
     pub type nsFixedString_fixed_string_type = root::nsFixedString;
     #[test]
     fn bindgen_test_layout_nsFixedString() {
         assert_eq!(::std::mem::size_of::<nsFixedString>() , 32usize , concat !
                    ( "Size of: " , stringify ! ( nsFixedString ) ));
         assert_eq! (::std::mem::align_of::<nsFixedString>() , 8usize , concat
@@ -15083,73 +15060,73 @@ pub mod root {
                     & ( * ( 0 as * const nsNodeWeakReference ) ) . mNode as *
                     const _ as usize } , 16usize , concat ! (
                     "Alignment of field: " , stringify ! ( nsNodeWeakReference
                     ) , "::" , stringify ! ( mNode ) ));
     }
     #[repr(C)]
     #[derive(Debug, Copy, Clone)]
     pub struct nsDOMMutationObserver([u8; 0]);
-    pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_LISTENERMANAGER;
-    pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_PROPERTIES;
-    pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_ANONYMOUS_ROOT;
-    pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
-    pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_NATIVE_ANONYMOUS_ROOT;
-    pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_FORCE_XBL_BINDINGS;
-    pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_MAY_BE_IN_BINDING_MNGR;
-    pub const NODE_IS_EDITABLE: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_EDITABLE;
-    pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_NATIVE_ANONYMOUS;
-    pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_IN_SHADOW_TREE;
-    pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_EMPTY_SELECTOR;
-    pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_SLOW_SELECTOR;
-    pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_EDGE_CHILD_SELECTOR;
-    pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
-    pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_ALL_SELECTOR_FLAGS;
-    pub const NODE_NEEDS_FRAME: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_NEEDS_FRAME;
-    pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_DESCENDANTS_NEED_FRAMES;
-    pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_ACCESSKEY;
-    pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_DIRECTION_RTL;
-    pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_HAS_DIRECTION_LTR;
-    pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_ALL_DIRECTION_FLAGS;
-    pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_CHROME_ONLY_ACCESS;
-    pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
-    pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_SHARED_RESTYLE_BIT_1;
-    pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_SHARED_RESTYLE_BIT_2;
-    pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_SHARED_RESTYLE_BIT_1;
-    pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_28 =
-        _bindgen_ty_28::NODE_TYPE_SPECIFIC_BITS_OFFSET;
-    #[repr(u32)]
-    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-    pub enum _bindgen_ty_28 {
+    pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_LISTENERMANAGER;
+    pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_PROPERTIES;
+    pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_IS_ANONYMOUS_ROOT;
+    pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
+    pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_IS_NATIVE_ANONYMOUS_ROOT;
+    pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_FORCE_XBL_BINDINGS;
+    pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_MAY_BE_IN_BINDING_MNGR;
+    pub const NODE_IS_EDITABLE: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_IS_EDITABLE;
+    pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_IS_NATIVE_ANONYMOUS;
+    pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_IS_IN_SHADOW_TREE;
+    pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_EMPTY_SELECTOR;
+    pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_SLOW_SELECTOR;
+    pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_EDGE_CHILD_SELECTOR;
+    pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
+    pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_ALL_SELECTOR_FLAGS;
+    pub const NODE_NEEDS_FRAME: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_NEEDS_FRAME;
+    pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_DESCENDANTS_NEED_FRAMES;
+    pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_ACCESSKEY;
+    pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_DIRECTION_RTL;
+    pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_HAS_DIRECTION_LTR;
+    pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_ALL_DIRECTION_FLAGS;
+    pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_CHROME_ONLY_ACCESS;
+    pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
+    pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_SHARED_RESTYLE_BIT_1;
+    pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_SHARED_RESTYLE_BIT_2;
+    pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_SHARED_RESTYLE_BIT_1;
+    pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_105 =
+        _bindgen_ty_105::NODE_TYPE_SPECIFIC_BITS_OFFSET;
+    #[repr(u32)]
+    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+    pub enum _bindgen_ty_105 {
         NODE_HAS_LISTENERMANAGER = 4,
         NODE_HAS_PROPERTIES = 8,
         NODE_IS_ANONYMOUS_ROOT = 16,
         NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE = 32,
         NODE_IS_NATIVE_ANONYMOUS_ROOT = 64,
         NODE_FORCE_XBL_BINDINGS = 128,
         NODE_MAY_BE_IN_BINDING_MNGR = 256,
         NODE_IS_EDITABLE = 512,
@@ -25212,46 +25189,47 @@ pub mod root {
                     "Alignment of field: " , stringify ! ( LookAndFeelInt ) ,
                     "::" , stringify ! ( value ) ));
     }
     impl Clone for LookAndFeelInt {
         fn clone(&self) -> Self { *self }
     }
     #[repr(C)]
     #[derive(Debug, Copy, Clone)]
+    pub struct RawServoStyleSet([u8; 0]);
+    #[repr(C)]
+    #[derive(Debug, Copy, Clone)]
     pub struct RawServoAnimationValue([u8; 0]);
     #[repr(C)]
     #[derive(Debug, Copy, Clone)]
-    pub struct RawServoStyleSet([u8; 0]);
+    pub struct RawServoAnimationValueMap([u8; 0]);
     pub type RawGeckoNode = root::nsINode;
     pub type RawGeckoElement = root::mozilla::dom::Element;
     pub type RawGeckoDocument = root::nsIDocument;
     pub type RawGeckoPresContext = root::nsPresContext;
     pub type RawGeckoKeyframeList = root::nsTArray<root::mozilla::Keyframe>;
     pub type RawGeckoComputedKeyframeValuesList =
         root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>;
     pub type RawGeckoAnimationValueList =
         root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>;
-    pub type RawServoAnimationValueBorrowedList =
-        root::nsTArray<*const root::RawServoAnimationValue>;
     pub type RawGeckoStyleAnimationList =
         root::nsStyleAutoArray<root::mozilla::StyleAnimation>;
+    pub type RawServoAnimationValueMapBorrowed =
+        *const 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;
     pub type RawGeckoPresContextOwned = *mut root::RawGeckoPresContext;
     pub type RawGeckoPresContextBorrowed = *const root::RawGeckoPresContext;
     pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
     pub type RawGeckoAnimationValueListBorrowedMut =
         *mut root::RawGeckoAnimationValueList;
-    pub type RawServoAnimationValueBorrowedListBorrowed =
-        *const root::RawServoAnimationValueBorrowedList;
     pub type RawGeckoKeyframeListBorrowedMut =
         *mut root::RawGeckoKeyframeList;
     pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList;
     pub type RawGeckoComputedKeyframeValuesListBorrowedMut =
         *mut root::RawGeckoComputedKeyframeValuesList;
     pub type RawGeckoStyleAnimationListBorrowed =
         *const root::RawGeckoStyleAnimationList;
     #[repr(C)]
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -9,17 +9,17 @@
 
 use {Atom, LocalName};
 use animation::{self, Animation, PropertyAnimation};
 use atomic_refcell::AtomicRefMut;
 use cache::{LRUCache, LRUCacheMutIterator};
 use cascade_info::CascadeInfo;
 use context::{SequentialTask, SharedStyleContext, StyleContext};
 use data::{ComputedStyle, ElementData, ElementStyles, RestyleData};
-use dom::{SendElement, TElement, TNode};
+use dom::{AnimationRules, SendElement, TElement, TNode};
 use properties::{CascadeFlags, ComputedValues, SHAREABLE, SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP, cascade};
 use properties::longhands::display::computed_value as display;
 use restyle_hints::{RESTYLE_STYLE_ATTRIBUTE, RestyleHint};
 use rule_tree::{CascadeLevel, StrongRuleNode};
 use selector_parser::{PseudoElement, RestyleDamage, SelectorImpl};
 use selectors::MatchAttr;
 use selectors::bloom::BloomFilter;
 use selectors::matching::{ElementSelectorFlags, StyleRelations};
@@ -795,17 +795,21 @@ pub trait MatchMethods : TElement {
             rule_nodes_changed = true;
         }
 
         // Compute rule nodes for eagerly-cascaded pseudo-elements.
         let mut matches_different_pseudos = false;
         SelectorImpl::each_eagerly_cascaded_pseudo_element(|pseudo| {
             let mut per_pseudo = &mut data.styles_mut().pseudos;
             debug_assert!(applicable_declarations.is_empty());
-            let pseudo_animation_rules = self.get_animation_rules(Some(&pseudo));
+            let pseudo_animation_rules = if <Self as MatchAttr>::Impl::pseudo_is_before_or_after(&pseudo) {
+                self.get_animation_rules(Some(&pseudo))
+            } else {
+                AnimationRules(None, None)
+            };
             stylist.push_applicable_declarations(self,
                                                  Some(context.thread_local.bloom_filter.filter()),
                                                  None, pseudo_animation_rules,
                                                  Some(&pseudo),
                                                  &mut applicable_declarations,
                                                  &mut flags);
 
             if !applicable_declarations.is_empty() {
--- a/servo/components/style/properties/declaration_block.rs
+++ b/servo/components/style/properties/declaration_block.rs
@@ -10,16 +10,17 @@ use cssparser::{DeclarationListParser, p
 use cssparser::{Parser, AtRuleParser, DeclarationParser, Delimiter};
 use error_reporting::ParseErrorReporter;
 use parser::{ParserContext, ParserContextExtraData, log_css_error};
 use servo_url::ServoUrl;
 use std::fmt;
 use style_traits::ToCss;
 use stylesheets::Origin;
 use super::*;
+#[cfg(feature = "gecko")] use properties::animated_properties::AnimationValueMap;
 
 /// A declaration [importance][importance].
 ///
 /// [importance]: https://drafts.csswg.org/css-cascade/#importance
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 pub enum Importance {
     /// Indicates a declaration without `!important`.
@@ -336,16 +337,34 @@ impl PropertyDeclarationBlock {
                     Some(AppendableValue::DeclarationsForShorthand(_, decls)) => {
                         shorthand.longhands_to_css(decls, dest)
                     }
                     _ => Ok(())
                 }
             }
         }
     }
+
+    /// Convert AnimationValueMap to PropertyDeclarationBlock.
+    #[cfg(feature = "gecko")]
+    pub fn from_animation_value_map(animation_value_map: &AnimationValueMap) -> Self {
+        let mut declarations = vec![];
+        let mut longhands = LonghandIdSet::new();
+
+        for (property, animation_value) in animation_value_map.iter() {
+          longhands.set_transition_property_bit(property);
+          declarations.push((animation_value.uncompute(), Importance::Normal));
+        }
+
+        PropertyDeclarationBlock {
+            declarations: declarations,
+            important_count: 0,
+            longhands: longhands,
+        }
+    }
 }
 
 impl ToCss for PropertyDeclarationBlock {
     // https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result
         where W: fmt::Write,
     {
         let mut is_first_serialization = true; // trailing serializations should have a prepended space
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -20,16 +20,17 @@ use properties::longhands::box_shadow::s
 use properties::longhands::transform::computed_value::ComputedMatrix;
 use properties::longhands::transform::computed_value::ComputedOperation as TransformOperation;
 use properties::longhands::transform::computed_value::T as TransformList;
 use properties::longhands::vertical_align::computed_value::T as VerticalAlign;
 use properties::longhands::visibility::computed_value::T as Visibility;
 use properties::longhands::z_index::computed_value::T as ZIndex;
 #[cfg(feature = "gecko")] use properties::{PropertyDeclarationId, LonghandId};
 use std::cmp;
+#[cfg(feature = "gecko")] use std::collections::HashMap;
 use std::fmt;
 use style_traits::ToCss;
 use super::ComputedValues;
 use values::CSSFloat;
 use values::{Auto, Either};
 use values::computed::{Angle, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
 use values::computed::{BorderRadiusSize, ClipRect, LengthOrNone};
 use values::computed::{CalcLengthOrPercentage, Context, LengthOrPercentage};
@@ -247,16 +248,22 @@ impl AnimatedProperty {
                             new_style.get_${prop.style_struct.ident.strip("_")}().clone_${prop.ident}())
                     }
                 % endif
             % endfor
         }
     }
 }
 
+/// A collection of AnimationValue that were composed on an element.
+/// This HashMap stores the values that are the last AnimationValue to be
+/// composed for each TransitionProperty.
+#[cfg(feature = "gecko")]
+pub type AnimationValueMap = HashMap<TransitionProperty, AnimationValue>;
+
 /// An enum to represent a single computed value belonging to an animated
 /// property in order to be interpolated with another one. When interpolating,
 /// both values need to belong to the same property.
 ///
 /// This is different to AnimatedProperty in the sense that AnimatedProperty
 /// also knows the final value to be used during the animation.
 ///
 /// This is to be used in Gecko integration code.
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -40,27 +40,27 @@ use style::gecko_bindings::bindings::{Ra
 use style::gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed};
 use style::gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong};
 use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong};
 use style::gecko_bindings::bindings::{nsACString, nsAString};
 use style::gecko_bindings::bindings::Gecko_AnimationAppendKeyframe;
 use style::gecko_bindings::bindings::RawGeckoComputedKeyframeValuesListBorrowedMut;
 use style::gecko_bindings::bindings::RawGeckoElementBorrowed;
 use style::gecko_bindings::bindings::RawServoAnimationValueBorrowed;
+use style::gecko_bindings::bindings::RawServoAnimationValueMapBorrowed;
 use style::gecko_bindings::bindings::RawServoAnimationValueStrong;
 use style::gecko_bindings::bindings::RawServoImportRuleBorrowed;
 use style::gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
 use style::gecko_bindings::bindings::nsTArrayBorrowed_uintptr_t;
 use style::gecko_bindings::structs;
 use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom, nsCSSPropertyID};
 use style::gecko_bindings::structs::{ThreadSafePrincipalHolder, ThreadSafeURIHolder};
 use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint};
 use style::gecko_bindings::structs::Loader;
 use style::gecko_bindings::structs::RawGeckoPresContextOwned;
-use style::gecko_bindings::structs::RawServoAnimationValueBorrowedListBorrowed;
 use style::gecko_bindings::structs::ServoStyleSheet;
 use style::gecko_bindings::structs::nsCSSValueSharedList;
 use style::gecko_bindings::structs::nsTimingFunction;
 use style::gecko_bindings::structs::nsresult;
 use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
 use style::gecko_bindings::sugar::ownership::{HasSimpleFFI, Strong};
 use style::gecko_bindings::sugar::refptr::{GeckoArcPrincipal, GeckoArcURI};
 use style::gecko_properties::{self, style_structs};
@@ -243,27 +243,25 @@ pub extern "C" fn Servo_AnimationValues_
     if let Ok(value) = from_value.interpolate(to_value, progress) {
         Arc::new(value).into_strong()
     } else {
         RawServoAnimationValueStrong::null()
     }
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_AnimationValues_Uncompute(value: RawServoAnimationValueBorrowedListBorrowed)
-     -> RawServoDeclarationBlockStrong
+pub extern "C" fn Servo_AnimationValueMap_Push(value_map: RawServoAnimationValueMapBorrowed,
+                                               property: nsCSSPropertyID,
+                                               value: RawServoAnimationValueBorrowed)
 {
-    let value = unsafe { value.as_ref().unwrap() };
-    let mut block = PropertyDeclarationBlock::new();
-    for v in value.iter() {
-        let raw_anim = unsafe { v.as_ref().unwrap() };
-        let anim = AnimationValue::as_arc(&raw_anim);
-        block.push(anim.uncompute(), Importance::Normal);
-    }
-    Arc::new(RwLock::new(block)).into_strong()
+    use style::properties::animated_properties::AnimationValueMap;
+
+    let value_map = RwLock::<AnimationValueMap>::as_arc(&value_map);
+    let value = AnimationValue::as_arc(&value).as_ref();
+    value_map.write().insert(property.into(), value.clone());
 }
 
 macro_rules! get_property_id_from_nscsspropertyid {
     ($property_id: ident, $ret: expr) => {{
         match PropertyId::from_nscsspropertyid($property_id) {
             Ok(property_id) => property_id,
             Err(()) => { return $ret; }
         }