servo: Merge #11456 - stylo: Support linear-gradients as background-image (from emilio:stylo-linear-gradient); r=mbrubeck
authorEmilio Cobos Álvarez <me@emiliocobos.me>
Thu, 02 Jun 2016 11:50:53 -0500
changeset 338989 da9a263fdd1b76fa6c2e7244bb2e93989e217e9c
parent 338988 d3451008413391065d813fe3e34efec300cd0297
child 338990 c665166b03e7876b4456ab416fd7114681e4e68d
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
servo: Merge #11456 - stylo: Support linear-gradients as background-image (from emilio:stylo-linear-gradient); r=mbrubeck This PR supports setting the background-image property to a linear-gradient in Geckolib. --- <!-- 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 - [x] These changes do not require tests because these are geckolib-only changes. r? @mbrubeck cc @heycam @bholley Source-Repo: https://github.com/servo/servo Source-Revision: e23962c4045a6ff20126996fa8fd7aa26c22def8
servo/components/style/properties/longhand/inherited_text.mako.rs
servo/components/style/values.rs
servo/ports/geckolib/gecko_bindings/bindings.rs
servo/ports/geckolib/gecko_bindings/lib.rs
servo/ports/geckolib/gecko_bindings/structs.rs
servo/ports/geckolib/gecko_bindings/sugar/mod.rs
servo/ports/geckolib/gecko_bindings/sugar/ns_t_array.rs
servo/ports/geckolib/gecko_bindings/tools/regen_bindings.sh
servo/ports/geckolib/gecko_bindings/tools/regen_style_structs.sh
servo/ports/geckolib/properties.mako.rs
servo/ports/geckolib/values.rs
--- a/servo/components/style/properties/longhand/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_text.mako.rs
@@ -304,18 +304,17 @@
 ${helpers.predefined_type("text-indent",
                           "LengthOrPercentage",
                           "computed::LengthOrPercentage::Length(Au(0))")}
 
 // Also known as "word-wrap" (which is more popular because of IE), but this is the preferred
 // name per CSS-TEXT 6.2.
 ${helpers.single_keyword("overflow-wrap",
                          "normal break-word",
-                         gecko_ffi_name="mWordWrap",
-                         gecko_constant_prefix="NS_STYLE_WORDWRAP")}
+                         gecko_constant_prefix="NS_STYLE_OVERFLOWWRAP")}
 
 // TODO(pcwalton): Support `word-break: keep-all` once we have better CJK support.
 ${helpers.single_keyword("word-break",
                          "normal break-all",
                          extra_gecko_values="keep-all",
                          gecko_constant_prefix="NS_STYLE_WORDBREAK")}
 
 // TODO(pcwalton): Support `text-justify: distribute`.
--- a/servo/components/style/values.rs
+++ b/servo/components/style/values.rs
@@ -1174,16 +1174,17 @@ pub mod specified {
 
     impl ToCss for Angle {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             write!(dest, "{}rad", self.0)
         }
     }
 
     impl Angle {
+        #[inline]
         pub fn radians(self) -> f32 {
             let Angle(radians) = self;
             radians
         }
     }
 
     const RAD_PER_DEG: CSSFloat = PI / 180.0;
     const RAD_PER_GRAD: CSSFloat = PI / 200.0;
--- a/servo/ports/geckolib/gecko_bindings/bindings.rs
+++ b/servo/ports/geckolib/gecko_bindings/bindings.rs
@@ -19,19 +19,24 @@ use structs::nsStyleTable;
 use structs::nsStyleMargin;
 use structs::nsStylePadding;
 use structs::nsStyleBorder;
 use structs::nsStyleOutline;
 use structs::nsStyleXUL;
 use structs::nsStyleSVGReset;
 use structs::nsStyleColumn;
 use structs::nsStyleEffects;
+use structs::nsStyleImage;
+use structs::nsStyleGradient;
+use structs::nsStyleCoord;
+use structs::nsStyleGradientStop;
 use structs::SheetParsingMode;
 use structs::nsMainThreadPtrHandle;
 use structs::nsMainThreadPtrHolder;
+use structs::nscolor;
 use heapsize::HeapSizeOf;
 unsafe impl Send for nsStyleFont {}
 unsafe impl Sync for nsStyleFont {}
 impl HeapSizeOf for nsStyleFont { fn heap_size_of_children(&self) -> usize { 0 } }
 unsafe impl Send for nsStyleColor {}
 unsafe impl Sync for nsStyleColor {}
 impl HeapSizeOf for nsStyleColor { fn heap_size_of_children(&self) -> usize { 0 } }
 unsafe impl Send for nsStyleList {}
@@ -95,16 +100,28 @@ unsafe impl Send for nsStyleSVGReset {}
 unsafe impl Sync for nsStyleSVGReset {}
 impl HeapSizeOf for nsStyleSVGReset { fn heap_size_of_children(&self) -> usize { 0 } }
 unsafe impl Send for nsStyleColumn {}
 unsafe impl Sync for nsStyleColumn {}
 impl HeapSizeOf for nsStyleColumn { fn heap_size_of_children(&self) -> usize { 0 } }
 unsafe impl Send for nsStyleEffects {}
 unsafe impl Sync for nsStyleEffects {}
 impl HeapSizeOf for nsStyleEffects { fn heap_size_of_children(&self) -> usize { 0 } }
+unsafe impl Send for nsStyleImage {}
+unsafe impl Sync for nsStyleImage {}
+impl HeapSizeOf for nsStyleImage { fn heap_size_of_children(&self) -> usize { 0 } }
+unsafe impl Send for nsStyleGradient {}
+unsafe impl Sync for nsStyleGradient {}
+impl HeapSizeOf for nsStyleGradient { fn heap_size_of_children(&self) -> usize { 0 } }
+unsafe impl Send for nsStyleCoord {}
+unsafe impl Sync for nsStyleCoord {}
+impl HeapSizeOf for nsStyleCoord { fn heap_size_of_children(&self) -> usize { 0 } }
+unsafe impl Send for nsStyleGradientStop {}
+unsafe impl Sync for nsStyleGradientStop {}
+impl HeapSizeOf for nsStyleGradientStop { fn heap_size_of_children(&self) -> usize { 0 } }
 
 pub enum nsIAtom { }
 pub enum nsINode { }
 pub type RawGeckoNode = nsINode;
 pub enum nsIPrincipal { }
 pub enum nsIURI { }
 pub enum Element { }
 pub type RawGeckoElement = Element;
@@ -166,16 +183,27 @@ extern "C" {
                                 aLength: u32) -> bool;
     pub fn Gecko_AtomEqualsUTF8IgnoreCase(aAtom: *mut nsIAtom,
                                           aString:
                                               *const ::std::os::raw::c_char,
                                           aLength: u32) -> bool;
     pub fn Gecko_SetListStyleType(style_struct: *mut nsStyleList, type_: u32);
     pub fn Gecko_CopyListStyleTypeFrom(dst: *mut nsStyleList,
                                        src: *const nsStyleList);
