stylo: Rename ServoComputedValues -> ServoComputedData

ServoComputedValues is confusing because ComputedValues is actually
ServoStyleContext on the C++ side.
This commit is contained in:
Manish Goregaokar 2017-07-20 21:44:02 -07:00 committed by Manish Goregaokar
parent cca0eacf80
commit b332a061b4
5 changed files with 165 additions and 165 deletions

View file

@ -7,7 +7,7 @@ type nsACString_internal = nsACString;
type nsAString_internal = nsAString; type nsAString_internal = nsAString;
pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues; pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues;
pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>; pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>;
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues; pub type ServoComputedDataBorrowed<'a> = &'a ServoComputedData;
use gecko_bindings::structs::mozilla::css::GridTemplateAreasValue; use gecko_bindings::structs::mozilla::css::GridTemplateAreasValue;
use gecko_bindings::structs::mozilla::css::ErrorReporter; use gecko_bindings::structs::mozilla::css::ErrorReporter;
use gecko_bindings::structs::mozilla::css::ImageValue; use gecko_bindings::structs::mozilla::css::ImageValue;
@ -220,7 +220,7 @@ use gecko_bindings::structs::nsresult;
use gecko_bindings::structs::Loader; use gecko_bindings::structs::Loader;
use gecko_bindings::structs::LoaderReusableStyleSheets; use gecko_bindings::structs::LoaderReusableStyleSheets;
use gecko_bindings::structs::ServoStyleSheet; use gecko_bindings::structs::ServoStyleSheet;
use gecko_bindings::structs::ServoComputedValues; use gecko_bindings::structs::ServoComputedData;
use gecko_bindings::structs::ServoStyleContext; use gecko_bindings::structs::ServoStyleContext;
use gecko_bindings::structs::ServoStyleContextStrong; use gecko_bindings::structs::ServoStyleContextStrong;
use gecko_bindings::structs::EffectCompositor_CascadeLevel; use gecko_bindings::structs::EffectCompositor_CascadeLevel;
@ -535,7 +535,7 @@ extern "C" {
ServoStyleContextBorrowedOrNull, ServoStyleContextBorrowedOrNull,
pres_context: pres_context:
RawGeckoPresContextBorrowed, RawGeckoPresContextBorrowed,
values: ServoComputedValuesBorrowed, values: ServoComputedDataBorrowed,
pseudo_type: CSSPseudoElementType, pseudo_type: CSSPseudoElementType,
pseudo_tag: *mut nsIAtom); pseudo_tag: *mut nsIAtom);
} }
@ -1046,8 +1046,8 @@ extern "C" {
-> CSSPseudoElementType; -> CSSPseudoElementType;
} }
extern "C" { extern "C" {
pub fn Gecko_CalcStyleDifference(old_style: *const ServoStyleContext, pub fn Gecko_CalcStyleDifference(old_style: ServoStyleContextBorrowed,
new_style: *const ServoStyleContext, new_style: ServoStyleContextBorrowed,
old_style_bits: u64, old_style_bits: u64,
any_style_changed: *mut bool) any_style_changed: *mut bool)
-> nsChangeHint; -> nsChangeHint;
@ -1984,10 +1984,10 @@ extern "C" {
-> ServoStyleContextStrong; -> ServoStyleContextStrong;
} }
extern "C" { extern "C" {
pub fn Servo_StyleContext_AddRef(ctx: &ServoStyleContext); pub fn Servo_StyleContext_AddRef(ctx: ServoStyleContextBorrowed);
} }
extern "C" { extern "C" {
pub fn Servo_StyleContext_Release(ctx: &ServoStyleContext); pub fn Servo_StyleContext_Release(ctx: ServoStyleContextBorrowed);
} }
extern "C" { extern "C" {
pub fn Servo_StyleSet_MightHaveAttributeDependency(set: pub fn Servo_StyleSet_MightHaveAttributeDependency(set:
@ -2709,9 +2709,9 @@ extern "C" {
} }
extern "C" { extern "C" {
pub fn Servo_ComputedValues_EqualCustomProperties(first: pub fn Servo_ComputedValues_EqualCustomProperties(first:
ServoComputedValuesBorrowed, ServoComputedDataBorrowed,
second: second:
ServoComputedValuesBorrowed) ServoComputedDataBorrowed)
-> bool; -> bool;
} }
extern "C" { extern "C" {

View file

@ -7590,7 +7590,7 @@ pub mod root {
pub struct ServoStyleContext { pub struct ServoStyleContext {
pub _base: root::nsStyleContext, pub _base: root::nsStyleContext,
pub mPresContext: *mut root::nsPresContext, pub mPresContext: *mut root::nsPresContext,
pub mSource: root::ServoComputedValues, pub mSource: root::ServoComputedData,
} }
#[test] #[test]
fn bindgen_test_layout_ServoStyleContext() { fn bindgen_test_layout_ServoStyleContext() {
@ -20993,7 +20993,7 @@ pub mod root {
*/ */
#[repr(C)] #[repr(C)]
#[derive(Debug)] #[derive(Debug)]
pub struct ServoComputedValues { pub struct ServoComputedData {
pub Font: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoFont>, pub Font: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoFont>,
pub Color: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoColor>, pub Color: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoColor>,
pub List: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoList>, pub List: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoList>,
@ -21031,187 +21031,187 @@ pub mod root {
pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData, pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData,
} }
#[test] #[test]
fn bindgen_test_layout_ServoComputedValues() { fn bindgen_test_layout_ServoComputedData() {
assert_eq!(::std::mem::size_of::<ServoComputedValues>() , 224usize , assert_eq!(::std::mem::size_of::<ServoComputedData>() , 224usize ,
concat ! ( concat ! (
"Size of: " , stringify ! ( ServoComputedValues ) )); "Size of: " , stringify ! ( ServoComputedData ) ));
assert_eq! (::std::mem::align_of::<ServoComputedValues>() , 8usize , assert_eq! (::std::mem::align_of::<ServoComputedData>() , 8usize ,
concat ! ( concat ! (
"Alignment of " , stringify ! ( ServoComputedValues ) )); "Alignment of " , stringify ! ( ServoComputedData ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Font as * & ( * ( 0 as * const ServoComputedData ) ) . Font as *
const _ as usize } , 0usize , concat ! ( const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Font ) )); ) , "::" , stringify ! ( Font ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Color as * & ( * ( 0 as * const ServoComputedData ) ) . Color as *
const _ as usize } , 8usize , concat ! ( const _ as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Color ) )); ) , "::" , stringify ! ( Color ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . List as * & ( * ( 0 as * const ServoComputedData ) ) . List as *
const _ as usize } , 16usize , concat ! ( const _ as usize } , 16usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( List ) )); ) , "::" , stringify ! ( List ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Text as * & ( * ( 0 as * const ServoComputedData ) ) . Text as *
const _ as usize } , 24usize , concat ! ( const _ as usize } , 24usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Text ) )); ) , "::" , stringify ! ( Text ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Visibility & ( * ( 0 as * const ServoComputedData ) ) . Visibility
as * const _ as usize } , 32usize , concat ! ( as * const _ as usize } , 32usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Visibility ) )); ) , "::" , stringify ! ( Visibility ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
UserInterface as * const _ as usize } , 40usize , concat ! UserInterface as * const _ as usize } , 40usize , concat !
( (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( UserInterface ) )); ) , "::" , stringify ! ( UserInterface ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . TableBorder & ( * ( 0 as * const ServoComputedData ) ) . TableBorder
as * const _ as usize } , 48usize , concat ! ( as * const _ as usize } , 48usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( TableBorder ) )); ) , "::" , stringify ! ( TableBorder ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . SVG as * & ( * ( 0 as * const ServoComputedData ) ) . SVG as *
const _ as usize } , 56usize , concat ! ( const _ as usize } , 56usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( SVG ) )); ) , "::" , stringify ! ( SVG ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Background & ( * ( 0 as * const ServoComputedData ) ) . Background
as * const _ as usize } , 64usize , concat ! ( as * const _ as usize } , 64usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Background ) )); ) , "::" , stringify ! ( Background ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Position as & ( * ( 0 as * const ServoComputedData ) ) . Position as
* const _ as usize } , 72usize , concat ! ( * const _ as usize } , 72usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Position ) )); ) , "::" , stringify ! ( Position ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . TextReset & ( * ( 0 as * const ServoComputedData ) ) . TextReset
as * const _ as usize } , 80usize , concat ! ( as * const _ as usize } , 80usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( TextReset ) )); ) , "::" , stringify ! ( TextReset ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Display as & ( * ( 0 as * const ServoComputedData ) ) . Display as
* const _ as usize } , 88usize , concat ! ( * const _ as usize } , 88usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Display ) )); ) , "::" , stringify ! ( Display ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Content as & ( * ( 0 as * const ServoComputedData ) ) . Content as
* const _ as usize } , 96usize , concat ! ( * const _ as usize } , 96usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Content ) )); ) , "::" , stringify ! ( Content ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . UIReset as & ( * ( 0 as * const ServoComputedData ) ) . UIReset as
* const _ as usize } , 104usize , concat ! ( * const _ as usize } , 104usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( UIReset ) )); ) , "::" , stringify ! ( UIReset ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Table as * & ( * ( 0 as * const ServoComputedData ) ) . Table as *
const _ as usize } , 112usize , concat ! ( const _ as usize } , 112usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Table ) )); ) , "::" , stringify ! ( Table ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Margin as * & ( * ( 0 as * const ServoComputedData ) ) . Margin as *
const _ as usize } , 120usize , concat ! ( const _ as usize } , 120usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Margin ) )); ) , "::" , stringify ! ( Margin ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Padding as & ( * ( 0 as * const ServoComputedData ) ) . Padding as
* const _ as usize } , 128usize , concat ! ( * const _ as usize } , 128usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Padding ) )); ) , "::" , stringify ! ( Padding ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Border as * & ( * ( 0 as * const ServoComputedData ) ) . Border as *
const _ as usize } , 136usize , concat ! ( const _ as usize } , 136usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Border ) )); ) , "::" , stringify ! ( Border ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Outline as & ( * ( 0 as * const ServoComputedData ) ) . Outline as
* const _ as usize } , 144usize , concat ! ( * const _ as usize } , 144usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Outline ) )); ) , "::" , stringify ! ( Outline ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . XUL as * & ( * ( 0 as * const ServoComputedData ) ) . XUL as *
const _ as usize } , 152usize , concat ! ( const _ as usize } , 152usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( XUL ) )); ) , "::" , stringify ! ( XUL ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . SVGReset as & ( * ( 0 as * const ServoComputedData ) ) . SVGReset as
* const _ as usize } , 160usize , concat ! ( * const _ as usize } , 160usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( SVGReset ) )); ) , "::" , stringify ! ( SVGReset ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Column as * & ( * ( 0 as * const ServoComputedData ) ) . Column as *
const _ as usize } , 168usize , concat ! ( const _ as usize } , 168usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Column ) )); ) , "::" , stringify ! ( Column ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Effects as & ( * ( 0 as * const ServoComputedData ) ) . Effects as
* const _ as usize } , 176usize , concat ! ( * const _ as usize } , 176usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Effects ) )); ) , "::" , stringify ! ( Effects ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
custom_properties as * const _ as usize } , 184usize , custom_properties as * const _ as usize } , 184usize ,
concat ! ( concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( custom_properties ) )); ) , "::" , stringify ! ( custom_properties ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
writing_mode as * const _ as usize } , 192usize , concat ! writing_mode as * const _ as usize } , 192usize , concat !
( (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( writing_mode ) )); ) , "::" , stringify ! ( writing_mode ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . flags as * & ( * ( 0 as * const ServoComputedData ) ) . flags as *
const _ as usize } , 193usize , concat ! ( const _ as usize } , 193usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( flags ) )); ) , "::" , stringify ! ( flags ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . rules as * & ( * ( 0 as * const ServoComputedData ) ) . rules as *
const _ as usize } , 200usize , concat ! ( const _ as usize } , 200usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( rules ) )); ) , "::" , stringify ! ( rules ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
visited_style as * const _ as usize } , 208usize , concat visited_style as * const _ as usize } , 208usize , concat
! ( ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( visited_style ) )); ) , "::" , stringify ! ( visited_style ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
font_computation_data as * const _ as usize } , 216usize , font_computation_data as * const _ as usize } , 216usize ,
concat ! ( concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( font_computation_data ) )); ) , "::" , stringify ! ( font_computation_data ) ));
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy)] #[derive(Debug, Copy)]
pub struct ServoComputedValuesForgotten { pub struct ServoComputedDataForgotten {
pub mPtr: *const root::ServoComputedValues, pub mPtr: *const root::ServoComputedData,
} }
#[test] #[test]
fn bindgen_test_layout_ServoComputedValuesForgotten() { fn bindgen_test_layout_ServoComputedDataForgotten() {
assert_eq!(::std::mem::size_of::<ServoComputedValuesForgotten>() , assert_eq!(::std::mem::size_of::<ServoComputedDataForgotten>() ,
8usize , concat ! ( 8usize , concat ! (
"Size of: " , stringify ! ( ServoComputedValuesForgotten ) "Size of: " , stringify ! ( ServoComputedDataForgotten )
)); ));
assert_eq! (::std::mem::align_of::<ServoComputedValuesForgotten>() , assert_eq! (::std::mem::align_of::<ServoComputedDataForgotten>() ,
8usize , concat ! ( 8usize , concat ! (
"Alignment of " , stringify ! ( "Alignment of " , stringify ! (
ServoComputedValuesForgotten ) )); ServoComputedDataForgotten ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValuesForgotten ) ) . & ( * ( 0 as * const ServoComputedDataForgotten ) ) .
mPtr as * const _ as usize } , 0usize , concat ! ( mPtr as * const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( "Alignment of field: " , stringify ! (
ServoComputedValuesForgotten ) , "::" , stringify ! ( mPtr ServoComputedDataForgotten ) , "::" , stringify ! ( mPtr
) )); ) ));
} }
impl Clone for ServoComputedValuesForgotten { impl Clone for ServoComputedDataForgotten {
fn clone(&self) -> Self { *self } fn clone(&self) -> Self { *self }
} }
#[repr(u32)] #[repr(u32)]
@ -38455,7 +38455,7 @@ pub mod root {
*const root::mozilla::ServoStyleContext; *const root::mozilla::ServoStyleContext;
pub type ServoStyleContextBorrowedOrNull = pub type ServoStyleContextBorrowedOrNull =
*const root::mozilla::ServoStyleContext; *const root::mozilla::ServoStyleContext;
pub type ServoComputedValuesBorrowed = *const root::ServoComputedValues; pub type ServoComputedDataBorrowed = *const root::ServoComputedData;
pub type RawServoAnimationValueMapBorrowedMut = pub type RawServoAnimationValueMapBorrowedMut =
*mut root::RawServoAnimationValueMap; *mut root::RawServoAnimationValueMap;
pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode; pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;

View file

@ -7438,7 +7438,7 @@ pub mod root {
pub struct ServoStyleContext { pub struct ServoStyleContext {
pub _base: root::nsStyleContext, pub _base: root::nsStyleContext,
pub mPresContext: *mut root::nsPresContext, pub mPresContext: *mut root::nsPresContext,
pub mSource: root::ServoComputedValues, pub mSource: root::ServoComputedData,
} }
#[test] #[test]
fn bindgen_test_layout_ServoStyleContext() { fn bindgen_test_layout_ServoStyleContext() {
@ -20609,7 +20609,7 @@ pub mod root {
*/ */
#[repr(C)] #[repr(C)]
#[derive(Debug)] #[derive(Debug)]
pub struct ServoComputedValues { pub struct ServoComputedData {
pub Font: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoFont>, pub Font: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoFont>,
pub Color: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoColor>, pub Color: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoColor>,
pub List: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoList>, pub List: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoList>,
@ -20647,187 +20647,187 @@ pub mod root {
pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData, pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData,
} }
#[test] #[test]
fn bindgen_test_layout_ServoComputedValues() { fn bindgen_test_layout_ServoComputedData() {
assert_eq!(::std::mem::size_of::<ServoComputedValues>() , 224usize , assert_eq!(::std::mem::size_of::<ServoComputedData>() , 224usize ,
concat ! ( concat ! (
"Size of: " , stringify ! ( ServoComputedValues ) )); "Size of: " , stringify ! ( ServoComputedData ) ));
assert_eq! (::std::mem::align_of::<ServoComputedValues>() , 8usize , assert_eq! (::std::mem::align_of::<ServoComputedData>() , 8usize ,
concat ! ( concat ! (
"Alignment of " , stringify ! ( ServoComputedValues ) )); "Alignment of " , stringify ! ( ServoComputedData ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Font as * & ( * ( 0 as * const ServoComputedData ) ) . Font as *
const _ as usize } , 0usize , concat ! ( const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Font ) )); ) , "::" , stringify ! ( Font ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Color as * & ( * ( 0 as * const ServoComputedData ) ) . Color as *
const _ as usize } , 8usize , concat ! ( const _ as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Color ) )); ) , "::" , stringify ! ( Color ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . List as * & ( * ( 0 as * const ServoComputedData ) ) . List as *
const _ as usize } , 16usize , concat ! ( const _ as usize } , 16usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( List ) )); ) , "::" , stringify ! ( List ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Text as * & ( * ( 0 as * const ServoComputedData ) ) . Text as *
const _ as usize } , 24usize , concat ! ( const _ as usize } , 24usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Text ) )); ) , "::" , stringify ! ( Text ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Visibility & ( * ( 0 as * const ServoComputedData ) ) . Visibility
as * const _ as usize } , 32usize , concat ! ( as * const _ as usize } , 32usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Visibility ) )); ) , "::" , stringify ! ( Visibility ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
UserInterface as * const _ as usize } , 40usize , concat ! UserInterface as * const _ as usize } , 40usize , concat !
( (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( UserInterface ) )); ) , "::" , stringify ! ( UserInterface ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . TableBorder & ( * ( 0 as * const ServoComputedData ) ) . TableBorder
as * const _ as usize } , 48usize , concat ! ( as * const _ as usize } , 48usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( TableBorder ) )); ) , "::" , stringify ! ( TableBorder ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . SVG as * & ( * ( 0 as * const ServoComputedData ) ) . SVG as *
const _ as usize } , 56usize , concat ! ( const _ as usize } , 56usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( SVG ) )); ) , "::" , stringify ! ( SVG ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Background & ( * ( 0 as * const ServoComputedData ) ) . Background
as * const _ as usize } , 64usize , concat ! ( as * const _ as usize } , 64usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Background ) )); ) , "::" , stringify ! ( Background ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Position as & ( * ( 0 as * const ServoComputedData ) ) . Position as
* const _ as usize } , 72usize , concat ! ( * const _ as usize } , 72usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Position ) )); ) , "::" , stringify ! ( Position ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . TextReset & ( * ( 0 as * const ServoComputedData ) ) . TextReset
as * const _ as usize } , 80usize , concat ! ( as * const _ as usize } , 80usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( TextReset ) )); ) , "::" , stringify ! ( TextReset ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Display as & ( * ( 0 as * const ServoComputedData ) ) . Display as
* const _ as usize } , 88usize , concat ! ( * const _ as usize } , 88usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Display ) )); ) , "::" , stringify ! ( Display ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Content as & ( * ( 0 as * const ServoComputedData ) ) . Content as
* const _ as usize } , 96usize , concat ! ( * const _ as usize } , 96usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Content ) )); ) , "::" , stringify ! ( Content ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . UIReset as & ( * ( 0 as * const ServoComputedData ) ) . UIReset as
* const _ as usize } , 104usize , concat ! ( * const _ as usize } , 104usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( UIReset ) )); ) , "::" , stringify ! ( UIReset ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Table as * & ( * ( 0 as * const ServoComputedData ) ) . Table as *
const _ as usize } , 112usize , concat ! ( const _ as usize } , 112usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Table ) )); ) , "::" , stringify ! ( Table ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Margin as * & ( * ( 0 as * const ServoComputedData ) ) . Margin as *
const _ as usize } , 120usize , concat ! ( const _ as usize } , 120usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Margin ) )); ) , "::" , stringify ! ( Margin ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Padding as & ( * ( 0 as * const ServoComputedData ) ) . Padding as
* const _ as usize } , 128usize , concat ! ( * const _ as usize } , 128usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Padding ) )); ) , "::" , stringify ! ( Padding ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Border as * & ( * ( 0 as * const ServoComputedData ) ) . Border as *
const _ as usize } , 136usize , concat ! ( const _ as usize } , 136usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Border ) )); ) , "::" , stringify ! ( Border ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Outline as & ( * ( 0 as * const ServoComputedData ) ) . Outline as
* const _ as usize } , 144usize , concat ! ( * const _ as usize } , 144usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Outline ) )); ) , "::" , stringify ! ( Outline ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . XUL as * & ( * ( 0 as * const ServoComputedData ) ) . XUL as *
const _ as usize } , 152usize , concat ! ( const _ as usize } , 152usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( XUL ) )); ) , "::" , stringify ! ( XUL ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . SVGReset as & ( * ( 0 as * const ServoComputedData ) ) . SVGReset as
* const _ as usize } , 160usize , concat ! ( * const _ as usize } , 160usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( SVGReset ) )); ) , "::" , stringify ! ( SVGReset ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Column as * & ( * ( 0 as * const ServoComputedData ) ) . Column as *
const _ as usize } , 168usize , concat ! ( const _ as usize } , 168usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Column ) )); ) , "::" , stringify ! ( Column ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . Effects as & ( * ( 0 as * const ServoComputedData ) ) . Effects as
* const _ as usize } , 176usize , concat ! ( * const _ as usize } , 176usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( Effects ) )); ) , "::" , stringify ! ( Effects ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
custom_properties as * const _ as usize } , 184usize , custom_properties as * const _ as usize } , 184usize ,
concat ! ( concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( custom_properties ) )); ) , "::" , stringify ! ( custom_properties ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
writing_mode as * const _ as usize } , 192usize , concat ! writing_mode as * const _ as usize } , 192usize , concat !
( (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( writing_mode ) )); ) , "::" , stringify ! ( writing_mode ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . flags as * & ( * ( 0 as * const ServoComputedData ) ) . flags as *
const _ as usize } , 193usize , concat ! ( const _ as usize } , 193usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( flags ) )); ) , "::" , stringify ! ( flags ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . rules as * & ( * ( 0 as * const ServoComputedData ) ) . rules as *
const _ as usize } , 200usize , concat ! ( const _ as usize } , 200usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( rules ) )); ) , "::" , stringify ! ( rules ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
visited_style as * const _ as usize } , 208usize , concat visited_style as * const _ as usize } , 208usize , concat
! ( ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( visited_style ) )); ) , "::" , stringify ! ( visited_style ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValues ) ) . & ( * ( 0 as * const ServoComputedData ) ) .
font_computation_data as * const _ as usize } , 216usize , font_computation_data as * const _ as usize } , 216usize ,
concat ! ( concat ! (
"Alignment of field: " , stringify ! ( ServoComputedValues "Alignment of field: " , stringify ! ( ServoComputedData
) , "::" , stringify ! ( font_computation_data ) )); ) , "::" , stringify ! ( font_computation_data ) ));
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy)] #[derive(Debug, Copy)]
pub struct ServoComputedValuesForgotten { pub struct ServoComputedDataForgotten {
pub mPtr: *const root::ServoComputedValues, pub mPtr: *const root::ServoComputedData,
} }
#[test] #[test]
fn bindgen_test_layout_ServoComputedValuesForgotten() { fn bindgen_test_layout_ServoComputedDataForgotten() {
assert_eq!(::std::mem::size_of::<ServoComputedValuesForgotten>() , assert_eq!(::std::mem::size_of::<ServoComputedDataForgotten>() ,
8usize , concat ! ( 8usize , concat ! (
"Size of: " , stringify ! ( ServoComputedValuesForgotten ) "Size of: " , stringify ! ( ServoComputedDataForgotten )
)); ));
assert_eq! (::std::mem::align_of::<ServoComputedValuesForgotten>() , assert_eq! (::std::mem::align_of::<ServoComputedDataForgotten>() ,
8usize , concat ! ( 8usize , concat ! (
"Alignment of " , stringify ! ( "Alignment of " , stringify ! (
ServoComputedValuesForgotten ) )); ServoComputedDataForgotten ) ));
assert_eq! (unsafe { assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedValuesForgotten ) ) . & ( * ( 0 as * const ServoComputedDataForgotten ) ) .
mPtr as * const _ as usize } , 0usize , concat ! ( mPtr as * const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( "Alignment of field: " , stringify ! (
ServoComputedValuesForgotten ) , "::" , stringify ! ( mPtr ServoComputedDataForgotten ) , "::" , stringify ! ( mPtr
) )); ) ));
} }
impl Clone for ServoComputedValuesForgotten { impl Clone for ServoComputedDataForgotten {
fn clone(&self) -> Self { *self } fn clone(&self) -> Self { *self }
} }
#[repr(u32)] #[repr(u32)]
@ -37764,7 +37764,7 @@ pub mod root {
*const root::mozilla::ServoStyleContext; *const root::mozilla::ServoStyleContext;
pub type ServoStyleContextBorrowedOrNull = pub type ServoStyleContextBorrowedOrNull =
*const root::mozilla::ServoStyleContext; *const root::mozilla::ServoStyleContext;
pub type ServoComputedValuesBorrowed = *const root::ServoComputedValues; pub type ServoComputedDataBorrowed = *const root::ServoComputedData;
pub type RawServoAnimationValueMapBorrowedMut = pub type RawServoAnimationValueMapBorrowedMut =
*mut root::RawServoAnimationValueMap; *mut root::RawServoAnimationValueMap;
pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode; pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;

View file

@ -73,7 +73,7 @@ pub mod style_structs {
} }
/// FIXME(emilio): This is completely duplicated with the other properties code. /// FIXME(emilio): This is completely duplicated with the other properties code.
pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedValues; pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedData;
#[derive(Debug)] #[derive(Debug)]
#[repr(C)] #[repr(C)]

