servo: Merge #13200 - Resync bindings (from Manishearth:resync); r=bholley
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 09 Sep 2016 02:00:13 -0500
changeset 339667 baeebf74a83e6b234b831818182f23bd4900b24c
parent 339666 9db39658edadf80a4429eff968f2cd71bbc5efdc
child 339668 4cfda76f1f71ee080d10800ef8d57818369902b1
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)
reviewersbholley
servo: Merge #13200 - Resync bindings (from Manishearth:resync); r=bholley StyleClear and StyleDisplay are now enums, updating bindings for them. r? @bholley Source-Repo: https://github.com/servo/servo Source-Revision: 957893bdc2132cf39a505b6ca681ca56c427c049
servo/components/style/properties/gecko.mako.rs
servo/components/style/properties/longhand/box.mako.rs
servo/ports/geckolib/gecko_bindings/structs_debug.rs
servo/ports/geckolib/gecko_bindings/structs_release.rs
servo/ports/geckolib/glue.rs
servo/ports/geckolib/wrapper.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -843,17 +843,18 @@ fn static_assert() {
                           -moz-binding page-break-before page-break-after""" %>
 <%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
 
     // We manually-implement the |display| property until we get general
     // infrastructure for preffing certain values.
     <% display_keyword = Keyword("display", "inline block inline-block table inline-table table-row-group " +
                                             "table-header-group table-footer-group table-row table-column-group " +
                                             "table-column table-cell table-caption list-item flex none " +
-                                            "-moz-box -moz-inline-box") %>
+                                            "-moz-box -moz-inline-box",
+                                            gecko_enum_prefix="StyleDisplay") %>
     ${impl_keyword('display', 'mDisplay', display_keyword, True)}
 
     // overflow-y is implemented as a newtype of overflow-x, so we need special handling.
     // We could generalize this if we run into other newtype keywords.
     <% overflow_x = data.longhands_by_name["overflow-x"] %>
     pub fn set_overflow_y(&mut self, v: longhands::overflow_y::computed_value::T) {
         use properties::longhands::overflow_x::computed_value::T as BaseType;
         // FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -115,17 +115,18 @@
                 *self
             }
         }
     }
 
 </%helpers:single_keyword_computed>
 
 ${helpers.single_keyword("clear", "none left right both",
-                         animatable=False, gecko_ffi_name="mBreakType")}
+                         animatable=False, gecko_ffi_name="mBreakType",
+                         gecko_enum_prefix="StyleClear")}
 
 <%helpers:longhand name="-servo-display-for-hypothetical-box"
                    animatable="False"
                    derived_from="display"
                    products="servo">
     pub use super::display::{SpecifiedValue, get_initial_value};
     pub use super::display::{parse};
 
--- a/servo/ports/geckolib/gecko_bindings/structs_debug.rs
+++ b/servo/ports/geckolib/gecko_bindings/structs_debug.rs
@@ -320,23 +320,16 @@ pub const NS_STYLE_BORDER_STYLE_OUTSET: 
 pub const NS_STYLE_BORDER_STYLE_HIDDEN: ::std::os::raw::c_uint = 9;
 pub const NS_STYLE_BORDER_STYLE_AUTO: ::std::os::raw::c_uint = 10;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_ROUND: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_SPACE: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_BORDER_IMAGE_SLICE_NOFILL: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_BORDER_IMAGE_SLICE_FILL: ::std::os::raw::c_uint = 1;
-pub const NS_STYLE_CLEAR_NONE: ::std::os::raw::c_uint = 0;
-pub const NS_STYLE_CLEAR_LEFT: ::std::os::raw::c_uint = 1;
-pub const NS_STYLE_CLEAR_RIGHT: ::std::os::raw::c_uint = 2;
-pub const NS_STYLE_CLEAR_INLINE_START: ::std::os::raw::c_uint = 3;
-pub const NS_STYLE_CLEAR_INLINE_END: ::std::os::raw::c_uint = 4;
-pub const NS_STYLE_CLEAR_BOTH: ::std::os::raw::c_uint = 5;
-pub const NS_STYLE_CLEAR_LINE: ::std::os::raw::c_uint = 8;
 pub const NS_STYLE_CONTENT_OPEN_QUOTE: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_CONTENT_CLOSE_QUOTE: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_CONTENT_NO_OPEN_QUOTE: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_CONTENT_NO_CLOSE_QUOTE: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_CONTENT_ALT_CONTENT: ::std::os::raw::c_uint = 4;
 pub const NS_STYLE_CURSOR_AUTO: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_CURSOR_CROSSHAIR: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_CURSOR_DEFAULT: ::std::os::raw::c_uint = 3;
@@ -374,54 +367,16 @@ pub const NS_STYLE_CURSOR_NS_RESIZE: ::s
 pub const NS_STYLE_CURSOR_EW_RESIZE: ::std::os::raw::c_uint = 35;
 pub const NS_STYLE_CURSOR_NONE: ::std::os::raw::c_uint = 36;
 pub const NS_STYLE_DIRECTION_LTR: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_DIRECTION_RTL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_WRITING_MODE_HORIZONTAL_TB: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_WRITING_MODE_VERTICAL_RL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_WRITING_MODE_VERTICAL_LR: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_WRITING_MODE_SIDEWAYS_MASK: ::std::os::raw::c_uint = 4;
-pub const NS_STYLE_DISPLAY_NONE: ::std::os::raw::c_uint = 0;
-pub const NS_STYLE_DISPLAY_BLOCK: ::std::os::raw::c_uint = 1;
-pub const NS_STYLE_DISPLAY_INLINE: ::std::os::raw::c_uint = 2;
-pub const NS_STYLE_DISPLAY_INLINE_BLOCK: ::std::os::raw::c_uint = 3;
-pub const NS_STYLE_DISPLAY_LIST_ITEM: ::std::os::raw::c_uint = 4;
-pub const NS_STYLE_DISPLAY_TABLE: ::std::os::raw::c_uint = 8;
-pub const NS_STYLE_DISPLAY_INLINE_TABLE: ::std::os::raw::c_uint = 9;
-pub const NS_STYLE_DISPLAY_TABLE_ROW_GROUP: ::std::os::raw::c_uint = 10;
-pub const NS_STYLE_DISPLAY_TABLE_COLUMN: ::std::os::raw::c_uint = 11;
-pub const NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP: ::std::os::raw::c_uint = 12;
-pub const NS_STYLE_DISPLAY_TABLE_HEADER_GROUP: ::std::os::raw::c_uint = 13;
-pub const NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP: ::std::os::raw::c_uint = 14;
-pub const NS_STYLE_DISPLAY_TABLE_ROW: ::std::os::raw::c_uint = 15;
-pub const NS_STYLE_DISPLAY_TABLE_CELL: ::std::os::raw::c_uint = 16;
-pub const NS_STYLE_DISPLAY_TABLE_CAPTION: ::std::os::raw::c_uint = 17;
-pub const NS_STYLE_DISPLAY_BOX: ::std::os::raw::c_uint = 18;
-pub const NS_STYLE_DISPLAY_INLINE_BOX: ::std::os::raw::c_uint = 19;
-pub const NS_STYLE_DISPLAY_XUL_GRID: ::std::os::raw::c_uint = 20;
-pub const NS_STYLE_DISPLAY_INLINE_XUL_GRID: ::std::os::raw::c_uint = 21;
-pub const NS_STYLE_DISPLAY_XUL_GRID_GROUP: ::std::os::raw::c_uint = 22;
-pub const NS_STYLE_DISPLAY_XUL_GRID_LINE: ::std::os::raw::c_uint = 23;
-pub const NS_STYLE_DISPLAY_STACK: ::std::os::raw::c_uint = 24;
-pub const NS_STYLE_DISPLAY_INLINE_STACK: ::std::os::raw::c_uint = 25;
-pub const NS_STYLE_DISPLAY_DECK: ::std::os::raw::c_uint = 26;
-pub const NS_STYLE_DISPLAY_POPUP: ::std::os::raw::c_uint = 27;
-pub const NS_STYLE_DISPLAY_GROUPBOX: ::std::os::raw::c_uint = 28;
-pub const NS_STYLE_DISPLAY_FLEX: ::std::os::raw::c_uint = 29;
-pub const NS_STYLE_DISPLAY_INLINE_FLEX: ::std::os::raw::c_uint = 30;
-pub const NS_STYLE_DISPLAY_GRID: ::std::os::raw::c_uint = 31;
-pub const NS_STYLE_DISPLAY_INLINE_GRID: ::std::os::raw::c_uint = 32;
-pub const NS_STYLE_DISPLAY_RUBY: ::std::os::raw::c_uint = 33;
-pub const NS_STYLE_DISPLAY_RUBY_BASE: ::std::os::raw::c_uint = 34;
-pub const NS_STYLE_DISPLAY_RUBY_BASE_CONTAINER: ::std::os::raw::c_uint = 35;
-pub const NS_STYLE_DISPLAY_RUBY_TEXT: ::std::os::raw::c_uint = 36;
-pub const NS_STYLE_DISPLAY_RUBY_TEXT_CONTAINER: ::std::os::raw::c_uint = 37;
-pub const NS_STYLE_DISPLAY_CONTENTS: ::std::os::raw::c_uint = 38;
-pub const NS_STYLE_DISPLAY_WEBKIT_BOX: ::std::os::raw::c_uint = 39;
-pub const NS_STYLE_DISPLAY_WEBKIT_INLINE_BOX: ::std::os::raw::c_uint = 40;
 pub const NS_STYLE_CONTAIN_NONE: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_CONTAIN_STRICT: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_CONTAIN_LAYOUT: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_CONTAIN_STYLE: ::std::os::raw::c_uint = 4;
 pub const NS_STYLE_CONTAIN_PAINT: ::std::os::raw::c_uint = 8;
 pub const NS_STYLE_ALIGN_AUTO: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_ALIGN_NORMAL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_ALIGN_START: ::std::os::raw::c_uint = 2;
@@ -2541,16 +2496,51 @@ impl ::std::clone::Clone for piecewise_c
     fn clone(&self) -> Self { *self }
 }
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct pair<_T1, _T2> {
     pub first: _T1,
     pub second: _T2,
 }
+pub enum nsIContentSecurityPolicy { }
+pub enum nsIDOMDocument { }
+#[repr(C)]
+pub struct nsIPrincipal {
+    pub _bindgen_opaque_blob: u64,
+}
+#[test]
+fn bindgen_test_layout_nsIPrincipal() {
+    assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
+    assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsIExpandedPrincipal {
+    pub _base: nsISupports,
+}
+#[repr(C)]
+pub struct _vftable_nsIExpandedPrincipal {
+    pub _base: _vftable_nsISupports,
+}
+impl ::std::clone::Clone for nsIExpandedPrincipal {
+    fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsIURI {
+    pub _base: nsISupports,
+}
+#[repr(C)]
+pub struct _vftable_nsIURI {
+    pub _base: _vftable_nsISupports,
+}
+impl ::std::clone::Clone for nsIURI {
+    fn clone(&self) -> Self { *self }
+}
 pub type PLDHashNumber = u32;
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct PLDHashEntryHdr {
     pub mKeyHash: PLDHashNumber,
 }
 impl ::std::clone::Clone for PLDHashEntryHdr {
     fn clone(&self) -> Self { *self }
@@ -2759,51 +2749,16 @@ pub struct nsTHashtable_Iterator<EntryTy
 pub struct VoidPtrHashKey {
     pub _base: [u64; 2usize],
 }
 impl ::std::clone::Clone for VoidPtrHashKey {
     fn clone(&self) -> Self { *self }
 }
 #[repr(C)]
 pub struct nsDataHashtable;
-pub enum nsIContentSecurityPolicy { }
-pub enum nsIDOMDocument { }
-#[repr(C)]
-pub struct nsIPrincipal {
-    pub _bindgen_opaque_blob: u64,
-}
-#[test]
-fn bindgen_test_layout_nsIPrincipal() {
-    assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
-    assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
-}
-#[repr(C)]
-#[derive(Debug, Copy)]
-pub struct nsIExpandedPrincipal {
-    pub _base: nsISupports,
-}
-#[repr(C)]
-pub struct _vftable_nsIExpandedPrincipal {
-    pub _base: _vftable_nsISupports,
-}
-impl ::std::clone::Clone for nsIExpandedPrincipal {
-    fn clone(&self) -> Self { *self }
-}
-#[repr(C)]
-#[derive(Debug, Copy)]
-pub struct nsIURI {
-    pub _base: nsISupports,
-}
-#[repr(C)]
-pub struct _vftable_nsIURI {
-    pub _base: _vftable_nsISupports,
-}
-impl ::std::clone::Clone for nsIURI {
-    fn clone(&self) -> Self { *self }
-}
 pub type nsLoadFlags = u32;
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct nsIRequest {
     pub _base: nsISupports,
 }
 #[repr(C)]
 pub struct _vftable_nsIRequest {
@@ -3427,17 +3382,17 @@ pub enum nsAttrValue_ValueType {
 }
 /**
    * Structure for a mapping from int (enum) values to strings.  When you use
    * it you generally create an array of them.
    * Instantiate like this:
    * EnumTable myTable[] = {
    *   { "string1", 1 },
    *   { "string2", 2 },
-   *   { 0 }
+   *   { nullptr, 0 }
    * }
    */
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct nsAttrValue_EnumTable {
     /** The string the value maps to */
     pub tag: *const ::std::os::raw::c_char,
     /** The enum value that maps to this string */
@@ -3995,16 +3950,28 @@ pub enum StyleBoxPack { Start = 0, Cente
 #[repr(i8)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum StyleBoxSizing { Content = 0, Border = 1, }
 #[repr(i8)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum StyleBoxShadowType { Inset = 0, }
 #[repr(i8)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+pub enum StyleClear {
+    None_ = 0,
+    Left = 1,
+    Right = 2,
+    InlineStart = 3,
+    InlineEnd = 4,
+    Both = 5,
+    Line = 8,
+    Max = 13,
+}
+#[repr(i8)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum StyleClipPathGeometryBox {
     NoBox = 0,
     Content = 1,
     Padding = 2,
     Border = 3,
     Margin = 4,
     Fill = 5,
     Stroke = 6,
@@ -4058,16 +4025,58 @@ pub enum StyleUserSelect {
     Elements = 3,
     All = 4,
     Toggle = 5,
     TriState = 6,
     Auto = 7,
     MozAll = 8,
     MozText = 9,
 }
+#[repr(i8)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+pub enum StyleDisplay {
+    None_ = 0,
+    Block = 1,
+    Inline = 2,
+    InlineBlock = 3,
+    ListItem = 4,
+    Table = 5,
+    InlineTable = 6,
+    TableRowGroup = 7,
+    TableColumn = 8,
+    TableColumnGroup = 9,
+    TableHeaderGroup = 10,
+    TableFooterGroup = 11,
+    TableRow = 12,
+    TableCell = 13,
+    TableCaption = 14,
+    Flex = 15,
+    InlineFlex = 16,
+    Grid = 17,
+    InlineGrid = 18,
+    Ruby = 19,
+    RubyBase = 20,
+    RubyBaseContainer = 21,
+    RubyText = 22,
+    RubyTextContainer = 23,
+    Contents = 24,
+    WebkitBox = 25,
+    WebkitInlineBox = 26,
+    Box = 27,
+    InlineBox = 28,
+    XulGrid = 29,
+    InlineXulGrid = 30,
+    XulGridGroup = 31,
+    XulGridLine = 32,
+    Stack = 33,
+    InlineStack = 34,
+    Deck = 35,
+    Groupbox = 36,
+    Popup = 37,
+}
 pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_z_index;
 pub const eCSSProperty_all: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_COUNT_no_shorthands;
 pub const eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_transition;
 pub const eCSSPropertyAlias_WordWrap: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_COUNT;
@@ -4157,23 +4166,23 @@ pub enum nsCSSPropertyID {
     eCSSProperty_clear = 75,
     eCSSProperty_clip = 76,
     eCSSProperty_clip_path = 77,
     eCSSProperty_clip_rule = 78,
     eCSSProperty_color = 79,
     eCSSProperty_color_adjust = 80,
     eCSSProperty_color_interpolation = 81,
     eCSSProperty_color_interpolation_filters = 82,
-    eCSSProperty__moz_column_count = 83,
-    eCSSProperty__moz_column_fill = 84,
-    eCSSProperty__moz_column_gap = 85,
-    eCSSProperty__moz_column_rule_color = 86,
-    eCSSProperty__moz_column_rule_style = 87,
-    eCSSProperty__moz_column_rule_width = 88,
-    eCSSProperty__moz_column_width = 89,
+    eCSSProperty_column_count = 83,
+    eCSSProperty_column_fill = 84,
+    eCSSProperty_column_gap = 85,
+    eCSSProperty_column_rule_color = 86,
+    eCSSProperty_column_rule_style = 87,
+    eCSSProperty_column_rule_width = 88,
+    eCSSProperty_column_width = 89,
     eCSSProperty_contain = 90,
     eCSSProperty_content = 91,
     eCSSProperty__moz_control_character_visibility = 92,
     eCSSProperty_counter_increment = 93,
     eCSSProperty_counter_reset = 94,
     eCSSProperty_cursor = 95,
     eCSSProperty_direction = 96,
     eCSSProperty_display = 97,
@@ -4407,18 +4416,18 @@ pub enum nsCSSPropertyID {
     eCSSProperty_border_inline_end = 325,
     eCSSProperty_border_inline_start = 326,
     eCSSProperty_border_left = 327,
     eCSSProperty_border_radius = 328,
     eCSSProperty_border_right = 329,
     eCSSProperty_border_style = 330,
     eCSSProperty_border_top = 331,
     eCSSProperty_border_width = 332,
-    eCSSProperty__moz_column_rule = 333,
-    eCSSProperty__moz_columns = 334,
+    eCSSProperty_column_rule = 333,
+    eCSSProperty_columns = 334,
     eCSSProperty_flex = 335,
     eCSSProperty_flex_flow = 336,
     eCSSProperty_font = 337,
     eCSSProperty_font_variant = 338,
     eCSSProperty_grid = 339,
     eCSSProperty_grid_area = 340,
     eCSSProperty_grid_column = 341,
     eCSSProperty_grid_gap = 342,
@@ -4639,39 +4648,39 @@ pub struct nsMainThreadPtrHolder<T> {
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsMainThreadPtrHandle<T> {
     pub mPtr: RefPtr<T>,
 }
 pub enum CSSStyleSheet { }
 #[repr(C)]
 pub struct URLValueData {
-    pub _bindgen_opaque_blob: [u64; 5usize],
+    pub _bindgen_opaque_blob: [u64; 6usize],
 }
 #[test]
 fn bindgen_test_layout_URLValueData() {
-    assert_eq!(::std::mem::size_of::<URLValueData>() , 40usize);
+    assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize);
     assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize);
 }
 #[repr(C)]
 pub struct URLValue {
-    pub _bindgen_opaque_blob: [u64; 6usize],
+    pub _bindgen_opaque_blob: [u64; 7usize],
 }
 #[test]
 fn bindgen_test_layout_URLValue() {
-    assert_eq!(::std::mem::size_of::<URLValue>() , 48usize);
+    assert_eq!(::std::mem::size_of::<URLValue>() , 56usize);
     assert_eq!(::std::mem::align_of::<URLValue>() , 8usize);
 }
 #[repr(C)]
 pub struct ImageValue {
-    pub _bindgen_opaque_blob: [u64; 13usize],
+    pub _bindgen_opaque_blob: [u64; 14usize],
 }
 #[test]
 fn bindgen_test_layout_ImageValue() {
-    assert_eq!(::std::mem::size_of::<ImageValue>() , 104usize);
+    assert_eq!(::std::mem::size_of::<ImageValue>() , 112usize);
     assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct GridNamedArea {
     pub mName: nsString,
     pub mColumnStart: u32,
     pub mColumnEnd: u32,
@@ -6451,24 +6460,24 @@ impl <ReferenceBox> StyleShapeSource_nsS
         ::std::mem::transmute(raw.offset(0))
     }
 }
 pub type StyleClipPath = StyleShapeSource<StyleClipPathGeometryBox>;
 pub type StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>;
 #[repr(C)]
 pub struct nsStyleDisplay {
     pub mBinding: RefPtr<URLValue>,
-    pub mDisplay: u8,
-    pub mOriginalDisplay: u8,
+    pub mDisplay: StyleDisplay,
+    pub mOriginalDisplay: StyleDisplay,
     pub mContain: u8,
     pub mAppearance: u8,
     pub mPosition: u8,
     pub mFloat: StyleFloat,
     pub mOriginalFloat: StyleFloat,
-    pub mBreakType: u8,
+    pub mBreakType: StyleClear,
     pub mBreakInside: u8,
     pub mBreakBefore: bool,
     pub mBreakAfter: bool,
     pub mOverflowX: u8,
     pub mOverflowY: u8,
     pub mOverflowClipBox: u8,
     pub mResize: u8,
     pub mOrient: u8,
--- a/servo/ports/geckolib/gecko_bindings/structs_release.rs
+++ b/servo/ports/geckolib/gecko_bindings/structs_release.rs
@@ -320,23 +320,16 @@ pub const NS_STYLE_BORDER_STYLE_OUTSET: 
 pub const NS_STYLE_BORDER_STYLE_HIDDEN: ::std::os::raw::c_uint = 9;
 pub const NS_STYLE_BORDER_STYLE_AUTO: ::std::os::raw::c_uint = 10;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_ROUND: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_BORDER_IMAGE_REPEAT_SPACE: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_BORDER_IMAGE_SLICE_NOFILL: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_BORDER_IMAGE_SLICE_FILL: ::std::os::raw::c_uint = 1;
-pub const NS_STYLE_CLEAR_NONE: ::std::os::raw::c_uint = 0;
-pub const NS_STYLE_CLEAR_LEFT: ::std::os::raw::c_uint = 1;
-pub const NS_STYLE_CLEAR_RIGHT: ::std::os::raw::c_uint = 2;
-pub const NS_STYLE_CLEAR_INLINE_START: ::std::os::raw::c_uint = 3;
-pub const NS_STYLE_CLEAR_INLINE_END: ::std::os::raw::c_uint = 4;
-pub const NS_STYLE_CLEAR_BOTH: ::std::os::raw::c_uint = 5;
-pub const NS_STYLE_CLEAR_LINE: ::std::os::raw::c_uint = 8;
 pub const NS_STYLE_CONTENT_OPEN_QUOTE: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_CONTENT_CLOSE_QUOTE: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_CONTENT_NO_OPEN_QUOTE: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_CONTENT_NO_CLOSE_QUOTE: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_CONTENT_ALT_CONTENT: ::std::os::raw::c_uint = 4;
 pub const NS_STYLE_CURSOR_AUTO: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_CURSOR_CROSSHAIR: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_CURSOR_DEFAULT: ::std::os::raw::c_uint = 3;
@@ -374,54 +367,16 @@ pub const NS_STYLE_CURSOR_NS_RESIZE: ::s
 pub const NS_STYLE_CURSOR_EW_RESIZE: ::std::os::raw::c_uint = 35;
 pub const NS_STYLE_CURSOR_NONE: ::std::os::raw::c_uint = 36;
 pub const NS_STYLE_DIRECTION_LTR: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_DIRECTION_RTL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_WRITING_MODE_HORIZONTAL_TB: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_WRITING_MODE_VERTICAL_RL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_WRITING_MODE_VERTICAL_LR: ::std::os::raw::c_uint = 3;
 pub const NS_STYLE_WRITING_MODE_SIDEWAYS_MASK: ::std::os::raw::c_uint = 4;
-pub const NS_STYLE_DISPLAY_NONE: ::std::os::raw::c_uint = 0;
-pub const NS_STYLE_DISPLAY_BLOCK: ::std::os::raw::c_uint = 1;
-pub const NS_STYLE_DISPLAY_INLINE: ::std::os::raw::c_uint = 2;
-pub const NS_STYLE_DISPLAY_INLINE_BLOCK: ::std::os::raw::c_uint = 3;
-pub const NS_STYLE_DISPLAY_LIST_ITEM: ::std::os::raw::c_uint = 4;
-pub const NS_STYLE_DISPLAY_TABLE: ::std::os::raw::c_uint = 8;
-pub const NS_STYLE_DISPLAY_INLINE_TABLE: ::std::os::raw::c_uint = 9;
-pub const NS_STYLE_DISPLAY_TABLE_ROW_GROUP: ::std::os::raw::c_uint = 10;
-pub const NS_STYLE_DISPLAY_TABLE_COLUMN: ::std::os::raw::c_uint = 11;
-pub const NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP: ::std::os::raw::c_uint = 12;
-pub const NS_STYLE_DISPLAY_TABLE_HEADER_GROUP: ::std::os::raw::c_uint = 13;
-pub const NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP: ::std::os::raw::c_uint = 14;
-pub const NS_STYLE_DISPLAY_TABLE_ROW: ::std::os::raw::c_uint = 15;
-pub const NS_STYLE_DISPLAY_TABLE_CELL: ::std::os::raw::c_uint = 16;
-pub const NS_STYLE_DISPLAY_TABLE_CAPTION: ::std::os::raw::c_uint = 17;
-pub const NS_STYLE_DISPLAY_BOX: ::std::os::raw::c_uint = 18;
-pub const NS_STYLE_DISPLAY_INLINE_BOX: ::std::os::raw::c_uint = 19;
-pub const NS_STYLE_DISPLAY_XUL_GRID: ::std::os::raw::c_uint = 20;
-pub const NS_STYLE_DISPLAY_INLINE_XUL_GRID: ::std::os::raw::c_uint = 21;
-pub const NS_STYLE_DISPLAY_XUL_GRID_GROUP: ::std::os::raw::c_uint = 22;
-pub const NS_STYLE_DISPLAY_XUL_GRID_LINE: ::std::os::raw::c_uint = 23;
-pub const NS_STYLE_DISPLAY_STACK: ::std::os::raw::c_uint = 24;
-pub const NS_STYLE_DISPLAY_INLINE_STACK: ::std::os::raw::c_uint = 25;
-pub const NS_STYLE_DISPLAY_DECK: ::std::os::raw::c_uint = 26;
-pub const NS_STYLE_DISPLAY_POPUP: ::std::os::raw::c_uint = 27;
-pub const NS_STYLE_DISPLAY_GROUPBOX: ::std::os::raw::c_uint = 28;
-pub const NS_STYLE_DISPLAY_FLEX: ::std::os::raw::c_uint = 29;
-pub const NS_STYLE_DISPLAY_INLINE_FLEX: ::std::os::raw::c_uint = 30;
-pub const NS_STYLE_DISPLAY_GRID: ::std::os::raw::c_uint = 31;
-pub const NS_STYLE_DISPLAY_INLINE_GRID: ::std::os::raw::c_uint = 32;
-pub const NS_STYLE_DISPLAY_RUBY: ::std::os::raw::c_uint = 33;
-pub const NS_STYLE_DISPLAY_RUBY_BASE: ::std::os::raw::c_uint = 34;
-pub const NS_STYLE_DISPLAY_RUBY_BASE_CONTAINER: ::std::os::raw::c_uint = 35;
-pub const NS_STYLE_DISPLAY_RUBY_TEXT: ::std::os::raw::c_uint = 36;
-pub const NS_STYLE_DISPLAY_RUBY_TEXT_CONTAINER: ::std::os::raw::c_uint = 37;
-pub const NS_STYLE_DISPLAY_CONTENTS: ::std::os::raw::c_uint = 38;
-pub const NS_STYLE_DISPLAY_WEBKIT_BOX: ::std::os::raw::c_uint = 39;
-pub const NS_STYLE_DISPLAY_WEBKIT_INLINE_BOX: ::std::os::raw::c_uint = 40;
 pub const NS_STYLE_CONTAIN_NONE: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_CONTAIN_STRICT: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_CONTAIN_LAYOUT: ::std::os::raw::c_uint = 2;
 pub const NS_STYLE_CONTAIN_STYLE: ::std::os::raw::c_uint = 4;
 pub const NS_STYLE_CONTAIN_PAINT: ::std::os::raw::c_uint = 8;
 pub const NS_STYLE_ALIGN_AUTO: ::std::os::raw::c_uint = 0;
 pub const NS_STYLE_ALIGN_NORMAL: ::std::os::raw::c_uint = 1;
 pub const NS_STYLE_ALIGN_START: ::std::os::raw::c_uint = 2;
@@ -2542,16 +2497,51 @@ impl ::std::clone::Clone for piecewise_c
     fn clone(&self) -> Self { *self }
 }
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct pair<_T1, _T2> {
     pub first: _T1,
     pub second: _T2,
 }
+pub enum nsIContentSecurityPolicy { }
+pub enum nsIDOMDocument { }
+#[repr(C)]
+pub struct nsIPrincipal {
+    pub _bindgen_opaque_blob: u64,
+}
+#[test]
+fn bindgen_test_layout_nsIPrincipal() {
+    assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
+    assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsIExpandedPrincipal {
+    pub _base: nsISupports,
+}
+#[repr(C)]
+pub struct _vftable_nsIExpandedPrincipal {
+    pub _base: _vftable_nsISupports,
+}
+impl ::std::clone::Clone for nsIExpandedPrincipal {
+    fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsIURI {
+    pub _base: nsISupports,
+}
+#[repr(C)]
+pub struct _vftable_nsIURI {
+    pub _base: _vftable_nsISupports,
+}
+impl ::std::clone::Clone for nsIURI {
+    fn clone(&self) -> Self { *self }
+}
 pub type PLDHashNumber = u32;
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct PLDHashEntryHdr {
     pub mKeyHash: PLDHashNumber,
 }
 impl ::std::clone::Clone for PLDHashEntryHdr {
     fn clone(&self) -> Self { *self }
@@ -2738,51 +2728,16 @@ pub struct nsTHashtable_Iterator<EntryTy
 pub struct VoidPtrHashKey {
     pub _base: [u64; 2usize],
 }
 impl ::std::clone::Clone for VoidPtrHashKey {
     fn clone(&self) -> Self { *self }
 }
 #[repr(C)]
 pub struct nsDataHashtable;
-pub enum nsIContentSecurityPolicy { }
-pub enum nsIDOMDocument { }
-#[repr(C)]
-pub struct nsIPrincipal {
-    pub _bindgen_opaque_blob: u64,
-}
-#[test]
-fn bindgen_test_layout_nsIPrincipal() {
-    assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
-    assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
-}
-#[repr(C)]
-#[derive(Debug, Copy)]
-pub struct nsIExpandedPrincipal {
-    pub _base: nsISupports,
-}
-#[repr(C)]
-pub struct _vftable_nsIExpandedPrincipal {
-    pub _base: _vftable_nsISupports,
-}
-impl ::std::clone::Clone for nsIExpandedPrincipal {
-    fn clone(&self) -> Self { *self }
-}
-#[repr(C)]
-#[derive(Debug, Copy)]
-pub struct nsIURI {
-    pub _base: nsISupports,
-}
-#[repr(C)]
-pub struct _vftable_nsIURI {
-    pub _base: _vftable_nsISupports,
-}
-impl ::std::clone::Clone for nsIURI {
-    fn clone(&self) -> Self { *self }
-}
 pub type nsLoadFlags = u32;
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct nsIRequest {
     pub _base: nsISupports,
 }
 #[repr(C)]
 pub struct _vftable_nsIRequest {
@@ -3406,17 +3361,17 @@ pub enum nsAttrValue_ValueType {
 }
 /**
    * Structure for a mapping from int (enum) values to strings.  When you use
    * it you generally create an array of them.
    * Instantiate like this:
    * EnumTable myTable[] = {
    *   { "string1", 1 },
    *   { "string2", 2 },
-   *   { 0 }
+   *   { nullptr, 0 }
    * }
    */
 #[repr(C)]
 #[derive(Debug, Copy)]
 pub struct nsAttrValue_EnumTable {
     /** The string the value maps to */
     pub tag: *const ::std::os::raw::c_char,
     /** The enum value that maps to this string */
@@ -3974,16 +3929,28 @@ pub enum StyleBoxPack { Start = 0, Cente
 #[repr(i8)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum StyleBoxSizing { Content = 0, Border = 1, }
 #[repr(i8)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum StyleBoxShadowType { Inset = 0, }
 #[repr(i8)]
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+pub enum StyleClear {
+    None_ = 0,
+    Left = 1,
+    Right = 2,
+    InlineStart = 3,
+    InlineEnd = 4,
+    Both = 5,
+    Line = 8,
+    Max = 13,
+}
+#[repr(i8)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
 pub enum StyleClipPathGeometryBox {
     NoBox = 0,
     Content = 1,
     Padding = 2,
     Border = 3,
     Margin = 4,
     Fill = 5,
     Stroke = 6,
@@ -4037,16 +4004,58 @@ pub enum StyleUserSelect {
     Elements = 3,
     All = 4,
     Toggle = 5,
     TriState = 6,
     Auto = 7,
     MozAll = 8,
     MozText = 9,
 }
+#[repr(i8)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+pub enum StyleDisplay {
+    None_ = 0,
+    Block = 1,
+    Inline = 2,
+    InlineBlock = 3,
+    ListItem = 4,
+    Table = 5,
+    InlineTable = 6,
+    TableRowGroup = 7,
+    TableColumn = 8,
+    TableColumnGroup = 9,
+    TableHeaderGroup = 10,
+    TableFooterGroup = 11,
+    TableRow = 12,
+    TableCell = 13,
+    TableCaption = 14,
+    Flex = 15,
+    InlineFlex = 16,
+    Grid = 17,
+    InlineGrid = 18,
+    Ruby = 19,
+    RubyBase = 20,
+    RubyBaseContainer = 21,
+    RubyText = 22,
+    RubyTextContainer = 23,
+    Contents = 24,
+    WebkitBox = 25,
+    WebkitInlineBox = 26,
+    Box = 27,
+    InlineBox = 28,
+    XulGrid = 29,
+    InlineXulGrid = 30,
+    XulGridGroup = 31,
+    XulGridLine = 32,
+    Stack = 33,
+    InlineStack = 34,
+    Deck = 35,
+    Groupbox = 36,
+    Popup = 37,
+}
 pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_z_index;
 pub const eCSSProperty_all: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_COUNT_no_shorthands;
 pub const eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_transition;
 pub const eCSSPropertyAlias_WordWrap: nsCSSPropertyID =
     nsCSSPropertyID::eCSSProperty_COUNT;
@@ -4136,23 +4145,23 @@ pub enum nsCSSPropertyID {
     eCSSProperty_clear = 75,
     eCSSProperty_clip = 76,
     eCSSProperty_clip_path = 77,
     eCSSProperty_clip_rule = 78,
     eCSSProperty_color = 79,
     eCSSProperty_color_adjust = 80,
     eCSSProperty_color_interpolation = 81,
     eCSSProperty_color_interpolation_filters = 82,
-    eCSSProperty__moz_column_count = 83,
-    eCSSProperty__moz_column_fill = 84,
-    eCSSProperty__moz_column_gap = 85,
-    eCSSProperty__moz_column_rule_color = 86,
-    eCSSProperty__moz_column_rule_style = 87,
-    eCSSProperty__moz_column_rule_width = 88,
-    eCSSProperty__moz_column_width = 89,
+    eCSSProperty_column_count = 83,
+    eCSSProperty_column_fill = 84,
+    eCSSProperty_column_gap = 85,
+    eCSSProperty_column_rule_color = 86,
+    eCSSProperty_column_rule_style = 87,
+    eCSSProperty_column_rule_width = 88,
+    eCSSProperty_column_width = 89,
     eCSSProperty_contain = 90,
     eCSSProperty_content = 91,
     eCSSProperty__moz_control_character_visibility = 92,
     eCSSProperty_counter_increment = 93,
     eCSSProperty_counter_reset = 94,
     eCSSProperty_cursor = 95,
     eCSSProperty_direction = 96,
     eCSSProperty_display = 97,
@@ -4386,18 +4395,18 @@ pub enum nsCSSPropertyID {
     eCSSProperty_border_inline_end = 325,
     eCSSProperty_border_inline_start = 326,
     eCSSProperty_border_left = 327,
     eCSSProperty_border_radius = 328,
     eCSSProperty_border_right = 329,
     eCSSProperty_border_style = 330,
     eCSSProperty_border_top = 331,
     eCSSProperty_border_width = 332,
-    eCSSProperty__moz_column_rule = 333,
-    eCSSProperty__moz_columns = 334,
+    eCSSProperty_column_rule = 333,
+    eCSSProperty_columns = 334,
     eCSSProperty_flex = 335,
     eCSSProperty_flex_flow = 336,
     eCSSProperty_font = 337,
     eCSSProperty_font_variant = 338,
     eCSSProperty_grid = 339,
     eCSSProperty_grid_area = 340,
     eCSSProperty_grid_column = 341,
     eCSSProperty_grid_gap = 342,
@@ -4618,39 +4627,39 @@ pub struct nsMainThreadPtrHolder<T> {
 #[repr(C)]
 #[derive(Debug)]
 pub struct nsMainThreadPtrHandle<T> {
     pub mPtr: RefPtr<T>,
 }
 pub enum CSSStyleSheet { }
 #[repr(C)]
 pub struct URLValueData {
-    pub _bindgen_opaque_blob: [u64; 5usize],
+    pub _bindgen_opaque_blob: [u64; 6usize],
 }
 #[test]
 fn bindgen_test_layout_URLValueData() {
-    assert_eq!(::std::mem::size_of::<URLValueData>() , 40usize);
+    assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize);
     assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize);
 }
 #[repr(C)]
 pub struct URLValue {
-    pub _bindgen_opaque_blob: [u64; 6usize],
+    pub _bindgen_opaque_blob: [u64; 7usize],
 }
 #[test]
 fn bindgen_test_layout_URLValue() {
-    assert_eq!(::std::mem::size_of::<URLValue>() , 48usize);
+    assert_eq!(::std::mem::size_of::<URLValue>() , 56usize);
     assert_eq!(::std::mem::align_of::<URLValue>() , 8usize);
 }
 #[repr(C)]
 pub struct ImageValue {
-    pub _bindgen_opaque_blob: [u64; 12usize],
+    pub _bindgen_opaque_blob: [u64; 13usize],
 }
 #[test]
 fn bindgen_test_layout_ImageValue() {
-    assert_eq!(::std::mem::size_of::<ImageValue>() , 96usize);
+    assert_eq!(::std::mem::size_of::<ImageValue>() , 104usize);
     assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize);
 }
 #[repr(C)]
 #[derive(Debug)]
 pub struct GridNamedArea {
     pub mName: nsString,
     pub mColumnStart: u32,
     pub mColumnEnd: u32,
@@ -6429,24 +6438,24 @@ impl <ReferenceBox> StyleShapeSource_nsS
         ::std::mem::transmute(raw.offset(0))
     }
 }
 pub type StyleClipPath = StyleShapeSource<StyleClipPathGeometryBox>;
 pub type StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>;
 #[repr(C)]
 pub struct nsStyleDisplay {
     pub mBinding: RefPtr<URLValue>,
-    pub mDisplay: u8,
-    pub mOriginalDisplay: u8,
+    pub mDisplay: StyleDisplay,
+    pub mOriginalDisplay: StyleDisplay,
     pub mContain: u8,
     pub mAppearance: u8,
     pub mPosition: u8,
     pub mFloat: StyleFloat,
     pub mOriginalFloat: StyleFloat,
-    pub mBreakType: u8,
+    pub mBreakType: StyleClear,
     pub mBreakInside: u8,
     pub mBreakBefore: bool,
     pub mBreakAfter: bool,
     pub mOverflowX: u8,
     pub mOverflowY: u8,
     pub mOverflowClipBox: u8,
     pub mResize: u8,
     pub mOrient: u8,
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -3,26 +3,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #![allow(unsafe_code)]
 
 use app_units::Au;
 use data::{NUM_THREADS, PerDocumentStyleData};
 use env_logger;
 use euclid::Size2D;
-use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
 use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
-use gecko_bindings::bindings::{RawServoStyleSet, RawServoStyleSetBorrowedMut};
 use gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned, ServoNodeDataOwned};
+use gecko_bindings::bindings::{RawServoStyleSetBorrowedMut, RawGeckoDocumentBorrowed};
 use gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed};
 use gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong};
 use gecko_bindings::bindings::{ServoComputedValuesBorrowedOrNull, ServoDeclarationBlock};
 use gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong};
 use gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder, nsHTMLCSSStyleSheet};
-use gecko_bindings::bindings::RawGeckoDocumentBorrowed;
 use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
 use gecko_bindings::structs::{SheetParsingMode, nsIAtom};
 use gecko_bindings::structs::ServoElementSnapshot;
 use gecko_bindings::structs::nsRestyleHint;
 use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
 use gecko_bindings::sugar::ownership::{HasFFI, HasSimpleFFI, Strong};
 use gecko_string_cache::Atom;
 use snapshot::GeckoElementSnapshot;
@@ -229,17 +227,17 @@ pub extern "C" fn Servo_StyleSheet_AddRe
 #[no_mangle]
 pub extern "C" fn Servo_StyleSheet_Release(sheet: RawServoStyleSheetBorrowed) -> () {
     unsafe { Stylesheet::release(sheet) };
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_ComputedValues_Get(node: RawGeckoNodeBorrowed)
      -> ServoComputedValuesStrong {
-    let node = unsafe { GeckoNode(node) };
+    let node = GeckoNode(node);
     let arc_cv = match node.borrow_data().map_or(None, |data| data.style.clone()) {
         Some(style) => style,
         None => {
             // FIXME(bholley): This case subverts the intended semantics of this
             // function, and exists only to make stylo builds more robust corner-
             // cases where Gecko wants the style for a node that Servo never
             // traversed. We should remove this as soon as possible.
             error!("stylo: encountered unstyled node, substituting default values.");
@@ -286,17 +284,17 @@ pub extern "C" fn Servo_ComputedValues_G
 
     let atom = Atom::from(pseudo_tag);
     let pseudo = PseudoElement::from_atom_unchecked(atom, /* anon_box = */ false);
 
     // The stylist consumes stylesheets lazily.
     let data = PerDocumentStyleData::from_ffi_mut(raw_data);
     data.flush_stylesheets();
 
-    let element = unsafe { GeckoElement(match_element) };
+    let element = GeckoElement(match_element);
 
 
     match GeckoSelectorImpl::pseudo_element_cascade_type(&pseudo) {
         PseudoElementCascadeType::Eager => {
             let node = element.as_node();
             let maybe_computed = node.borrow_data()
                                      .and_then(|data| {
                                          data.per_pseudo.get(&pseudo).map(|c| c.clone())
@@ -419,17 +417,17 @@ pub extern "C" fn Servo_CSSSupports(prop
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_ComputeRestyleHint(element: RawGeckoElementBorrowed,
                                            snapshot: *mut ServoElementSnapshot,
                                            raw_data: RawServoStyleSetBorrowed) -> nsRestyleHint {
     let per_doc_data = PerDocumentStyleData::from_ffi(raw_data);
     let snapshot = unsafe { GeckoElementSnapshot::from_raw(snapshot) };
-    let element = unsafe { GeckoElement(element) };
+    let element = GeckoElement(element);
 
     // NB: This involves an FFI call, we can get rid of it easily if needed.
     let current_state = element.get_state();
 
     let hint = per_doc_data.stylist
                            .compute_restyle_hint(&element, &snapshot,
                                                  current_state);
 
--- a/servo/ports/geckolib/wrapper.rs
+++ b/servo/ports/geckolib/wrapper.rs
@@ -14,34 +14,32 @@ use gecko_bindings::bindings::{Gecko_Get
 use gecko_bindings::bindings::{Gecko_GetNodeFlags, Gecko_SetNodeFlags, Gecko_UnsetNodeFlags};
 use gecko_bindings::bindings::{Gecko_GetParentElement, Gecko_GetParentNode};
 use gecko_bindings::bindings::{Gecko_GetPrevSibling, Gecko_GetPrevSiblingElement};
 use gecko_bindings::bindings::{Gecko_GetServoDeclarationBlock, Gecko_IsHTMLElementInHTMLDocument};
 use gecko_bindings::bindings::{Gecko_IsLink, Gecko_IsRootElement, Gecko_IsTextNode};
 use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink};
 use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement, Gecko_SetNodeData};
 use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
-use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
 use gecko_bindings::bindings::Gecko_ClassOrClassList;
 use gecko_bindings::bindings::Gecko_GetNodeData;
 use gecko_bindings::bindings::Gecko_GetStyleContext;
 use gecko_bindings::bindings::ServoNodeData;
 use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO};
 use gecko_bindings::structs::{nsChangeHint, nsIAtom, nsStyleContext};
 use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasBoxFFI, HasFFI, HasSimpleFFI};
 use gecko_bindings::sugar::ownership::Borrowed;
 use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
 use glue::GeckoDeclarationBlock;
 use libc::uintptr_t;
 use selectors::Element;
 use selectors::parser::{AttrSelector, NamespaceConstraint};
 use snapshot::GeckoElementSnapshot;
 use snapshot_helpers;
 use std::fmt;
-use std::marker::PhantomData;
 use std::ops::BitOr;
 use std::ptr;
 use std::sync::Arc;
 use style::data::PrivateStyleData;
 use style::dom::{OpaqueNode, PresentationalHintsSynthetizer};
 use style::dom::{TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
 use style::element_state::ElementState;
 use style::error_reporting::StdoutErrorReporter;