+    pub fn Gecko_SetNullImageValue(image: *mut nsStyleImage);
+    pub fn Gecko_SetGradientImageValue(image: *mut nsStyleImage,
+                                       gradient: *mut nsStyleGradient);
+    pub fn Gecko_CopyImageValueFrom(image: *mut nsStyleImage,
+                                    other: *const nsStyleImage);
+    pub fn Gecko_CreateGradient(shape: u8, size: u8, repeating: bool,
+                                legacy_syntax: bool, stops: u32)
+     -> *mut nsStyleGradient;
+    pub fn Gecko_SetGradientStop(gradient: *mut nsStyleGradient, index: u32,
+                                 location: *const nsStyleCoord,
+                                 color: nscolor, is_interpolation_hint: bool);
     pub fn Gecko_AddRefPrincipalArbitraryThread(aPtr:
                                                     *mut ThreadSafePrincipalHolder);
     pub fn Gecko_ReleasePrincipalArbitraryThread(aPtr:
                                                      *mut ThreadSafePrincipalHolder);
     pub fn Gecko_AddRefURIArbitraryThread(aPtr: *mut ThreadSafeURIHolder);
     pub fn Gecko_ReleaseURIArbitraryThread(aPtr: *mut ThreadSafeURIHolder);
     pub fn Gecko_SetMozBinding(style_struct: *mut nsStyleDisplay,
                                string_bytes: *const u8, string_length: u32,
--- a/servo/ports/geckolib/gecko_bindings/lib.rs
+++ b/servo/ports/geckolib/gecko_bindings/lib.rs
@@ -1,14 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#![feature(const_fn)]
 #![feature(concat_idents)]
 #![feature(type_macros)]
 
 extern crate heapsize;
 
 #[allow(dead_code, non_camel_case_types)]
 pub mod bindings;
 pub mod ptr;
+pub mod sugar;
 #[allow(dead_code, non_camel_case_types, non_snake_case, non_upper_case_globals)]
 pub mod structs;
--- a/servo/ports/geckolib/gecko_bindings/structs.rs
+++ b/servo/ports/geckolib/gecko_bindings/structs.rs
@@ -332,16 +332,18 @@ pub const NS_STYLE_IMAGELAYER_CLIP_MOZ_A
     127;
 pub const NS_STYLE_IMAGELAYER_ORIGIN_BORDER: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_IMAGELAYER_ORIGIN_PADDING: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_IMAGELAYER_ORIGIN_CONTENT: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_IMAGELAYER_REPEAT_REPEAT_X: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_IMAGELAYER_REPEAT_REPEAT_Y: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_IMAGELAYER_REPEAT_REPEAT: ::std::os::raw::c_uint = 3;
+pub const NS_STYLE_IMAGELAYER_REPEAT_SPACE: ::std::os::raw::c_uint = 4;
+pub const NS_STYLE_IMAGELAYER_REPEAT_ROUND: ::std::os::raw::c_uint = 5;
 pub const NS_STYLE_IMAGELAYER_SIZE_CONTAIN: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_IMAGELAYER_SIZE_COVER: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_MASK_MODE_ALPHA: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_MASK_MODE_LUMINANCE: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_MASK_MODE_MATCH_SOURCE: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_BG_INLINE_POLICY_EACH_BOX: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_BG_INLINE_POLICY_CONTINUOUS: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX: ::std::os::raw::c_uint = 2;
@@ -743,18 +745,18 @@ pub const NS_STYLE_WHITESPACE_NORMAL: ::
 pub const NS_STYLE_WHITESPACE_PRE: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_WHITESPACE_NOWRAP: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_WHITESPACE_PRE_WRAP: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_WHITESPACE_PRE_LINE: ::std::os::raw::c_uint = 4;
 pub const NS_STYLE_WHITESPACE_PRE_SPACE: ::std::os::raw::c_uint = 5;
 pub const NS_STYLE_WORDBREAK_NORMAL: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_WORDBREAK_BREAK_ALL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_WORDBREAK_KEEP_ALL: ::std::os::raw::c_uint = 2;
-pub const NS_STYLE_WORDWRAP_NORMAL: ::std::os::raw::c_uint = 0;
-pub const NS_STYLE_WORDWRAP_BREAK_WORD: ::std::os::raw::c_uint = 1;
+pub const NS_STYLE_OVERFLOWWRAP_NORMAL: ::std::os::raw::c_uint = 0;
+pub const NS_STYLE_OVERFLOWWRAP_BREAK_WORD: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_HYPHENS_NONE: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_HYPHENS_MANUAL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_HYPHENS_AUTO: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_RUBY_ALIGN_START: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_RUBY_ALIGN_CENTER: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_RUBY_ALIGN_SPACE_BETWEEN: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_RUBY_ALIGN_SPACE_AROUND: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_RUBY_POSITION_OVER: ::std::os::raw::c_uint = 0;
@@ -1481,18 +1483,17 @@ pub enum nsresult {
     NS_ERROR_DOM_BLUETOOTH_UNSUPPORTED = -2140536826,
     NS_ERROR_DOM_BLUETOOTH_PARM_INVALID = -2140536825,
     NS_ERROR_DOM_BLUETOOTH_UNHANDLED = -2140536824,
     NS_ERROR_DOM_BLUETOOTH_AUTH_FAILURE = -2140536823,
     NS_ERROR_DOM_BLUETOOTH_RMT_DEV_DOWN = -2140536822,
     NS_ERROR_DOM_BLUETOOTH_AUTH_REJECTED = -2140536821,
     NS_ERROR_SIGNED_APP_MANIFEST_INVALID = -2140471295,
     NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR = -2140405759,
-    NS_ERROR_DOM_ANIM_NO_TIMELINE_ERR = -2140405758,
-    NS_ERROR_DOM_ANIM_NO_EFFECT_ERR = -2140405757,
+    NS_ERROR_DOM_ANIM_NO_EFFECT_ERR = -2140405758,
     NS_ERROR_DOM_PUSH_INVALID_REGISTRATION_ERR = -2140340223,
     NS_ERROR_DOM_PUSH_DENIED_ERR = -2140340222,
     NS_ERROR_DOM_PUSH_ABORT_ERR = -2140340221,
     NS_ERROR_DOM_PUSH_SERVICE_UNREACHABLE = -2140340220,
     NS_ERROR_DOM_PUSH_INVALID_KEY_ERR = -2140340219,
     NS_ERROR_DOM_PUSH_MISMATCHED_KEY_ERR = -2140340218,
     NS_ERROR_DOWNLOAD_COMPLETE = -2139619327,
     NS_ERROR_DOWNLOAD_NOT_PARTIAL = -2139619326,
@@ -2587,16 +2588,174 @@ pub struct nsTHashtable<EntryType> {
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsTHashtable_Iterator<EntryType> {
     pub _base: PLDHashTable_Iterator,
     pub _phantom0: ::std::marker::PhantomData<EntryType>,
 }
 #[repr(C)]
 pub struct nsDataHashtable;
+pub enum TileClient { }
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArrayFallibleResult {
+    pub mResult: bool,
+}
+impl ::std::clone::Clone for nsTArrayFallibleResult {
+    fn clone(&self) -> Self { *self }
+}
+#[test]
+fn bindgen_test_layout_nsTArrayFallibleResult() {
+    assert_eq!(::std::mem::size_of::<nsTArrayFallibleResult>() , 1usize);
+    assert_eq!(::std::mem::align_of::<nsTArrayFallibleResult>() , 1usize);
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArrayInfallibleResult;
+impl ::std::clone::Clone for nsTArrayInfallibleResult {
+    fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArrayFallibleAllocatorBase;
+impl ::std::clone::Clone for nsTArrayFallibleAllocatorBase {
+    fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArrayInfallibleAllocatorBase;
+impl ::std::clone::Clone for nsTArrayInfallibleAllocatorBase {
+    fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArrayFallibleAllocator {
+    pub _base: nsTArrayFallibleAllocatorBase,
+}
+impl ::std::clone::Clone for nsTArrayFallibleAllocator {
+    fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArrayInfallibleAllocator {
+    pub _base: nsTArrayInfallibleAllocatorBase,
+}
+impl ::std::clone::Clone for nsTArrayInfallibleAllocator {
+    fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArrayHeader {
+    pub mLength: u32,
+    pub _bitfield_1: u32,
+}
+impl nsTArrayHeader {
+    pub fn set_mCapacity(&mut self, val: u32) {
+        self._bitfield_1 &= !(((1 << (31u32 as u32)) - 1) << 0usize);
+        self._bitfield_1 |= (val as u32) << 0usize;
+    }
+    pub fn set_mIsAutoArray(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 31usize);
+        self._bitfield_1 |= (val as u32) << 31usize;
+    }
+    pub const fn new_bitfield_1(mCapacity: u32, mIsAutoArray: bool) -> u32 {
+        0 | ((mCapacity as u32) << 0u32) | ((mIsAutoArray as u32) << 31u32)
+    }
+}
+impl ::std::clone::Clone for nsTArrayHeader {
+    fn clone(&self) -> Self { *self }
+}
+#[test]
+fn bindgen_test_layout_nsTArrayHeader() {
+    assert_eq!(::std::mem::size_of::<nsTArrayHeader>() , 8usize);
+    assert_eq!(::std::mem::align_of::<nsTArrayHeader>() , 4usize);
+}
+extern "C" {
+    #[link_name = "_ZN14nsTArrayHeader9sEmptyHdrE"]
+    pub static mut nsTArrayHeader_consts_sEmptyHdr: nsTArrayHeader;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct nsTArray_SafeElementAtHelper<E, Derived> {
+    pub _phantom0: ::std::marker::PhantomData<E>,
+    pub _phantom1: ::std::marker::PhantomData<Derived>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct nsTArray_SafeElementAtSmartPtrHelper<E, Derived> {
+    pub _phantom0: ::std::marker::PhantomData<E>,
+    pub _phantom1: ::std::marker::PhantomData<Derived>,
+}
+#[repr(C)]
+#[derive(Debug)]
+pub struct nsTArray_base<Alloc, Copy> {
+    pub mHdr: *mut nsTArrayHeader,
+    pub _phantom0: ::std::marker::PhantomData<Alloc>,
+    pub _phantom1: ::std::marker::PhantomData<Copy>,
+}
+#[repr(C)]
+#[derive(Debug)]
+pub struct nsTArray_base_IsAutoArrayRestorer<Alloc, Copy> {
+    pub mArray: *mut nsTArray_base<Alloc, Copy>,
+    pub mElemAlign: usize,
+    pub mIsAuto: bool,
+    pub _phantom0: ::std::marker::PhantomData<Copy>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct nsDefaultComparator<A, B> {
+    pub _phantom0: ::std::marker::PhantomData<A>,
+    pub _phantom1: ::std::marker::PhantomData<B>,
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsTArray_CopyWithMemutils;
+impl ::std::clone::Clone for nsTArray_CopyWithMemutils {
+    fn clone(&self) -> Self { *self }
+}
+extern "C" {
+    #[link_name = "_ZN25nsTArray_CopyWithMemutils12allowReallocE"]
+    pub static nsTArray_CopyWithMemutils_consts_allowRealloc: bool;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct nsTArray_CopyWithConstructors<ElemType> {
+    pub _phantom0: ::std::marker::PhantomData<ElemType>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct nsTArray_CopyChooser<E> {
+    pub _phantom0: ::std::marker::PhantomData<E>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct nsTArray_TypedBase<E, Derived> {
+    pub _base: nsTArray_SafeElementAtHelper<E, Derived>,
+    pub _phantom0: ::std::marker::PhantomData<Derived>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct ItemComparatorEq<Item, Comparator> {
+    pub mItem: *const Item,
+    pub mComp: *const Comparator,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct ItemComparatorFirstElementGT<Item, Comparator> {
+    pub mItem: *const Item,
+    pub mComp: *const Comparator,
+}
+/**
+ * <div rustbindgen replaces="nsTArray"></div>
+ */
+#[repr(C)]
+#[derive(Debug)]
+pub struct nsTArray<T> {
+    pub mBuffer: *mut T,
+}
 pub enum CSSVariableResolver { }
 #[repr(C)]
 pub struct CSSVariableValues {
     pub mVariableIDs: [u64; 6usize],
     /**
    * Array of variables, indexed by variable ID.
    */
     pub mVariables: nsTArray<CSSVariableValues_Variable>,
@@ -2678,17 +2837,17 @@ pub type thebes_destroy_func_t =
  * become 'float', perhaps, in some configurations.
  */
 pub type gfxFloat = f64;
 /**
  * Priority of a line break opportunity.
  *
  * eNoBreak       The line has no break opportunities
  * eWordWrapBreak The line has a break opportunity only within a word. With
- *                word-wrap: break-word we will break at this point only if
+ *                overflow-wrap|word-wrap: break-word we will break at this point only if
  *                there are no other break opportunities in the line.
  * eNormalBreak   The line has a break opportunity determined by the standard
  *                line-breaking algorithm.
  *
  * Future expansion: split eNormalBreak into multiple priorities, e.g.
  *                    punctuation break and whitespace break (bug 389710).
  *                   As and when we implement it, text-wrap: unrestricted will
  *                    mean that priorities are ignored and all line-break
@@ -2742,16 +2901,17 @@ pub enum gfxContentType {
     SENTINEL = 65535,
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct piecewise_construct_t;
 impl ::std::clone::Clone for piecewise_construct_t {
     fn clone(&self) -> Self { *self }
 }
+pub enum tuple { }
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct pair<_T1, _T2> {
     pub first: _T1,
     pub second: _T2,
 }
 pub type Float = f32;
 #[repr(i8)]
@@ -2974,17 +3134,17 @@ fn bindgen_test_layout_GradientStop() {
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum JobStatus { Complete = 0, Wait = 1, Yield = 2, Error = 3, }
 pub type gfxImageFormat = SurfaceFormat;
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct RectCorner;
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum RectCorner_Types_h_unnamed_5 {
+pub enum RectCorner_Types_h_unnamed_6 {
     TopLeft = 0,
     TopRight = 1,
     BottomRight = 2,
     BottomLeft = 3,
     Count = 4,
 }
 impl ::std::clone::Clone for RectCorner {
     fn clone(&self) -> Self { *self }
@@ -3014,16 +3174,22 @@ pub enum SideBits {
 pub struct tuple_size<_Tp> {
     pub _phantom0: ::std::marker::PhantomData<_Tp>,
 }
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct tuple_element<_Tp> {
     pub _phantom0: ::std::marker::PhantomData<_Tp>,
 }
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _Itup_cat<_Itup1, _Itup2> {
+    pub _phantom0: ::std::marker::PhantomData<_Itup1>,
+    pub _phantom1: ::std::marker::PhantomData<_Itup2>,
+}
 pub type nscoord = i32;
 #[repr(C)]
 pub struct nsIntPoint {
     pub _bindgen_opaque_blob: [u32; 2usize],
 }
 #[test]
 fn bindgen_test_layout_nsIntPoint() {
     assert_eq!(::std::mem::size_of::<nsIntPoint>() , 8usize);
@@ -3282,17 +3448,17 @@ impl ::std::clone::Clone for nsIURI {
     fn clone(&self) -> Self { *self }
 }
 pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
     nsCSSProperty::eCSSProperty_z_index;
 pub const eCSSProperty_all: nsCSSProperty =
     nsCSSProperty::eCSSProperty_COUNT_no_shorthands;
 pub const eCSSProperty_COUNT_DUMMY2: nsCSSProperty =
     nsCSSProperty::eCSSProperty_transition;
-pub const eCSSPropertyAlias_MozTransformOrigin: nsCSSProperty =
+pub const eCSSPropertyAlias_WordWrap: nsCSSProperty =
     nsCSSProperty::eCSSProperty_COUNT;
 pub const eCSSProperty_COUNT_DUMMY3: nsCSSProperty =
     nsCSSProperty::eCSSPropertyAlias_WebkitUserSelect;
 pub const eCSSPropertyExtra_no_properties: nsCSSProperty =
     nsCSSProperty::eCSSProperty_COUNT_with_aliases;
 #[repr(i32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum nsCSSProperty {
@@ -3594,17 +3760,17 @@ pub enum nsCSSProperty {
     eCSSProperty_visibility = 294,
     eCSSProperty_white_space = 295,
     eCSSProperty_width = 296,
     eCSSProperty_will_change = 297,
     eCSSProperty__moz_window_dragging = 298,
     eCSSProperty__moz_window_shadow = 299,
     eCSSProperty_word_break = 300,
     eCSSProperty_word_spacing = 301,
-    eCSSProperty_word_wrap = 302,
+    eCSSProperty_overflow_wrap = 302,
     eCSSProperty_writing_mode = 303,
     eCSSProperty_z_index = 304,
     eCSSProperty_COUNT_no_shorthands = 305,
     eCSSProperty_animation = 306,
     eCSSProperty_background = 307,
     eCSSProperty_background_position = 308,
     eCSSProperty_border = 309,
     eCSSProperty_border_block_end = 310,
@@ -3641,96 +3807,109 @@ pub enum nsCSSProperty {
     eCSSProperty_padding = 341,
     eCSSProperty_scroll_snap_type = 342,
     eCSSProperty_text_decoration = 343,
     eCSSProperty_text_emphasis = 344,
     eCSSProperty__webkit_text_stroke = 345,
     eCSSProperty__moz_transform = 346,
     eCSSProperty_transition = 347,
     eCSSProperty_COUNT = 348,
-    eCSSPropertyAlias_MozPerspectiveOrigin = 349,
-    eCSSPropertyAlias_MozPerspective = 350,
-    eCSSPropertyAlias_MozTransformStyle = 351,
-    eCSSPropertyAlias_MozBackfaceVisibility = 352,
-    eCSSPropertyAlias_MozBorderImage = 353,
-    eCSSPropertyAlias_MozTransition = 354,
-    eCSSPropertyAlias_MozTransitionDelay = 355,
-    eCSSPropertyAlias_MozTransitionDuration = 356,
-    eCSSPropertyAlias_MozTransitionProperty = 357,
-    eCSSPropertyAlias_MozTransitionTimingFunction = 358,
-    eCSSPropertyAlias_MozAnimation = 359,
-    eCSSPropertyAlias_MozAnimationDelay = 360,
-    eCSSPropertyAlias_MozAnimationDirection = 361,
-    eCSSPropertyAlias_MozAnimationDuration = 362,
-    eCSSPropertyAlias_MozAnimationFillMode = 363,
-    eCSSPropertyAlias_MozAnimationIterationCount = 364,
-    eCSSPropertyAlias_MozAnimationName = 365,
-    eCSSPropertyAlias_MozAnimationPlayState = 366,
-    eCSSPropertyAlias_MozAnimationTimingFunction = 367,
-    eCSSPropertyAlias_MozBoxSizing = 368,
-    eCSSPropertyAlias_MozFontFeatureSettings = 369,
-    eCSSPropertyAlias_MozFontLanguageOverride = 370,
-    eCSSPropertyAlias_MozPaddingEnd = 371,
-    eCSSPropertyAlias_MozPaddingStart = 372,
-    eCSSPropertyAlias_MozMarginEnd = 373,
-    eCSSPropertyAlias_MozMarginStart = 374,
-    eCSSPropertyAlias_MozBorderEnd = 375,
-    eCSSPropertyAlias_MozBorderEndColor = 376,
-    eCSSPropertyAlias_MozBorderEndStyle = 377,
-    eCSSPropertyAlias_MozBorderEndWidth = 378,
-    eCSSPropertyAlias_MozBorderStart = 379,
-    eCSSPropertyAlias_MozBorderStartColor = 380,
-    eCSSPropertyAlias_MozBorderStartStyle = 381,
-    eCSSPropertyAlias_MozBorderStartWidth = 382,
-    eCSSPropertyAlias_MozHyphens = 383,
-    eCSSPropertyAlias_WebkitAnimation = 384,
-    eCSSPropertyAlias_WebkitAnimationDelay = 385,
-    eCSSPropertyAlias_WebkitAnimationDirection = 386,
-    eCSSPropertyAlias_WebkitAnimationDuration = 387,
-    eCSSPropertyAlias_WebkitAnimationFillMode = 388,
-    eCSSPropertyAlias_WebkitAnimationIterationCount = 389,
-    eCSSPropertyAlias_WebkitAnimationName = 390,
-    eCSSPropertyAlias_WebkitAnimationPlayState = 391,
-    eCSSPropertyAlias_WebkitAnimationTimingFunction = 392,
-    eCSSPropertyAlias_WebkitFilter = 393,
-    eCSSPropertyAlias_WebkitTextSizeAdjust = 394,
-    eCSSPropertyAlias_WebkitTransform = 395,
-    eCSSPropertyAlias_WebkitTransformOrigin = 396,
-    eCSSPropertyAlias_WebkitTransformStyle = 397,
-    eCSSPropertyAlias_WebkitBackfaceVisibility = 398,
-    eCSSPropertyAlias_WebkitPerspective = 399,
-    eCSSPropertyAlias_WebkitPerspectiveOrigin = 400,
-    eCSSPropertyAlias_WebkitTransition = 401,
-    eCSSPropertyAlias_WebkitTransitionDelay = 402,
-    eCSSPropertyAlias_WebkitTransitionDuration = 403,
-    eCSSPropertyAlias_WebkitTransitionProperty = 404,
-    eCSSPropertyAlias_WebkitTransitionTimingFunction = 405,
-    eCSSPropertyAlias_WebkitBorderRadius = 406,
-    eCSSPropertyAlias_WebkitBorderTopLeftRadius = 407,
-    eCSSPropertyAlias_WebkitBorderTopRightRadius = 408,
-    eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 409,
-    eCSSPropertyAlias_WebkitBorderBottomRightRadius = 410,
-    eCSSPropertyAlias_WebkitBackgroundClip = 411,
-    eCSSPropertyAlias_WebkitBackgroundOrigin = 412,
-    eCSSPropertyAlias_WebkitBackgroundSize = 413,
-    eCSSPropertyAlias_WebkitBorderImage = 414,
-    eCSSPropertyAlias_WebkitBoxShadow = 415,
-    eCSSPropertyAlias_WebkitBoxSizing = 416,
-    eCSSPropertyAlias_WebkitBoxFlex = 417,
-    eCSSPropertyAlias_WebkitBoxOrdinalGroup = 418,
-    eCSSPropertyAlias_WebkitBoxOrient = 419,
-    eCSSPropertyAlias_WebkitBoxDirection = 420,
-    eCSSPropertyAlias_WebkitBoxAlign = 421,
-    eCSSPropertyAlias_WebkitBoxPack = 422,
-    eCSSPropertyAlias_WebkitUserSelect = 423,
-    eCSSProperty_COUNT_with_aliases = 424,
-    eCSSPropertyExtra_all_properties = 425,
-    eCSSPropertyExtra_x_none_value = 426,
-    eCSSPropertyExtra_x_auto_value = 427,
-    eCSSPropertyExtra_variable = 428,
+    eCSSPropertyAlias_MozTransformOrigin = 349,
+    eCSSPropertyAlias_MozPerspectiveOrigin = 350,
+    eCSSPropertyAlias_MozPerspective = 351,
+    eCSSPropertyAlias_MozTransformStyle = 352,
+    eCSSPropertyAlias_MozBackfaceVisibility = 353,
+    eCSSPropertyAlias_MozBorderImage = 354,
+    eCSSPropertyAlias_MozTransition = 355,
+    eCSSPropertyAlias_MozTransitionDelay = 356,
+    eCSSPropertyAlias_MozTransitionDuration = 357,
+    eCSSPropertyAlias_MozTransitionProperty = 358,
+    eCSSPropertyAlias_MozTransitionTimingFunction = 359,
+    eCSSPropertyAlias_MozAnimation = 360,
+    eCSSPropertyAlias_MozAnimationDelay = 361,
+    eCSSPropertyAlias_MozAnimationDirection = 362,
+    eCSSPropertyAlias_MozAnimationDuration = 363,
+    eCSSPropertyAlias_MozAnimationFillMode = 364,
+    eCSSPropertyAlias_MozAnimationIterationCount = 365,
+    eCSSPropertyAlias_MozAnimationName = 366,
+    eCSSPropertyAlias_MozAnimationPlayState = 367,
+    eCSSPropertyAlias_MozAnimationTimingFunction = 368,
+    eCSSPropertyAlias_MozBoxSizing = 369,
+    eCSSPropertyAlias_MozFontFeatureSettings = 370,
+    eCSSPropertyAlias_MozFontLanguageOverride = 371,
+    eCSSPropertyAlias_MozPaddingEnd = 372,
+    eCSSPropertyAlias_MozPaddingStart = 373,
+    eCSSPropertyAlias_MozMarginEnd = 374,
+    eCSSPropertyAlias_MozMarginStart = 375,
+    eCSSPropertyAlias_MozBorderEnd = 376,
+    eCSSPropertyAlias_MozBorderEndColor = 377,
+    eCSSPropertyAlias_MozBorderEndStyle = 378,
+    eCSSPropertyAlias_MozBorderEndWidth = 379,
+    eCSSPropertyAlias_MozBorderStart = 380,
+    eCSSPropertyAlias_MozBorderStartColor = 381,
+    eCSSPropertyAlias_MozBorderStartStyle = 382,
+    eCSSPropertyAlias_MozBorderStartWidth = 383,
+    eCSSPropertyAlias_MozHyphens = 384,
+    eCSSPropertyAlias_WebkitAnimation = 385,
+    eCSSPropertyAlias_WebkitAnimationDelay = 386,
+    eCSSPropertyAlias_WebkitAnimationDirection = 387,
+    eCSSPropertyAlias_WebkitAnimationDuration = 388,
+    eCSSPropertyAlias_WebkitAnimationFillMode = 389,
+    eCSSPropertyAlias_WebkitAnimationIterationCount = 390,
+    eCSSPropertyAlias_WebkitAnimationName = 391,
+    eCSSPropertyAlias_WebkitAnimationPlayState = 392,
+    eCSSPropertyAlias_WebkitAnimationTimingFunction = 393,
+    eCSSPropertyAlias_WebkitFilter = 394,
+    eCSSPropertyAlias_WebkitTextSizeAdjust = 395,
+    eCSSPropertyAlias_WebkitTransform = 396,
+    eCSSPropertyAlias_WebkitTransformOrigin = 397,
+    eCSSPropertyAlias_WebkitTransformStyle = 398,
+    eCSSPropertyAlias_WebkitBackfaceVisibility = 399,
+    eCSSPropertyAlias_WebkitPerspective = 400,
+    eCSSPropertyAlias_WebkitPerspectiveOrigin = 401,
+    eCSSPropertyAlias_WebkitTransition = 402,
+    eCSSPropertyAlias_WebkitTransitionDelay = 403,
+    eCSSPropertyAlias_WebkitTransitionDuration = 404,
+    eCSSPropertyAlias_WebkitTransitionProperty = 405,
+    eCSSPropertyAlias_WebkitTransitionTimingFunction = 406,
+    eCSSPropertyAlias_WebkitBorderRadius = 407,
+    eCSSPropertyAlias_WebkitBorderTopLeftRadius = 408,
+    eCSSPropertyAlias_WebkitBorderTopRightRadius = 409,
+    eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 410,
+    eCSSPropertyAlias_WebkitBorderBottomRightRadius = 411,
+    eCSSPropertyAlias_WebkitBackgroundClip = 412,
+    eCSSPropertyAlias_WebkitBackgroundOrigin = 413,
+    eCSSPropertyAlias_WebkitBackgroundSize = 414,
+    eCSSPropertyAlias_WebkitBorderImage = 415,
+    eCSSPropertyAlias_WebkitBoxShadow = 416,
+    eCSSPropertyAlias_WebkitBoxSizing = 417,
+    eCSSPropertyAlias_WebkitBoxFlex = 418,
+    eCSSPropertyAlias_WebkitBoxOrdinalGroup = 419,
+    eCSSPropertyAlias_WebkitBoxOrient = 420,
+    eCSSPropertyAlias_WebkitBoxDirection = 421,
+    eCSSPropertyAlias_WebkitBoxAlign = 422,
+    eCSSPropertyAlias_WebkitBoxPack = 423,
+    eCSSPropertyAlias_WebkitFlexDirection = 424,
+    eCSSPropertyAlias_WebkitFlexWrap = 425,
+    eCSSPropertyAlias_WebkitFlexFlow = 426,
+    eCSSPropertyAlias_WebkitOrder = 427,
+    eCSSPropertyAlias_WebkitFlex = 428,
+    eCSSPropertyAlias_WebkitFlexGrow = 429,
+    eCSSPropertyAlias_WebkitFlexShrink = 430,
+    eCSSPropertyAlias_WebkitFlexBasis = 431,
+    eCSSPropertyAlias_WebkitJustifyContent = 432,
+    eCSSPropertyAlias_WebkitAlignItems = 433,
+    eCSSPropertyAlias_WebkitAlignSelf = 434,
+    eCSSPropertyAlias_WebkitAlignContent = 435,
+    eCSSPropertyAlias_WebkitUserSelect = 436,
+    eCSSProperty_COUNT_with_aliases = 437,
+    eCSSPropertyExtra_all_properties = 438,
+    eCSSPropertyExtra_x_none_value = 439,
+    eCSSPropertyExtra_x_auto_value = 440,
+    eCSSPropertyExtra_variable = 441,
 }
 #[repr(i32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum nsCSSFontDesc {
     eCSSFontDesc_UNKNOWN = -1,
     eCSSFontDesc_Family = 0,
     eCSSFontDesc_Style = 1,
     eCSSFontDesc_Weight = 2,
@@ -3986,39 +4165,40 @@ pub enum nsCSSUnit {
     eCSSUnit_XHeight = 801,
     eCSSUnit_Char = 802,
     eCSSUnit_RootEM = 803,
     eCSSUnit_Point = 900,
     eCSSUnit_Inch = 901,
     eCSSUnit_Millimeter = 902,
     eCSSUnit_Centimeter = 903,
     eCSSUnit_Pica = 904,
-    eCSSUnit_Pixel = 905,
+    eCSSUnit_Quarter = 905,
+    eCSSUnit_Pixel = 906,
     eCSSUnit_Degree = 1000,
     eCSSUnit_Grad = 1001,
     eCSSUnit_Radian = 1002,
     eCSSUnit_Turn = 1003,
     eCSSUnit_Hertz = 2000,
     eCSSUnit_Kilohertz = 2001,
     eCSSUnit_Seconds = 3000,
     eCSSUnit_Milliseconds = 3001,
     eCSSUnit_FlexFraction = 4000,
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsCSSValue {
     pub mUnit: nsCSSUnit,
-    pub mValue: nsCSSValue_nsCSSValue_h_unnamed_8,
+    pub mValue: nsCSSValue_nsCSSValue_h_unnamed_9,
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum nsCSSValue_Serialization { eNormalized = 0, eAuthorSpecified = 1, }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsCSSValue_nsCSSValue_h_unnamed_8 {
+pub struct nsCSSValue_nsCSSValue_h_unnamed_9 {
     pub mInt: __BindgenUnionField<i32>,
     pub mFloat: __BindgenUnionField<f32>,
     pub mString: __BindgenUnionField<*mut nsStringBuffer>,
     pub mColor: __BindgenUnionField<nscolor>,
     pub mArray: __BindgenUnionField<*mut Array>,
     pub mURL: __BindgenUnionField<*mut URLValue>,
     pub mImage: __BindgenUnionField<*mut ImageValue>,
     pub mGridTemplateAreas: __BindgenUnionField<*mut GridTemplateAreasValue>,
@@ -4031,25 +4211,109 @@ pub struct nsCSSValue_nsCSSValue_h_unnam
     pub mListDependent: __BindgenUnionField<*mut nsCSSValueList>,
     pub mSharedList: __BindgenUnionField<*mut nsCSSValueSharedList>,
     pub mPairList: __BindgenUnionField<*mut nsCSSValuePairList_heap>,
     pub mPairListDependent: __BindgenUnionField<*mut nsCSSValuePairList>,
     pub mFloatColor: __BindgenUnionField<*mut nsCSSValueFloatColor>,
     pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>,
     pub _bindgen_data_: u64,
 }
-impl nsCSSValue_nsCSSValue_h_unnamed_8 { }
-impl ::std::clone::Clone for nsCSSValue_nsCSSValue_h_unnamed_8 {
+impl nsCSSValue_nsCSSValue_h_unnamed_9 {
+    pub unsafe fn mInt(&mut self) -> *mut i32 {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mFloat(&mut self) -> *mut f32 {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mString(&mut self) -> *mut *mut nsStringBuffer {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mColor(&mut self) -> *mut nscolor {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mArray(&mut self) -> *mut *mut Array {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mURL(&mut self) -> *mut *mut URLValue {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mImage(&mut self) -> *mut *mut ImageValue {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mGridTemplateAreas(&mut self)
+     -> *mut *mut GridTemplateAreasValue {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mGradient(&mut self) -> *mut *mut nsCSSValueGradient {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mTokenStream(&mut self) -> *mut *mut nsCSSValueTokenStream {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mPair(&mut self) -> *mut *mut nsCSSValuePair_heap {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mRect(&mut self) -> *mut *mut nsCSSRect_heap {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mTriplet(&mut self) -> *mut *mut nsCSSValueTriplet_heap {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mList(&mut self) -> *mut *mut nsCSSValueList_heap {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mListDependent(&mut self) -> *mut *mut nsCSSValueList {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mSharedList(&mut self) -> *mut *mut nsCSSValueSharedList {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mPairList(&mut self) -> *mut *mut nsCSSValuePairList_heap {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mPairListDependent(&mut self)
+     -> *mut *mut nsCSSValuePairList {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mFloatColor(&mut self) -> *mut *mut nsCSSValueFloatColor {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mFontFamilyList(&mut self)
+     -> *mut *mut FontFamilyListRefCnt {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsCSSValue_nsCSSValue_h_unnamed_9 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsCSSValue_nsCSSValue_h_unnamed_8() {
-    assert_eq!(::std::mem::size_of::<nsCSSValue_nsCSSValue_h_unnamed_8>() ,
+fn bindgen_test_layout_nsCSSValue_nsCSSValue_h_unnamed_9() {
+    assert_eq!(::std::mem::size_of::<nsCSSValue_nsCSSValue_h_unnamed_9>() ,
                8usize);
-    assert_eq!(::std::mem::align_of::<nsCSSValue_nsCSSValue_h_unnamed_8>() ,
+    assert_eq!(::std::mem::align_of::<nsCSSValue_nsCSSValue_h_unnamed_9>() ,
                8usize);
 }
 #[test]
 fn bindgen_test_layout_nsCSSValue() {
     assert_eq!(::std::mem::size_of::<nsCSSValue>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsCSSValue>() , 8usize);
 }
 #[repr(C)]
@@ -4367,17 +4631,17 @@ pub struct nsIRequest {
     pub _base: nsISupports,
 }
 #[repr(C)]
 pub struct _vftable_nsIRequest {
     pub _base: _vftable_nsISupports,
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum nsIRequest_nsIRequest_h_unnamed_9 {
+pub enum nsIRequest_nsIRequest_h_unnamed_10 {
     LOAD_REQUESTMASK = 65535,
     LOAD_NORMAL = 0,
     LOAD_BACKGROUND = 1,
     INHIBIT_PIPELINE = 64,
     INHIBIT_CACHING = 128,
     INHIBIT_PERSISTENT_CACHING = 256,
     LOAD_BYPASS_CACHE = 512,
     LOAD_FROM_CACHE = 1024,
@@ -4402,16 +4666,29 @@ pub struct nsIAtom {
    * nsStringBuffer::FromData() calls above are valid.
    */
     pub mString: *mut ::std::os::raw::c_ushort,
 }
 #[repr(C)]
 pub struct _vftable_nsIAtom {
     pub _base: _vftable_nsISupports,
 }
+impl nsIAtom {
+    pub fn set_mLength(&mut self, val: u32) {
+        self._bitfield_1 &= !(((1 << (31u32 as u32)) - 1) << 0usize);
+        self._bitfield_1 |= (val as u32) << 0usize;
+    }
+    pub fn set_mIsStatic(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 31usize);
+        self._bitfield_1 |= (val as u32) << 31usize;
+    }
+    pub const fn new_bitfield_1(mLength: u32, mIsStatic: bool) -> u32 {
+        0 | ((mLength as u32) << 0u32) | ((mIsStatic as u32) << 31u32)
+    }
+}
 impl ::std::clone::Clone for nsIAtom {
     fn clone(&self) -> Self { *self }
 }
 #[test]
 fn bindgen_test_layout_nsIAtom() {
     assert_eq!(::std::mem::size_of::<nsIAtom>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsIAtom>() , 8usize);
 }
@@ -4479,57 +4756,57 @@ pub struct HandleRefPtr<T> {
  */
 #[repr(C)]
 #[derive(Debug)]
 pub struct ArenaRefPtr<T> {
     pub mPtr: RefPtr<T>,
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum gfxFontConstants_h_unnamed_10 {
+pub enum gfxFontConstants_h_unnamed_11 {
     eFeatureAlternates_historical = 0,
     eFeatureAlternates_stylistic = 1,
     eFeatureAlternates_styleset = 2,
     eFeatureAlternates_character_variant = 3,
     eFeatureAlternates_swash = 4,
     eFeatureAlternates_ornaments = 5,
     eFeatureAlternates_annotation = 6,
     eFeatureAlternates_numFeatures = 7,
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum gfxFontConstants_h_unnamed_11 {
+pub enum gfxFontConstants_h_unnamed_12 {
     eFeatureEastAsian_jis78 = 0,
     eFeatureEastAsian_jis83 = 1,
     eFeatureEastAsian_jis90 = 2,
     eFeatureEastAsian_jis04 = 3,
     eFeatureEastAsian_simplified = 4,
     eFeatureEastAsian_traditional = 5,
     eFeatureEastAsian_full_width = 6,
     eFeatureEastAsian_prop_width = 7,
     eFeatureEastAsian_ruby = 8,
     eFeatureEastAsian_numFeatures = 9,
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum gfxFontConstants_h_unnamed_12 {
+pub enum gfxFontConstants_h_unnamed_13 {
     eFeatureLigatures_none = 0,
     eFeatureLigatures_common = 1,
     eFeatureLigatures_no_common = 2,
     eFeatureLigatures_discretionary = 3,
     eFeatureLigatures_no_discretionary = 4,
     eFeatureLigatures_historical = 5,
     eFeatureLigatures_no_historical = 6,
     eFeatureLigatures_contextual = 7,
     eFeatureLigatures_no_contextual = 8,
     eFeatureLigatures_numFeatures = 9,
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum gfxFontConstants_h_unnamed_13 {
+pub enum gfxFontConstants_h_unnamed_14 {
     eFeatureNumeric_lining = 0,
     eFeatureNumeric_oldstyle = 1,
     eFeatureNumeric_proportional = 2,
     eFeatureNumeric_tabular = 3,
     eFeatureNumeric_diagonal_fractions = 4,
     eFeatureNumeric_stacked_fractions = 5,
     eFeatureNumeric_slashedzero = 6,
     eFeatureNumeric_ordinal = 7,
@@ -4606,32 +4883,45 @@ pub enum nsStyleUnit {
     eStyleUnit_FlexFraction = 16,
     eStyleUnit_Coord = 20,
     eStyleUnit_Integer = 30,
     eStyleUnit_Enumerated = 32,
     eStyleUnit_Calc = 40,
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsStyleCoord_h_unnamed_14 {
+pub struct nsStyleCoord_h_unnamed_15 {
     pub mInt: __BindgenUnionField<i32>,
     pub mFloat: __BindgenUnionField<f32>,
     pub mPointer: __BindgenUnionField<*mut ::std::os::raw::c_void>,
     pub _bindgen_data_: u64,
 }
-impl nsStyleCoord_h_unnamed_14 { }
-impl ::std::clone::Clone for nsStyleCoord_h_unnamed_14 {
+impl nsStyleCoord_h_unnamed_15 {
+    pub unsafe fn mInt(&mut self) -> *mut i32 {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mFloat(&mut self) -> *mut f32 {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mPointer(&mut self) -> *mut *mut ::std::os::raw::c_void {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsStyleCoord_h_unnamed_15 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsStyleCoord_h_unnamed_14() {
-    assert_eq!(::std::mem::size_of::<nsStyleCoord_h_unnamed_14>() , 8usize);
-    assert_eq!(::std::mem::align_of::<nsStyleCoord_h_unnamed_14>() , 8usize);
-}
-pub type nsStyleUnion = nsStyleCoord_h_unnamed_14;
+fn bindgen_test_layout_nsStyleCoord_h_unnamed_15() {
+    assert_eq!(::std::mem::size_of::<nsStyleCoord_h_unnamed_15>() , 8usize);
+    assert_eq!(::std::mem::align_of::<nsStyleCoord_h_unnamed_15>() , 8usize);
+}
+pub type nsStyleUnion = nsStyleCoord_h_unnamed_15;
 /**
  * Class that hold a single size specification used by the style
  * system.  The size specification consists of two parts -- a number
  * and a unit.  The number is an integer, a floating point value, an
  * nscoord, or undefined, and the unit is an nsStyleUnit.  Checking
  * the unit is a must before asking for the value in any particular
  * form.
  */
@@ -4786,22 +5076,21 @@ pub struct nsStyleGradient {
     pub mRepeating: bool,
     pub mLegacySyntax: bool,
     pub mBgPosX: nsStyleCoord,
     pub mBgPosY: nsStyleCoord,
     pub mAngle: nsStyleCoord,
     pub mRadiusX: nsStyleCoord,
     pub mRadiusY: nsStyleCoord,
     pub mStops: nsTArray<nsStyleGradientStop>,
-    pub mRefCnt: nsAutoRefCnt,
-    pub _mOwningThread: nsAutoOwningThread,
+    pub mRefCnt: ThreadSafeAutoRefCnt,
 }
 #[test]
 fn bindgen_test_layout_nsStyleGradient() {
-    assert_eq!(::std::mem::size_of::<nsStyleGradient>() , 112usize);
+    assert_eq!(::std::mem::size_of::<nsStyleGradient>() , 104usize);
     assert_eq!(::std::mem::align_of::<nsStyleGradient>() , 8usize);
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum nsStyleImageType {
     eStyleImageType_Null = 0,
     eStyleImageType_Image = 1,
     eStyleImageType_Gradient = 2,
@@ -4816,37 +5105,51 @@ pub enum nsStyleImageType {
  * (*) Optionally a crop rect can be set to paint a partial (rectangular)
  * region of an image. (Currently, this feature is only supported with an
  * image of type (1)).
  */
 #[repr(C)]
 pub struct nsStyleImage {
     pub mSubImages: u64,
     pub mType: nsStyleImageType,
-    pub nsStyleImage_nsStyleStruct_h_unnamed_17: nsStyleImage_nsStyleStruct_h_unnamed_17,
+    pub nsStyleImage_nsStyleStruct_h_unnamed_18: nsStyleImage_nsStyleStruct_h_unnamed_18,
     pub mCropRect: nsAutoPtr<nsStyleSides>,
     pub mImageTracked: bool,
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsStyleImage_nsStyleStruct_h_unnamed_17 {
+pub struct nsStyleImage_nsStyleStruct_h_unnamed_18 {
     pub mImage: __BindgenUnionField<*mut imgRequestProxy>,
     pub mGradient: __BindgenUnionField<*mut nsStyleGradient>,
     pub mElementId: __BindgenUnionField<*mut ::std::os::raw::c_ushort>,
     pub _bindgen_data_: u64,
 }
-impl nsStyleImage_nsStyleStruct_h_unnamed_17 { }
-impl ::std::clone::Clone for nsStyleImage_nsStyleStruct_h_unnamed_17 {
+impl nsStyleImage_nsStyleStruct_h_unnamed_18 {
+    pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mGradient(&mut self) -> *mut *mut nsStyleGradient {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mElementId(&mut self)
+     -> *mut *mut ::std::os::raw::c_ushort {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsStyleImage_nsStyleStruct_h_unnamed_18 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsStyleImage_nsStyleStruct_h_unnamed_17() {
-    assert_eq!(::std::mem::size_of::<nsStyleImage_nsStyleStruct_h_unnamed_17>()
+fn bindgen_test_layout_nsStyleImage_nsStyleStruct_h_unnamed_18() {
+    assert_eq!(::std::mem::size_of::<nsStyleImage_nsStyleStruct_h_unnamed_18>()
                , 8usize);
-    assert_eq!(::std::mem::align_of::<nsStyleImage_nsStyleStruct_h_unnamed_17>()
+    assert_eq!(::std::mem::align_of::<nsStyleImage_nsStyleStruct_h_unnamed_18>()
                , 8usize);
 }
 #[test]
 fn bindgen_test_layout_nsStyleImage() {
     assert_eq!(::std::mem::size_of::<nsStyleImage>() , 40usize);
     assert_eq!(::std::mem::align_of::<nsStyleImage>() , 8usize);
 }
 #[repr(C)]
@@ -4886,17 +5189,17 @@ pub struct nsStyleImageLayers {
     pub mSizeCount: u32,
     pub mMaskModeCount: u32,
     pub mBlendModeCount: u32,
     pub mCompositeCount: u32,
     pub mLayers: nsStyleAutoArray<nsStyleImageLayers_Layer>,
 }
 #[repr(u32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum nsStyleImageLayers_nsStyleStruct_h_unnamed_18 {
+pub enum nsStyleImageLayers_nsStyleStruct_h_unnamed_19 {
     shorthand = 0,
     color = 1,
     image = 2,
     repeat = 3,
     positionX = 4,
     positionY = 5,
     clip = 6,
     origin = 7,
@@ -5120,23 +5423,22 @@ fn bindgen_test_layout_nsStyleOutline() 
 /**
  * An object that allows sharing of arrays that store 'quotes' property
  * values.  This is particularly important for inheritance, where we want
  * to share the same 'quotes' value with a parent style context.
  */
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStyleQuoteValues {
-    pub mRefCnt: nsAutoRefCnt,
-    pub _mOwningThread: nsAutoOwningThread,
+    pub mRefCnt: ThreadSafeAutoRefCnt,
     pub mQuotePairs: nsTArray<pair<nsString, nsString>>,
 }
 #[test]
 fn bindgen_test_layout_nsStyleQuoteValues() {
-    assert_eq!(::std::mem::size_of::<nsStyleQuoteValues>() , 24usize);
+    assert_eq!(::std::mem::size_of::<nsStyleQuoteValues>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsStyleQuoteValues>() , 8usize);
 }
 #[repr(C)]
 pub struct nsStyleList {
     pub mListStylePosition: u8,
     pub mCounterStyle: RefPtr<CounterStyle>,
     pub mListStyleImage: RefPtr<imgRequestProxy>,
     pub mQuotes: RefPtr<nsStyleQuoteValues>,
@@ -5179,16 +5481,29 @@ pub struct nsStyleGridTemplate {
     pub mLineNameLists: nsTArray<nsTArray<nsString>>,
     pub mMinTrackSizingFunctions: nsTArray<nsStyleCoord>,
     pub mMaxTrackSizingFunctions: nsTArray<nsStyleCoord>,
     pub mRepeatAutoLineNameListBefore: nsTArray<nsString>,
     pub mRepeatAutoLineNameListAfter: nsTArray<nsString>,
     pub mRepeatAutoIndex: i16,
     pub _bitfield_1: u8,
 }
+impl nsStyleGridTemplate {
+    pub fn set_mIsAutoFill(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u8)) - 1) << 0usize);
+        self._bitfield_1 |= (val as u8) << 0usize;
+    }
+    pub fn set_mIsSubgrid(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u8)) - 1) << 1usize);
+        self._bitfield_1 |= (val as u8) << 1usize;
+    }
+    pub const fn new_bitfield_1(mIsAutoFill: bool, mIsSubgrid: bool) -> u8 {
+        0 | ((mIsAutoFill as u8) << 0u32) | ((mIsSubgrid as u8) << 1u32)
+    }
+}
 #[test]
 fn bindgen_test_layout_nsStyleGridTemplate() {
     assert_eq!(::std::mem::size_of::<nsStyleGridTemplate>() , 48usize);
     assert_eq!(::std::mem::align_of::<nsStyleGridTemplate>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStylePosition {
@@ -5222,22 +5537,22 @@ pub struct nsStylePosition {
     pub mZIndex: nsStyleCoord,
     pub mGridTemplateColumns: nsStyleGridTemplate,
     pub mGridTemplateRows: nsStyleGridTemplate,
     pub mGridTemplateAreas: RefPtr<GridTemplateAreasValue>,
     pub mGridColumnStart: nsStyleGridLine,
     pub mGridColumnEnd: nsStyleGridLine,
     pub mGridRowStart: nsStyleGridLine,
     pub mGridRowEnd: nsStyleGridLine,
-    pub mGridColumnGap: nscoord,
-    pub mGridRowGap: nscoord,
+    pub mGridColumnGap: nsStyleCoord,
+    pub mGridRowGap: nsStyleCoord,
 }
 #[test]
 fn bindgen_test_layout_nsStylePosition() {
-    assert_eq!(::std::mem::size_of::<nsStylePosition>() , 496usize);
+    assert_eq!(::std::mem::size_of::<nsStylePosition>() , 520usize);
     assert_eq!(::std::mem::align_of::<nsStylePosition>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStyleTextOverflowSide {
     pub mString: nsString,
     pub mType: u8,
 }
@@ -5276,17 +5591,17 @@ fn bindgen_test_layout_nsStyleTextReset(
 #[derive(Debug)]
 pub struct nsStyleText {
     pub mTextAlign: u8,
     pub mTextAlignLast: u8,
     pub _bitfield_1: u8,
     pub mTextTransform: u8,
     pub mWhiteSpace: u8,
     pub mWordBreak: u8,
-    pub mWordWrap: u8,
+    pub mOverflowWrap: u8,
     pub mHyphens: u8,
     pub mRubyAlign: u8,
     pub mRubyPosition: u8,
     pub mTextSizeAdjust: u8,
     pub mTextCombineUpright: u8,
     pub mControlCharacterVisibility: u8,
     pub mTextEmphasisPosition: u8,
     pub mTextEmphasisStyle: u8,
@@ -5298,16 +5613,50 @@ pub struct nsStyleText {
     pub mWordSpacing: nsStyleCoord,
     pub mLetterSpacing: nsStyleCoord,
     pub mLineHeight: nsStyleCoord,
     pub mTextIndent: nsStyleCoord,
     pub mWebkitTextStrokeWidth: nsStyleCoord,
     pub mTextShadow: RefPtr<nsCSSShadowArray>,
     pub mTextEmphasisStyleString: nsString,
 }
+impl nsStyleText {
+    pub fn set_mTextAlignTrue(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u8)) - 1) << 0usize);
+        self._bitfield_1 |= (val as u8) << 0usize;
+    }
+    pub fn set_mTextAlignLastTrue(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u8)) - 1) << 1usize);
+        self._bitfield_1 |= (val as u8) << 1usize;
+    }
+    pub fn set_mTextEmphasisColorForeground(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u8)) - 1) << 2usize);
+        self._bitfield_1 |= (val as u8) << 2usize;
+    }
+    pub fn set_mWebkitTextFillColorForeground(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u8)) - 1) << 3usize);
+        self._bitfield_1 |= (val as u8) << 3usize;
+    }
+    pub fn set_mWebkitTextStrokeColorForeground(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u8)) - 1) << 4usize);
+        self._bitfield_1 |= (val as u8) << 4usize;
+    }
+    pub const fn new_bitfield_1(mTextAlignTrue: bool,
+                                mTextAlignLastTrue: bool,
+                                mTextEmphasisColorForeground: bool,
+                                mWebkitTextFillColorForeground: bool,
+                                mWebkitTextStrokeColorForeground: bool)
+     -> u8 {
+        0 | ((mTextAlignTrue as u8) << 0u32) |
+            ((mTextAlignLastTrue as u8) << 1u32) |
+            ((mTextEmphasisColorForeground as u8) << 2u32) |
+            ((mWebkitTextFillColorForeground as u8) << 3u32) |
+            ((mWebkitTextStrokeColorForeground as u8) << 4u32)
+    }
+}
 #[test]
 fn bindgen_test_layout_nsStyleText() {
     assert_eq!(::std::mem::size_of::<nsStyleText>() , 136usize);
     assert_eq!(::std::mem::align_of::<nsStyleText>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct nsStyleImageOrientation {
@@ -5351,17 +5700,17 @@ pub struct nsStyleVisibility {
 fn bindgen_test_layout_nsStyleVisibility() {
     assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 7usize);
     assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize);
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct nsTimingFunction {
     pub mType: nsTimingFunction_Type,
-    pub nsTimingFunction_nsStyleStruct_h_unnamed_19: nsTimingFunction_nsStyleStruct_h_unnamed_19,
+    pub nsTimingFunction_nsStyleStruct_h_unnamed_20: nsTimingFunction_nsStyleStruct_h_unnamed_20,
 }
 #[repr(i32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum nsTimingFunction_Type {
     Ease = 0,
     Linear = 1,
     EaseIn = 2,
     EaseOut = 3,
@@ -5378,66 +5727,79 @@ pub enum nsTimingFunction_StepSyntax {
     FunctionalWithStartKeyword = 2,
     FunctionalWithEndKeyword = 3,
 }
 #[repr(i32)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsTimingFunction_nsStyleStruct_h_unnamed_19 {
-    pub mFunc: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_20>,
-    pub nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_21: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_21>,
+pub struct nsTimingFunction_nsStyleStruct_h_unnamed_20 {
+    pub mFunc: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_21>,
+    pub nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22>,
     pub _bindgen_data_: [u32; 4usize],
 }
-impl nsTimingFunction_nsStyleStruct_h_unnamed_19 { }
-impl ::std::clone::Clone for nsTimingFunction_nsStyleStruct_h_unnamed_19 {
+impl nsTimingFunction_nsStyleStruct_h_unnamed_20 {
+    pub unsafe fn mFunc(&mut self)
+     ->
+         *mut nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_21 {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22(&mut self)
+     ->
+         *mut nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22 {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsTimingFunction_nsStyleStruct_h_unnamed_20 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_19() {
-    assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_19>()
+fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_20() {
+    assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_20>()
                , 16usize);
-    assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_19>()
+    assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_20>()
                , 4usize);
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_20 {
+pub struct nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_21 {
     pub mX1: f32,
     pub mY1: f32,
     pub mX2: f32,
     pub mY2: f32,
 }
 impl ::std::clone::Clone for
- nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_20 {
+ nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_21 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_20() {
-    assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_20>()
+fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_21() {
+    assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_21>()
                , 16usize);
-    assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_20>()
+    assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_21>()
                , 4usize);
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_21 {
+pub struct nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22 {
     pub mStepSyntax: nsTimingFunction_StepSyntax,
     pub mSteps: u32,
 }
 impl ::std::clone::Clone for
- nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_21 {
+ nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_21() {
-    assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_21>()
+fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22() {
+    assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22>()
                , 8usize);
-    assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_19_nsStyleStruct_h_unnamed_21>()
+    assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_20_nsStyleStruct_h_unnamed_22>()
                , 4usize);
 }
 impl ::std::clone::Clone for nsTimingFunction {
     fn clone(&self) -> Self { *self }
 }
 #[test]
 fn bindgen_test_layout_nsTimingFunction() {
     assert_eq!(::std::mem::size_of::<nsTimingFunction>() , 20usize);
@@ -5572,36 +5934,49 @@ pub enum nsStyleContentType {
     eStyleContentType_NoCloseQuote = 43,
     eStyleContentType_AltContent = 50,
     eStyleContentType_Uninitialized = 51,
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStyleContentData {
     pub mType: nsStyleContentType,
-    pub mContent: nsStyleContentData_nsStyleStruct_h_unnamed_22,
+    pub mContent: nsStyleContentData_nsStyleStruct_h_unnamed_23,
     pub mImageTracked: bool,
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsStyleContentData_nsStyleStruct_h_unnamed_22 {
+pub struct nsStyleContentData_nsStyleStruct_h_unnamed_23 {
     pub mString: __BindgenUnionField<*mut ::std::os::raw::c_ushort>,
     pub mImage: __BindgenUnionField<*mut imgRequestProxy>,
     pub mCounters: __BindgenUnionField<*mut Array>,
     pub _bindgen_data_: u64,
 }
-impl nsStyleContentData_nsStyleStruct_h_unnamed_22 { }
-impl ::std::clone::Clone for nsStyleContentData_nsStyleStruct_h_unnamed_22 {
+impl nsStyleContentData_nsStyleStruct_h_unnamed_23 {
+    pub unsafe fn mString(&mut self) -> *mut *mut ::std::os::raw::c_ushort {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mCounters(&mut self) -> *mut *mut Array {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsStyleContentData_nsStyleStruct_h_unnamed_23 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsStyleContentData_nsStyleStruct_h_unnamed_22() {
-    assert_eq!(::std::mem::size_of::<nsStyleContentData_nsStyleStruct_h_unnamed_22>()
+fn bindgen_test_layout_nsStyleContentData_nsStyleStruct_h_unnamed_23() {
+    assert_eq!(::std::mem::size_of::<nsStyleContentData_nsStyleStruct_h_unnamed_23>()
                , 8usize);
-    assert_eq!(::std::mem::align_of::<nsStyleContentData_nsStyleStruct_h_unnamed_22>()
+    assert_eq!(::std::mem::align_of::<nsStyleContentData_nsStyleStruct_h_unnamed_23>()
                , 8usize);
 }
 #[test]
 fn bindgen_test_layout_nsStyleContentData() {
     assert_eq!(::std::mem::size_of::<nsStyleContentData>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsStyleContentData>() , 8usize);
 }
 #[repr(C)]
@@ -5725,36 +6100,45 @@ pub enum nsStyleSVGPaintType {
 pub enum nsStyleSVGOpacitySource {
     eStyleSVGOpacitySource_Normal = 0,
     eStyleSVGOpacitySource_ContextFillOpacity = 1,
     eStyleSVGOpacitySource_ContextStrokeOpacity = 2,
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStyleSVGPaint {
-    pub mPaint: nsStyleSVGPaint_nsStyleStruct_h_unnamed_23,
+    pub mPaint: nsStyleSVGPaint_nsStyleStruct_h_unnamed_24,
     pub mType: nsStyleSVGPaintType,
     pub mFallbackColor: nscolor,
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsStyleSVGPaint_nsStyleStruct_h_unnamed_23 {
+pub struct nsStyleSVGPaint_nsStyleStruct_h_unnamed_24 {
     pub mColor: __BindgenUnionField<nscolor>,
     pub mPaintServer: __BindgenUnionField<*mut nsIURI>,
     pub _bindgen_data_: u64,
 }
-impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_23 { }
-impl ::std::clone::Clone for nsStyleSVGPaint_nsStyleStruct_h_unnamed_23 {
+impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_24 {
+    pub unsafe fn mColor(&mut self) -> *mut nscolor {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mPaintServer(&mut self) -> *mut *mut nsIURI {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsStyleSVGPaint_nsStyleStruct_h_unnamed_24 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsStyleSVGPaint_nsStyleStruct_h_unnamed_23() {
-    assert_eq!(::std::mem::size_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_23>()
+fn bindgen_test_layout_nsStyleSVGPaint_nsStyleStruct_h_unnamed_24() {
+    assert_eq!(::std::mem::size_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_24>()
                , 8usize);
-    assert_eq!(::std::mem::align_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_23>()
+    assert_eq!(::std::mem::align_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_24>()
                , 8usize);
 }
 #[test]
 fn bindgen_test_layout_nsStyleSVGPaint() {
     assert_eq!(::std::mem::size_of::<nsStyleSVGPaint>() , 16usize);
     assert_eq!(::std::mem::align_of::<nsStyleSVGPaint>() , 8usize);
 }
 #[repr(C)]
@@ -5778,16 +6162,49 @@ pub struct nsStyleSVG {
     pub mFillRule: u8,
     pub mPaintOrder: u8,
     pub mShapeRendering: u8,
     pub mStrokeLinecap: u8,
     pub mStrokeLinejoin: u8,
     pub mTextAnchor: u8,
     pub _bitfield_1: u32,
 }
+impl nsStyleSVG {
+    pub fn set_mFillOpacitySource(&mut self, val: u8) {
+        self._bitfield_1 &= !(((1 << (3u32 as u32)) - 1) << 0usize);
+        self._bitfield_1 |= (val as u32) << 0usize;
+    }
+    pub fn set_mStrokeOpacitySource(&mut self, val: u8) {
+        self._bitfield_1 &= !(((1 << (3u32 as u32)) - 1) << 3usize);
+        self._bitfield_1 |= (val as u32) << 3usize;
+    }
+    pub fn set_mStrokeDasharrayFromObject(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 6usize);
+        self._bitfield_1 |= (val as u32) << 6usize;
+    }
+    pub fn set_mStrokeDashoffsetFromObject(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 7usize);
+        self._bitfield_1 |= (val as u32) << 7usize;
+    }
+    pub fn set_mStrokeWidthFromObject(&mut self, val: bool) {
+        self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 8usize);
+        self._bitfield_1 |= (val as u32) << 8usize;
+    }
+    pub const fn new_bitfield_1(mFillOpacitySource: u8,
+                                mStrokeOpacitySource: u8,
+                                mStrokeDasharrayFromObject: bool,
+                                mStrokeDashoffsetFromObject: bool,
+                                mStrokeWidthFromObject: bool) -> u32 {
+        0 | ((mFillOpacitySource as u32) << 0u32) |
+            ((mStrokeOpacitySource as u32) << 3u32) |
+            ((mStrokeDasharrayFromObject as u32) << 6u32) |
+            ((mStrokeDashoffsetFromObject as u32) << 7u32) |
+            ((mStrokeWidthFromObject as u32) << 8u32)
+    }
+}
 #[test]
 fn bindgen_test_layout_nsStyleSVG() {
     assert_eq!(::std::mem::size_of::<nsStyleSVG>() , 128usize);
     assert_eq!(::std::mem::align_of::<nsStyleSVG>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStyleBasicShape {
@@ -5811,79 +6228,91 @@ pub enum nsStyleBasicShape_Type {
 fn bindgen_test_layout_nsStyleBasicShape() {
     assert_eq!(::std::mem::size_of::<nsStyleBasicShape>() , 128usize);
     assert_eq!(::std::mem::align_of::<nsStyleBasicShape>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStyleClipPath {
     pub mType: i32,
-    pub nsStyleClipPath_nsStyleStruct_h_unnamed_24: nsStyleClipPath_nsStyleStruct_h_unnamed_24,
+    pub nsStyleClipPath_nsStyleStruct_h_unnamed_25: nsStyleClipPath_nsStyleStruct_h_unnamed_25,
     pub mSizingBox: u8,
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsStyleClipPath_nsStyleStruct_h_unnamed_24 {
+pub struct nsStyleClipPath_nsStyleStruct_h_unnamed_25 {
     pub mBasicShape: __BindgenUnionField<*mut nsStyleBasicShape>,
     pub mURL: __BindgenUnionField<*mut nsIURI>,
     pub _bindgen_data_: u64,
 }
-impl nsStyleClipPath_nsStyleStruct_h_unnamed_24 { }
-impl ::std::clone::Clone for nsStyleClipPath_nsStyleStruct_h_unnamed_24 {
+impl nsStyleClipPath_nsStyleStruct_h_unnamed_25 {
+    pub unsafe fn mBasicShape(&mut self) -> *mut *mut nsStyleBasicShape {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mURL(&mut self) -> *mut *mut nsIURI {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsStyleClipPath_nsStyleStruct_h_unnamed_25 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsStyleClipPath_nsStyleStruct_h_unnamed_24() {
-    assert_eq!(::std::mem::size_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_24>()
+fn bindgen_test_layout_nsStyleClipPath_nsStyleStruct_h_unnamed_25() {
+    assert_eq!(::std::mem::size_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_25>()
                , 8usize);
-    assert_eq!(::std::mem::align_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_24>()
+    assert_eq!(::std::mem::align_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_25>()
                , 8usize);
 }
 #[test]
 fn bindgen_test_layout_nsStyleClipPath() {
     assert_eq!(::std::mem::size_of::<nsStyleClipPath>() , 24usize);
     assert_eq!(::std::mem::align_of::<nsStyleClipPath>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsStyleFilter {
     pub mType: i32,
     pub mFilterParameter: nsStyleCoord,
-    pub nsStyleFilter_nsStyleStruct_h_unnamed_25: nsStyleFilter_nsStyleStruct_h_unnamed_25,
+    pub nsStyleFilter_nsStyleStruct_h_unnamed_26: nsStyleFilter_nsStyleStruct_h_unnamed_26,
 }
 #[repr(C)]
 #[derive(Debug, Copy)]
-pub struct nsStyleFilter_nsStyleStruct_h_unnamed_25 {
+pub struct nsStyleFilter_nsStyleStruct_h_unnamed_26 {
     pub mURL: __BindgenUnionField<*mut nsIURI>,
     pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>,
     pub _bindgen_data_: u64,
 }
-impl nsStyleFilter_nsStyleStruct_h_unnamed_25 { }
-impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_25 {
+impl nsStyleFilter_nsStyleStruct_h_unnamed_26 {
+    pub unsafe fn mURL(&mut self) -> *mut *mut nsIURI {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+    pub unsafe fn mDropShadow(&mut self) -> *mut *mut nsCSSShadowArray {
+        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
+        ::std::mem::transmute(raw.offset(0))
+    }
+}
+impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_26 {
     fn clone(&self) -> Self { *self }
 }
 #[test]
-fn bindgen_test_layout_nsStyleFilter_nsStyleStruct_h_unnamed_25() {
-    assert_eq!(::std::mem::size_of::<nsStyleFilter_nsStyleStruct_h_unnamed_25>()
+fn bindgen_test_layout_nsStyleFilter_nsStyleStruct_h_unnamed_26() {
+    assert_eq!(::std::mem::size_of::<nsStyleFilter_nsStyleStruct_h_unnamed_26>()
                , 8usize);
-    assert_eq!(::std::mem::align_of::<nsStyleFilter_nsStyleStruct_h_unnamed_25>()
+    assert_eq!(::std::mem::align_of::<nsStyleFilter_nsStyleStruct_h_unnamed_26>()
                , 8usize);
 }
 #[test]
 fn bindgen_test_layout_nsStyleFilter() {
     assert_eq!(::std::mem::size_of::<nsStyleFilter>() , 32usize);
     assert_eq!(::std::mem::align_of::<nsStyleFilter>() , 8usize);
 }
 #[repr(C)]
-#[derive(Debug, Copy)]
-pub struct nsTArray_CopyChooser;
-impl ::std::clone::Clone for nsTArray_CopyChooser {
-    fn clone(&self) -> Self { *self }
-}
-#[repr(C)]
 pub struct nsStyleSVGReset {
     pub mMask: nsStyleImageLayers,
     pub mClipPath: nsStyleClipPath,
     pub mStopColor: nscolor,
     pub mFloodColor: nscolor,
     pub mLightingColor: nscolor,
     pub mStopOpacity: f32,
     pub mFloodOpacity: f32,
@@ -5915,16 +6344,8 @@ pub struct nsStyleEffects {
     pub mClipFlags: u8,
     pub mMixBlendMode: u8,
 }
 #[test]
 fn bindgen_test_layout_nsStyleEffects() {
     assert_eq!(::std::mem::size_of::<nsStyleEffects>() , 40usize);
     assert_eq!(::std::mem::align_of::<nsStyleEffects>() , 8usize);
 }
-/**
- * <div rustbindgen replaces="nsTArray"></div>
- */
-#[repr(C)]
-#[derive(Debug)]
-pub struct nsTArray<T> {
-    pub mBuffer: *mut T,
-}
copy from servo/components/script/dom/validation.rs
copy to servo/ports/geckolib/gecko_bindings/sugar/mod.rs
--- a/servo/components/script/dom/validation.rs
+++ b/servo/ports/geckolib/gecko_bindings/sugar/mod.rs
@@ -1,5 +1,5 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-pub trait Validatable {}
+mod ns_t_array;
new file mode 100644
--- /dev/null
+++ b/servo/ports/geckolib/gecko_bindings/sugar/ns_t_array.rs
@@ -0,0 +1,42 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use std::mem;
+use std::ops::{Deref, DerefMut};
+use std::slice;
+use structs::{nsTArray, nsTArrayHeader};
+
+impl<T> Deref for nsTArray<T> {
+    type Target = [T];
+
+    fn deref<'a>(&'a self) -> &'a [T] {
+        unsafe {
+            slice::from_raw_parts(self.slice_begin(),
+                                  self.header().mLength as usize)
+        }
+    }
+}
+
+impl<T> DerefMut for nsTArray<T> {
+    fn deref_mut<'a>(&'a mut self) -> &'a mut [T] {
+        unsafe {
+            slice::from_raw_parts_mut(self.slice_begin(),
+                                      self.header().mLength as usize)
+        }
+    }
+}
+
+impl<T> nsTArray<T> {
+    #[inline]
+    fn header<'a>(&'a self) -> &'a nsTArrayHeader {
+        debug_assert!(!self.mBuffer.is_null());
+        unsafe { mem::transmute(self.mBuffer) }
+    }
+
+    #[inline]
+    unsafe fn slice_begin(&self) -> *mut T {
+        debug_assert!(!self.mBuffer.is_null());
+        (self.mBuffer as *const nsTArrayHeader).offset(1) as *mut _
+    }
+}
--- a/servo/ports/geckolib/gecko_bindings/tools/regen_bindings.sh
+++ b/servo/ports/geckolib/gecko_bindings/tools/regen_bindings.sh
@@ -35,27 +35,28 @@ export MAP_GECKO_TYPES=""
 export EXTRA_CODE="-raw-line 'use heapsize::HeapSizeOf;' "
 
 # Style structs.
 for STRUCT in nsStyleFont nsStyleColor nsStyleList nsStyleText \
               nsStyleVisibility nsStyleUserInterface nsStyleTableBorder \
               nsStyleSVG nsStyleVariables nsStyleBackground nsStylePosition \
               nsStyleTextReset nsStyleDisplay nsStyleContent nsStyleUIReset \
               nsStyleTable nsStyleMargin nsStylePadding nsStyleBorder \
-              nsStyleOutline nsStyleXUL nsStyleSVGReset nsStyleColumn nsStyleEffects
+              nsStyleOutline nsStyleXUL nsStyleSVGReset nsStyleColumn nsStyleEffects \
+              nsStyleImage nsStyleGradient nsStyleCoord nsStyleGradientStop
 do
   MAP_GECKO_TYPES=$MAP_GECKO_TYPES"-blacklist-type $STRUCT "
   MAP_GECKO_TYPES=$MAP_GECKO_TYPES"-raw-line 'use structs::$STRUCT;' "
   EXTRA_CODE=$EXTRA_CODE"-raw-line 'unsafe impl Send for $STRUCT {}' "
   EXTRA_CODE=$EXTRA_CODE"-raw-line 'unsafe impl Sync for $STRUCT {}' "
   EXTRA_CODE=$EXTRA_CODE"-raw-line 'impl HeapSizeOf for $STRUCT { fn heap_size_of_children(&self) -> usize { 0 } }' "
 done
 
 # Other mapped types.
-for TYPE in SheetParsingMode nsMainThreadPtrHandle nsMainThreadPtrHolder
+for TYPE in SheetParsingMode nsMainThreadPtrHandle nsMainThreadPtrHolder nscolor
 do
   MAP_GECKO_TYPES=$MAP_GECKO_TYPES"-blacklist-type $TYPE "
   MAP_GECKO_TYPES=$MAP_GECKO_TYPES"-raw-line 'use structs::$TYPE;' "
 done
 
 
 
 # Check for the include directory.
--- a/servo/ports/geckolib/gecko_bindings/tools/regen_style_structs.sh
+++ b/servo/ports/geckolib/gecko_bindings/tools/regen_style_structs.sh
@@ -41,17 +41,16 @@ export RUST_BACKTRACE=1
 ./rust-bindgen/target/debug/bindgen                                 \
   -o ../structs.rs                                                  \
   -x c++ -std=gnu++0x                                               \
   -allow-unknown-types                                              \
   "-I$DIST_INCLUDE" "-I$DIST_INCLUDE/nspr"                          \
   "-I$1/../nsprpub/pr/include"                                      \
   $PLATFORM_DEPENDENT_DEFINES                                       \
   -ignore-functions                                                 \
-  -no-bitfield-methods                                              \
   -no-type-renaming                                                 \
   -DMOZILLA_INTERNAL_API                                            \
   -DMOZ_STYLO_BINDINGS=1                                            \
   -DJS_DEBUG=1                                                      \
   -DDEBUG=1 -DTRACING=1 -DOS_POSIX=1                                \
   -DIMPL_LIBXUL                                                     \
   -include "nsThemeConstants.h"                                     \
   -match "RefCountType.h"                                           \
@@ -94,23 +93,27 @@ export RUST_BACKTRACE=1
   -match "nsStyleConsts.h"                                          \
   -match "nsCSSValue.h"                                             \
   -match "SheetType.h"                                              \
   -match "nsIPrincipal.h"                                           \
   -match "nsDataHashtable.h"                                        \
   -match "nsCSSScanner.h"                                           \
   -match "Types.h"                                                  \
   -match "utility"                                                  \
+  -match "nsTArray"                                                 \
   -match "pair"                                                     \
   -match "SheetParsingMode.h"                                       \
   -match "StaticPtr.h"                                              \
   -match "nsProxyRelease.h"                                         \
   -blacklist-type "IsDestructibleFallbackImpl"                      \
   -blacklist-type "IsDestructibleFallback"                          \
   -blacklist-type "nsProxyReleaseEvent"                             \
+  -blacklist-type "FallibleTArray"                                  \
+  -blacklist-type "nsTArray_Impl"                                   \
+  -blacklist-type "__is_tuple_like_impl"                            \
   -opaque-type "nsIntMargin"                                        \
   -opaque-type "nsIntPoint"                                         \
   -opaque-type "nsIntRect"                                          \
   -opaque-type "nsCOMArray"                                         \
   -opaque-type "nsDependentString"                                  \
   -opaque-type "EntryStore"                                         \
   -opaque-type "gfxFontFeatureValueSet"                             \
   -opaque-type "imgRequestProxy"                                    \
@@ -125,12 +128,16 @@ export RUST_BACKTRACE=1
   -include "$1/mozilla-config.h"                                    \
   "$DIST_INCLUDE/nsStyleStruct.h"
 
 if [ $? -ne 0 ]; then
   echo -e "\e[91mwarning:\e[0m bindgen exited with nonzero exit status"
 else
   echo -e "\e[34minfo:\e[0m bindgen exited successfully, running tests"
   TESTS_FILE=$(mktemp)
-  rustc ../structs.rs --test -o $TESTS_FILE
+  TESTS_SRC=$(mktemp)
+  echo "#![feature(const_fn)]" > $TESTS_SRC
+  cat ../structs.rs >> $TESTS_SRC
+  rustc $TESTS_SRC --test -o $TESTS_FILE
   $TESTS_FILE
   rm $TESTS_FILE
+  rm $TESTS_SRC
 fi
--- a/servo/ports/geckolib/properties.mako.rs
+++ b/servo/ports/geckolib/properties.mako.rs
@@ -13,21 +13,25 @@ use app_units::Au;
 % for style_struct in data.style_structs:
 use gecko_bindings::structs::${style_struct.gecko_ffi_name};
 use gecko_bindings::bindings::Gecko_Construct_${style_struct.gecko_ffi_name};
 use gecko_bindings::bindings::Gecko_CopyConstruct_${style_struct.gecko_ffi_name};
 use gecko_bindings::bindings::Gecko_Destroy_${style_struct.gecko_ffi_name};
 % endfor
 use gecko_bindings::bindings::{Gecko_CopyMozBindingFrom, Gecko_CopyListStyleTypeFrom};
 use gecko_bindings::bindings::{Gecko_SetMozBinding, Gecko_SetListStyleType};
+use gecko_bindings::bindings::{Gecko_SetNullImageValue, Gecko_SetGradientImageValue};
+use gecko_bindings::bindings::{Gecko_CreateGradient};
+use gecko_bindings::bindings::{Gecko_CopyImageValueFrom};
 use gecko_bindings::structs;
 use glue::ArcHelpers;
 use std::fmt::{self, Debug};
-use std::mem::{transmute, zeroed};
+use std::mem::{transmute, uninitialized, zeroed};
 use std::sync::Arc;
+use std::cmp;
 use style::custom_properties::ComputedValuesMap;
 use style::logical_geometry::WritingMode;
 use style::properties::{CascadePropertyFn, ServoComputedValues, ComputedValues};
 use style::properties::longhands;
 use style::properties::make_cascade_vec;
 use style::properties::style_struct_traits::*;
 use values::{StyleCoordHelpers, ToGeckoStyleCoord, convert_nscolor_to_rgba};
 use values::{convert_rgba_to_nscolor, debug_assert_unit_is_safe_to_copy};
@@ -374,17 +378,17 @@ impl Debug for ${style_struct.gecko_stru
 
    #
    # Make a list of types we can't auto-generate.
    #
    force_stub = [];
    # These are currently being shuffled to a different style struct on the gecko side.
    force_stub += ["backface-visibility", "transform-box", "transform-style"]
    # These live in nsStyleImageLayers in gecko. Need to figure out what to do about that.
-   force_stub += ["background-repeat", "background-attachment", "background-clip", "background-origin"];
+   force_stub += ["background-attachment", "background-clip", "background-origin"];
    # These live in an nsFont member in Gecko. Should be straightforward to do manually.
    force_stub += ["font-kerning", "font-stretch", "font-variant"]
    # These have unusual representations in gecko.
    force_stub += ["list-style-type", "text-overflow"]
    # Enum class instead of NS_STYLE_...
    force_stub += ["box-sizing"]
    # These are booleans.
    force_stub += ["page-break-after", "page-break-before"]
@@ -485,16 +489,17 @@ fn static_assert() {
         % endfor
     }
     // Note: using the above technique with an enum hits a rust bug when |structs| is in a different crate.
     % for side in SIDES:
     { const DETAIL: u32 = [0][(structs::Side::eSide${side.name} as usize != ${side.index}) as usize]; let _ = DETAIL; }
     % endfor
 }
 
+
 <% border_style_keyword = Keyword("border-style",
                                   "none solid double dotted dashed hidden groove ridge inset outset") %>
 
 <% skip_border_longhands = " ".join(["border-{0}-{1}".format(x.ident, y)
                                      for x in SIDES
                                      for y in ["color", "style", "width"]] +
                                     ["border-{0}-radius".format(x.ident.replace("_", "-"))
                                      for x in CORNERS]) %>
@@ -701,20 +706,138 @@ fn static_assert() {
             }
         }
     }
     fn copy__moz_binding_from(&mut self, other: &Self) {
         unsafe { Gecko_CopyMozBindingFrom(&mut self.gecko, &other.gecko); }
     }
 </%self:impl_trait>
 
-<%self:impl_trait style_struct_name="Background" skip_longhands="background-color" skip_additionals="*">
+<%self:impl_trait style_struct_name="Background"
+                  skip_longhands="background-color background-repeat background-image"
+                  skip_additionals="*">
 
     <% impl_color("background_color", "mBackgroundColor") %>
 
+    fn copy_background_repeat_from(&mut self, other: &Self) {
+        self.gecko.mImage.mRepeatCount = other.gecko.mImage.mRepeatCount;
+        self.gecko.mImage.mLayers.mFirstElement.mRepeat =
+            other.gecko.mImage.mLayers.mFirstElement.mRepeat;
+    }
+
+    fn set_background_repeat(&mut self, v: longhands::background_repeat::computed_value::T) {
+        use style::properties::longhands::background_repeat::computed_value::T as Computed;
+        use gecko_bindings::structs::{NS_STYLE_IMAGELAYER_REPEAT_REPEAT, NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT};
+        use gecko_bindings::structs::nsStyleImageLayers_Repeat;
+        let (repeat_x, repeat_y) = match v {
+            Computed::repeat_x => (NS_STYLE_IMAGELAYER_REPEAT_REPEAT,
+                                   NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT),
+            Computed::repeat_y => (NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT,
+                                   NS_STYLE_IMAGELAYER_REPEAT_REPEAT),
+            Computed::repeat => (NS_STYLE_IMAGELAYER_REPEAT_REPEAT,
+                                 NS_STYLE_IMAGELAYER_REPEAT_REPEAT),
+            Computed::no_repeat => (NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT,
+                                    NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT),
+        };
+
+        self.gecko.mImage.mRepeatCount = 1;
+        self.gecko.mImage.mLayers.mFirstElement.mRepeat = nsStyleImageLayers_Repeat {
+            mXRepeat: repeat_x as u8,
+            mYRepeat: repeat_y as u8,
+        };
+    }
+
+    fn copy_background_image_from(&mut self, other: &Self) {
+        unsafe {
+            Gecko_CopyImageValueFrom(&mut self.gecko.mImage.mLayers.mFirstElement.mImage,
+                                     &other.gecko.mImage.mLayers.mFirstElement.mImage);
+        }
+    }
+
+    fn set_background_image(&mut self, image: longhands::background_image::computed_value::T) {
+        use gecko_bindings::structs::{NS_STYLE_GRADIENT_SHAPE_LINEAR, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER};
+        use gecko_bindings::structs::nsStyleCoord;
+        use style::values::computed::Image;
+        use style::values::specified::AngleOrCorner;
+        use cssparser::Color as CSSColor;
+
+        unsafe {
+            // Prevent leaking of the last element we did set
+            Gecko_SetNullImageValue(&mut self.gecko.mImage.mLayers.mFirstElement.mImage);
+        }
+
+        self.gecko.mImage.mImageCount = cmp::max(1, self.gecko.mImage.mImageCount);
+        if let Some(image) = image.0 {
+            match image {
+                Image::LinearGradient(ref gradient) => {
+                    let stop_count = gradient.stops.len();
+                    if stop_count >= ::std::u32::MAX as usize {
+                        warn!("stylo: Prevented overflow due to too many gradient stops");
+                        return;
+                    }
+
+                    let gecko_gradient = unsafe {
+                        Gecko_CreateGradient(NS_STYLE_GRADIENT_SHAPE_LINEAR as u8,
+                                             NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as u8,
+                                             /* repeating = */ false,
+                                             /* legacy_syntax = */ false,
+                                             stop_count as u32)
+                    };
+
+                    // TODO: figure out what gecko does in the `corner` case.
+                    if let AngleOrCorner::Angle(angle) = gradient.angle_or_corner {
+                        unsafe {
+                            (*gecko_gradient).mAngle.set(angle);
+                        }
+                    }
+
+                    let mut coord: nsStyleCoord = unsafe { uninitialized() };
+                    for (index, stop) in gradient.stops.iter().enumerate() {
+                        // NB: stops are guaranteed to be none in the gecko side by
+                        // default.
+                        coord.set(stop.position);
+                        let color = match stop.color {
+                            CSSColor::CurrentColor => {
+                                // TODO(emilio): gecko just stores an nscolor,
+                                // and it doesn't seem to support currentColor
+                                // as value in a gradient.
+                                //
+                                // Double-check it and either remove
+                                // currentColor for servo or see how gecko
+                                // handles this.
+                                0
+                            },
+                            CSSColor::RGBA(ref rgba) => convert_rgba_to_nscolor(rgba),
+                        };
+
+                        let mut stop = unsafe {
+                            &mut (*gecko_gradient).mStops[index]
+                        };
+
+                        stop.mColor = color;
+                        stop.mIsInterpolationHint = false;
+                        stop.mLocation.copy_from(&coord);
+                    }
+
+                    unsafe {
+                        Gecko_SetGradientImageValue(&mut self.gecko.mImage.mLayers.mFirstElement.mImage,
+                                                    gecko_gradient);
+                    }
+                },
+                Image::Url(_) => {
+                    // let utf8_bytes = url.as_bytes();
+                    // Gecko_SetUrlImageValue(&mut self.gecko.mImage.mLayers.mFirstElement,
+                    //                        utf8_bytes.as_ptr() as *const _,
+                    //                        utf8_bytes.len());
+                    warn!("stylo: imgRequestProxies are not threadsafe in gecko, \
+                           background-image: url() not yet implemented");
+                }
+            }
+        }
+    }
 </%self:impl_trait>
 
 <%self:impl_trait style_struct_name="List" skip_longhands="list-style-type" skip_additionals="*">
 
     <% impl_keyword_setter("list_style_type", "__LIST_STYLE_TYPE__",
                            data.longhands_by_name["list-style-type"].keyword) %>
     fn copy_list_style_type_from(&mut self, other: &Self) {
         unsafe {
--- a/servo/ports/geckolib/values.rs
+++ b/servo/ports/geckolib/values.rs
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use app_units::Au;
 use cssparser::RGBA;
 use gecko_bindings::structs::{nsStyleCoord, nsStyleUnion, nsStyleUnit};
 use std::cmp::max;
+use style::values::computed::Angle;
 use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
 
 pub trait StyleCoordHelpers {
     fn copy_from(&mut self, other: &Self);
     fn set<T: ToGeckoStyleCoord>(&mut self, val: T);
     fn set_auto(&mut self);
     fn set_normal(&mut self);
     fn set_coord(&mut self, val: Au);
@@ -123,16 +124,36 @@ impl ToGeckoStyleCoord for LengthOrPerce
                 *unit = nsStyleUnit::eStyleUnit_None;
                 unsafe { *union.mInt.as_mut() = 0; }
             },
             LengthOrPercentageOrNone::Calc(_) => unimplemented!(),
         };
     }
 }
 
+impl<T: ToGeckoStyleCoord> ToGeckoStyleCoord for Option<T> {
+    fn to_gecko_style_coord(&self, unit: &mut nsStyleUnit, union: &mut nsStyleUnion) {
+        if let Some(ref me) = *self {
+            me.to_gecko_style_coord(unit, union);
+        } else {
+            *unit = nsStyleUnit::eStyleUnit_None;
+            unsafe { *union.mInt.as_mut() = 0; }
+        }
+    }
+}
+
+impl ToGeckoStyleCoord for Angle {
+    fn to_gecko_style_coord(&self,
+                            unit: &mut nsStyleUnit,
+                            union: &mut nsStyleUnion) {
+        *unit = nsStyleUnit::eStyleUnit_Radian;
+        unsafe { *union.mFloat.as_mut() = self.radians() };
+    }
+}
+
 pub fn convert_rgba_to_nscolor(rgba: &RGBA) -> u32 {
     (((rgba.alpha * 255.0).round() as u32) << 24) |
     (((rgba.blue  * 255.0).round() as u32) << 16) |
     (((rgba.green * 255.0).round() as u32) << 8) |
      ((rgba.red   * 255.0).round() as u32)
 }
 
 pub fn convert_nscolor_to_rgba(color: u32) -> RGBA {