aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcomponents/style/binding_tools/regen.py14
-rw-r--r--components/style/gecko/wrapper.rs2
-rw-r--r--components/style/gecko_bindings/bindings.rs57
-rw-r--r--components/style/gecko_bindings/structs_debug.rs3
-rw-r--r--components/style/gecko_bindings/structs_release.rs3
5 files changed, 38 insertions, 41 deletions
diff --git a/components/style/binding_tools/regen.py b/components/style/binding_tools/regen.py
index 4f5a76fe161..93a1e8db0ba 100755
--- a/components/style/binding_tools/regen.py
+++ b/components/style/binding_tools/regen.py
@@ -171,9 +171,6 @@ COMPILATION_TARGETS = {
"nsTArrayHeader",
"pair",
"Position",
- "RawGeckoDocument",
- "RawGeckoElement",
- "RawGeckoNode",
"Runnable",
"ServoAttrSnapshot",
"ServoElementSnapshot",
@@ -248,14 +245,17 @@ COMPILATION_TARGETS = {
"files": [
"{}/dist/include/mozilla/ServoBindings.h",
],
+ "whitelist": [
+ "RawGeckoDocument",
+ "RawGeckoElement",
+ "RawGeckoNode",
+ ],
# Types to just use from the `structs` target.
"structs_types": [
+ "Element",
"FontFamilyList",
"FontFamilyType",
- "RawGeckoDocument",
- "RawGeckoElement",
- "RawGeckoNode",
"ServoElementSnapshot",
"SheetParsingMode",
"StyleBasicShape",
@@ -265,6 +265,8 @@ COMPILATION_TARGETS = {
"nsChangeHint",
"nsFont",
"nsIAtom",
+ "nsIDocument",
+ "nsINode",
"nsIPrincipal",
"nsIURI",
"nsMainThreadPtrHolder",
diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs
index 7c78ef908f4..9340dc68776 100644
--- a/components/style/gecko/wrapper.rs
+++ b/components/style/gecko/wrapper.rs
@@ -22,12 +22,12 @@ use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetNextStyleChild};
use gecko_bindings::bindings::{Gecko_GetServoDeclarationBlock, Gecko_IsHTMLElementInHTMLDocument};
use gecko_bindings::bindings::{Gecko_IsLink, Gecko_IsRootElement};
use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink, Gecko_Namespace};
+use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
use gecko_bindings::bindings::Gecko_ClassOrClassList;
use gecko_bindings::bindings::Gecko_GetStyleContext;
use gecko_bindings::bindings::Gecko_SetNodeFlags;
use gecko_bindings::structs;
use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO};
-use gecko_bindings::structs::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
use gecko_bindings::structs::{nsChangeHint, nsIAtom, nsIContent, nsStyleContext};
use gecko_bindings::sugar::ownership::FFIArcHelpers;
use libc::uintptr_t;
diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs
index 9a9d82de6e1..abebe1d89a9 100644
--- a/components/style/gecko_bindings/bindings.rs
+++ b/components/style/gecko_bindings/bindings.rs
@@ -39,11 +39,9 @@ pub type StyleChildrenIteratorBorrowedMutOrNull<'a> = Option<&'a mut StyleChildr
pub type StyleChildrenIteratorOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<StyleChildrenIterator>;
enum StyleChildrenIteratorVoid{ }
pub struct StyleChildrenIterator(StyleChildrenIteratorVoid);
+use gecko_bindings::structs::Element;
use gecko_bindings::structs::FontFamilyList;
use gecko_bindings::structs::FontFamilyType;
-use gecko_bindings::structs::RawGeckoDocument;
-use gecko_bindings::structs::RawGeckoElement;
-use gecko_bindings::structs::RawGeckoNode;
use gecko_bindings::structs::ServoElementSnapshot;
use gecko_bindings::structs::SheetParsingMode;
use gecko_bindings::structs::StyleBasicShape;
@@ -53,6 +51,8 @@ use gecko_bindings::structs::nsCSSShadowArray;
use gecko_bindings::structs::nsChangeHint;
use gecko_bindings::structs::nsFont;
use gecko_bindings::structs::nsIAtom;
+use gecko_bindings::structs::nsIDocument;
+use gecko_bindings::structs::nsINode;
use gecko_bindings::structs::nsIPrincipal;
use gecko_bindings::structs::nsIURI;
use gecko_bindings::structs::nsMainThreadPtrHolder;
@@ -170,6 +170,32 @@ use gecko_bindings::structs::nsStyleXUL;
unsafe impl Send for nsStyleXUL {}
unsafe impl Sync for nsStyleXUL {}
+pub type RawGeckoNode = nsINode;
+pub type RawGeckoElement = Element;
+pub type RawGeckoDocument = nsIDocument;
+extern "C" {
+ pub fn Servo_StyleSheet_AddRef(ptr: RawServoStyleSheetBorrowed);
+}
+extern "C" {
+ pub fn Servo_StyleSheet_Release(ptr: RawServoStyleSheetBorrowed);
+}
+extern "C" {
+ pub fn Servo_ComputedValues_AddRef(ptr: ServoComputedValuesBorrowed);
+}
+extern "C" {
+ pub fn Servo_ComputedValues_Release(ptr: ServoComputedValuesBorrowed);
+}
+extern "C" {
+ pub fn Servo_DeclarationBlock_AddRef(ptr:
+ RawServoDeclarationBlockBorrowed);
+}
+extern "C" {
+ pub fn Servo_DeclarationBlock_Release(ptr:
+ RawServoDeclarationBlockBorrowed);
+}
+extern "C" {
+ pub fn Servo_StyleSet_Drop(ptr: RawServoStyleSetOwned);
+}
extern "C" {
pub fn Gecko_EnsureTArrayCapacity(aArray: *mut ::std::os::raw::c_void,
aCapacity: usize, aElementSize: usize);
@@ -822,12 +848,6 @@ extern "C" {
-> RawServoStyleSheetStrong;
}
extern "C" {
- pub fn Servo_StyleSheet_AddRef(sheet: RawServoStyleSheetBorrowed);
-}
-extern "C" {
- pub fn Servo_StyleSheet_Release(sheet: RawServoStyleSheetBorrowed);
-}
-extern "C" {
pub fn Servo_StyleSheet_HasRules(sheet: RawServoStyleSheetBorrowed)
-> bool;
}
@@ -835,9 +855,6 @@ extern "C" {
pub fn Servo_StyleSet_Init() -> RawServoStyleSetOwned;
}
extern "C" {
- pub fn Servo_StyleSet_Drop(set: RawServoStyleSetOwned);
-}
-extern "C" {
pub fn Servo_StyleSet_AppendStyleSheet(set: RawServoStyleSetBorrowed,
sheet: RawServoStyleSheetBorrowed);
}
@@ -880,14 +897,6 @@ extern "C" {
-> RawServoDeclarationBlockStrong;
}
extern "C" {
- pub fn Servo_DeclarationBlock_AddRef(declarations:
- RawServoDeclarationBlockBorrowed);
-}
-extern "C" {
- pub fn Servo_DeclarationBlock_Release(declarations:
- RawServoDeclarationBlockBorrowed);
-}
-extern "C" {
pub fn Servo_DeclarationBlock_Equals(a: RawServoDeclarationBlockBorrowed,
b: RawServoDeclarationBlockBorrowed)
-> bool;
@@ -930,14 +939,6 @@ extern "C" {
-> ServoComputedValuesStrong;
}
extern "C" {
- pub fn Servo_ComputedValues_AddRef(computed_values:
- ServoComputedValuesBorrowed);
-}
-extern "C" {
- pub fn Servo_ComputedValues_Release(computed_values:
- ServoComputedValuesBorrowed);
-}
-extern "C" {
pub fn Servo_Initialize();
}
extern "C" {
diff --git a/components/style/gecko_bindings/structs_debug.rs b/components/style/gecko_bindings/structs_debug.rs
index 1997c09f806..277fc5f7827 100644
--- a/components/style/gecko_bindings/structs_debug.rs
+++ b/components/style/gecko_bindings/structs_debug.rs
@@ -10035,9 +10035,6 @@ fn bindgen_test_layout_nsStyleVisibility() {
assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 7usize);
assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize);
}
-pub type RawGeckoNode = nsINode;
-pub type RawGeckoElement = Element;
-pub type RawGeckoDocument = nsIDocument;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Position {
diff --git a/components/style/gecko_bindings/structs_release.rs b/components/style/gecko_bindings/structs_release.rs
index eb66f803531..90854ea309d 100644
--- a/components/style/gecko_bindings/structs_release.rs
+++ b/components/style/gecko_bindings/structs_release.rs
@@ -9981,9 +9981,6 @@ fn bindgen_test_layout_nsStyleVisibility() {
assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 7usize);
assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize);
}
-pub type RawGeckoNode = nsINode;
-pub type RawGeckoElement = Element;
-pub type RawGeckoDocument = nsIDocument;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Position {