stylo: Remove FFI calls for fetching style structs from ServoComputedValues

This commit is contained in:
Manish Goregaokar 2017-07-17 11:42:12 -07:00 committed by Manish Goregaokar
parent ff4bc5a2c6
commit e78947f8b5
4 changed files with 6 additions and 123 deletions

View file

@ -2822,124 +2822,7 @@ extern "C" {
-> bool; -> bool;
} }
extern "C" { extern "C" {
pub fn Servo_GetStyleFont(computed_values: pub fn Servo_GetEmptyVariables() -> *const nsStyleVariables;
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleFont;
}
extern "C" {
pub fn Servo_GetStyleColor(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleColor;
}
extern "C" {
pub fn Servo_GetStyleList(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleList;
}
extern "C" {
pub fn Servo_GetStyleText(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleText;
}
extern "C" {
pub fn Servo_GetStyleVisibility(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleVisibility;
}
extern "C" {
pub fn Servo_GetStyleUserInterface(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleUserInterface;
}
extern "C" {
pub fn Servo_GetStyleTableBorder(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleTableBorder;
}
extern "C" {
pub fn Servo_GetStyleSVG(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleSVG;
}
extern "C" {
pub fn Servo_GetStyleVariables(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleVariables;
}
extern "C" {
pub fn Servo_GetStyleBackground(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleBackground;
}
extern "C" {
pub fn Servo_GetStylePosition(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStylePosition;
}
extern "C" {
pub fn Servo_GetStyleTextReset(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleTextReset;
}
extern "C" {
pub fn Servo_GetStyleDisplay(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleDisplay;
}
extern "C" {
pub fn Servo_GetStyleContent(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleContent;
}
extern "C" {
pub fn Servo_GetStyleUIReset(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleUIReset;
}
extern "C" {
pub fn Servo_GetStyleTable(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleTable;
}
extern "C" {
pub fn Servo_GetStyleMargin(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleMargin;
}
extern "C" {
pub fn Servo_GetStylePadding(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStylePadding;
}
extern "C" {
pub fn Servo_GetStyleBorder(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleBorder;
}
extern "C" {
pub fn Servo_GetStyleOutline(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleOutline;
}
extern "C" {
pub fn Servo_GetStyleXUL(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleXUL;
}
extern "C" {
pub fn Servo_GetStyleSVGReset(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleSVGReset;
}
extern "C" {
pub fn Servo_GetStyleColumn(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleColumn;
}
extern "C" {
pub fn Servo_GetStyleEffects(computed_values:
ServoComputedValuesBorrowedOrNull)
-> *const nsStyleEffects;
} }
extern "C" { extern "C" {
pub fn Gecko_CreateCSSErrorReporter(sheet: *mut ServoStyleSheet, pub fn Gecko_CreateCSSErrorReporter(sheet: *mut ServoStyleSheet,

View file

@ -40114,7 +40114,7 @@ pub mod root {
root::nsCharTraits ) )); root::nsCharTraits ) ));
} }
#[test] #[test]
fn __bindgen_test_layout__bindgen_ty_id_195896_instantiation_33() { fn __bindgen_test_layout__bindgen_ty_id_195320_instantiation_33() {
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));
@ -40123,7 +40123,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout__bindgen_ty_id_195932_instantiation_34() { fn __bindgen_test_layout__bindgen_ty_id_195356_instantiation_34() {
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));

View file

@ -39462,7 +39462,7 @@ pub mod root {
root::nsCharTraits ) )); root::nsCharTraits ) ));
} }
#[test] #[test]
fn __bindgen_test_layout__bindgen_ty_id_193418_instantiation_33() { fn __bindgen_test_layout__bindgen_ty_id_192842_instantiation_33() {
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));
@ -39471,7 +39471,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout__bindgen_ty_id_193454_instantiation_34() { fn __bindgen_test_layout__bindgen_ty_id_192878_instantiation_34() {
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));

View file

@ -4861,7 +4861,7 @@ static mut EMPTY_VARIABLES_STRUCT: Option<nsStyleVariables> = None;
#[no_mangle] #[no_mangle]
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub unsafe extern "C" fn Servo_GetStyleVariables(_cv: ServoComputedValuesBorrowedOrNull) pub unsafe extern "C" fn Servo_GetEmptyVariables()
-> *const nsStyleVariables { -> *const nsStyleVariables {
EMPTY_VARIABLES_STRUCT.as_ref().unwrap() EMPTY_VARIABLES_STRUCT.as_ref().unwrap()
} }