Bug 1331213: Don't make the pres context pointers opaque. draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 15 Jan 2017 23:21:56 +0100
changeset 461273 51b11fa96a56fe385fd5dd1dd04d90808d60d49d
parent 461272 631ac9c4b288b84086eb191b0a7ba6b44f80c4cf
child 461274 901f11573e7312490251ee7683a88e03fde7334c
push id41626
push userbmo:emilio+bugs@crisal.io
push dateMon, 16 Jan 2017 09:45:21 +0000
bugs1331213
milestone53.0a1
Bug 1331213: Don't make the pres context pointers opaque. I don't know why they were that way, but it makes no sense and tests still pass. MozReview-Commit-ID: HAIuQhqlTtF
servo/components/style/build_gecko.rs
servo/components/style/gecko_bindings/structs_debug.rs
servo/components/style/gecko_bindings/structs_release.rs
--- a/servo/components/style/build_gecko.rs
+++ b/servo/components/style/build_gecko.rs
@@ -402,17 +402,16 @@ mod bindings {
             "nsTHashtable",  // <- Inheriting from inner typedefs that clang
                              //    doesn't expose properly.
             "nsRefPtrHashtable", "nsDataHashtable", "nsClassHashtable",  // <- Ditto
             "nsIDocument_SelectorCache",  // <- Inherits from nsExpirationTracker<.., 4>
             "nsIPresShell_ScrollAxis",  // <- For some reason the alignment of this is 4
                                         // for clang.
             "nsPIDOMWindow",  // <- Takes the vtable from a template parameter, and we can't
                               //    generate it conditionally.
-            "RawGeckoPresContext", // Just passing it through.
             "JS::Rooted",
             "mozilla::Maybe",
             "gfxSize",  // <- union { struct { T width; T height; }; T components[2] };
             "gfxSize_Super",  // Ditto.
             "mozilla::ErrorResult",  // Causes JSWhyMagic to be included & handled incorrectly.
         ];
         struct MappedGenericType {
             generic: bool,
--- a/servo/components/style/gecko_bindings/structs_debug.rs
+++ b/servo/components/style/gecko_bindings/structs_debug.rs
@@ -12851,26 +12851,26 @@ pub mod root {
         pub _address: u8,
     }
     impl Clone for RawServoStyleSet {
         fn clone(&self) -> Self { *self }
     }
     pub type RawGeckoNode = root::nsINode;
     pub type RawGeckoElement = root::mozilla::dom::Element;
     pub type RawGeckoDocument = root::nsIDocument;
-    pub type RawGeckoPresContext = [u64; 162usize];
+    pub type RawGeckoPresContext = root::nsPresContext;
     pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;
     pub type RawGeckoNodeBorrowedOrNull = *const root::RawGeckoNode;
     pub type RawGeckoElementBorrowed = *const root::RawGeckoElement;
     pub type RawGeckoElementBorrowedOrNull = *const root::RawGeckoElement;
     pub type RawGeckoDocumentBorrowed = *const root::RawGeckoDocument;
     pub type RawGeckoDocumentBorrowedOrNull = *const root::RawGeckoDocument;
-    pub type RawGeckoPresContextOwned = *mut [u64; 162usize];
-    pub type RawGeckoPresContextBorrowed = *const [u64; 162usize];
-    pub type RawGeckoPresContextBorrowedMut = *mut [u64; 162usize];
+    pub type RawGeckoPresContextOwned = *mut root::RawGeckoPresContext;
+    pub type RawGeckoPresContextBorrowed = *const root::RawGeckoPresContext;
+    pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
     #[repr(u32)]
     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     pub enum nsCSSTokenSerializationType {
         eCSSTokenSerialization_Nothing = 0,
         eCSSTokenSerialization_Whitespace = 1,
         eCSSTokenSerialization_AtKeyword_or_Hash = 2,
         eCSSTokenSerialization_Number = 3,
         eCSSTokenSerialization_Dimension = 4,
--- a/servo/components/style/gecko_bindings/structs_release.rs
+++ b/servo/components/style/gecko_bindings/structs_release.rs
@@ -12777,26 +12777,26 @@ pub mod root {
         pub _address: u8,
     }
     impl Clone for RawServoStyleSet {
         fn clone(&self) -> Self { *self }
     }
     pub type RawGeckoNode = root::nsINode;
     pub type RawGeckoElement = root::mozilla::dom::Element;
     pub type RawGeckoDocument = root::nsIDocument;
-    pub type RawGeckoPresContext = [u64; 158usize];
+    pub type RawGeckoPresContext = root::nsPresContext;
     pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;
     pub type RawGeckoNodeBorrowedOrNull = *const root::RawGeckoNode;
     pub type RawGeckoElementBorrowed = *const root::RawGeckoElement;
     pub type RawGeckoElementBorrowedOrNull = *const root::RawGeckoElement;
     pub type RawGeckoDocumentBorrowed = *const root::RawGeckoDocument;
     pub type RawGeckoDocumentBorrowedOrNull = *const root::RawGeckoDocument;
-    pub type RawGeckoPresContextOwned = *mut [u64; 158usize];
-    pub type RawGeckoPresContextBorrowed = *const [u64; 158usize];
-    pub type RawGeckoPresContextBorrowedMut = *mut [u64; 158usize];
+    pub type RawGeckoPresContextOwned = *mut root::RawGeckoPresContext;
+    pub type RawGeckoPresContextBorrowed = *const root::RawGeckoPresContext;
+    pub type RawGeckoPresContextBorrowedMut = *mut root::RawGeckoPresContext;
     #[repr(u32)]
     #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
     pub enum nsCSSTokenSerializationType {
         eCSSTokenSerialization_Nothing = 0,
         eCSSTokenSerialization_Whitespace = 1,
         eCSSTokenSerialization_AtKeyword_or_Hash = 2,
         eCSSTokenSerialization_Number = 3,
         eCSSTokenSerialization_Dimension = 4,