View file

@ -39,7 +39,7 @@ use style::gecko_bindings::bindings::{RawServoMediaRule, RawServoMediaRuleBorrow
use style::gecko_bindings::bindings::{RawServoNamespaceRule, RawServoNamespaceRuleBorrowed}; use style::gecko_bindings::bindings::{RawServoNamespaceRule, RawServoNamespaceRuleBorrowed};
use style::gecko_bindings::bindings::{RawServoPageRule, RawServoPageRuleBorrowed}; use style::gecko_bindings::bindings::{RawServoPageRule, RawServoPageRuleBorrowed};
use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned}; use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned};
use style::gecko_bindings::bindings::{RawServoStyleSheetContentsBorrowed, ServoComputedValuesBorrowed}; use style::gecko_bindings::bindings::{RawServoStyleSheetContentsBorrowed, ServoComputedDataBorrowed};
use style::gecko_bindings::bindings::{RawServoStyleSheetContentsStrong, ServoStyleContextBorrowed}; use style::gecko_bindings::bindings::{RawServoStyleSheetContentsStrong, ServoStyleContextBorrowed};
use style::gecko_bindings::bindings::{RawServoSupportsRule, RawServoSupportsRuleBorrowed}; use style::gecko_bindings::bindings::{RawServoSupportsRule, RawServoSupportsRuleBorrowed};
use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong}; use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong};
@ -1754,8 +1754,8 @@ pub extern "C" fn Servo_ComputedValues_SpecifiesAnimationsOrTransitions(values:
#[no_mangle] #[no_mangle]
pub extern "C" fn Servo_ComputedValues_EqualCustomProperties( pub extern "C" fn Servo_ComputedValues_EqualCustomProperties(
first: ServoComputedValuesBorrowed, first: ServoComputedDataBorrowed,
second: ServoComputedValuesBorrowed second: ServoComputedDataBorrowed
) -> bool { ) -> bool {
first.get_custom_properties() == second.get_custom_properties() first.get_custom_properties() == second.get_custom_properties()
} }