Auto merge of #18391 - emilio:cascade-stoph, r=heycam

style: Stop the cascade when only reset structs change

From https://bugzilla.mozilla.org/show_bug.cgi?id=1395227

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18391)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-06 07:55:08 -05:00 committed by GitHub
commit 9802214aba
11 changed files with 967 additions and 587 deletions

View file

@ -4058,6 +4058,16 @@ cfg_if! {
pub static nsGkAtoms_moz_extension: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms18all_urlsPermissionE"]
pub static nsGkAtoms_all_urlsPermission: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms13clipboardReadE"]
pub static nsGkAtoms_clipboardRead: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms14clipboardWriteE"]
pub static nsGkAtoms_clipboardWrite: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms8debuggerE"]
pub static nsGkAtoms_debugger: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms4tabsE"]
pub static nsGkAtoms_tabs: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms18webRequestBlockingE"]
pub static nsGkAtoms_webRequestBlocking: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms4httpE"]
pub static nsGkAtoms_http: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms5httpsE"]
@ -9211,6 +9221,16 @@ cfg_if! {
pub static nsGkAtoms_moz_extension: *mut nsIAtom;
#[link_name = "?all_urlsPermission@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_all_urlsPermission: *mut nsIAtom;
#[link_name = "?clipboardRead@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_clipboardRead: *mut nsIAtom;
#[link_name = "?clipboardWrite@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_clipboardWrite: *mut nsIAtom;
#[link_name = "?debugger@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_debugger: *mut nsIAtom;
#[link_name = "?tabs@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_tabs: *mut nsIAtom;
#[link_name = "?webRequestBlocking@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_webRequestBlocking: *mut nsIAtom;
#[link_name = "?http@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_http: *mut nsIAtom;
#[link_name = "?https@nsGkAtoms@@2PEAVnsIAtom@@EA"]
@ -14364,6 +14384,16 @@ cfg_if! {
pub static nsGkAtoms_moz_extension: *mut nsIAtom;
#[link_name = "\x01?all_urlsPermission@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_all_urlsPermission: *mut nsIAtom;
#[link_name = "\x01?clipboardRead@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_clipboardRead: *mut nsIAtom;
#[link_name = "\x01?clipboardWrite@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_clipboardWrite: *mut nsIAtom;
#[link_name = "\x01?debugger@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_debugger: *mut nsIAtom;
#[link_name = "\x01?tabs@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_tabs: *mut nsIAtom;
#[link_name = "\x01?webRequestBlocking@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_webRequestBlocking: *mut nsIAtom;
#[link_name = "\x01?http@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_http: *mut nsIAtom;
#[link_name = "\x01?https@nsGkAtoms@@2PAVnsIAtom@@A"]
@ -19520,6 +19550,16 @@ macro_rules! atom {
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_moz_extension as *mut _) } };
("<all_urls>") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_all_urlsPermission as *mut _) } };
("clipboardRead") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_clipboardRead as *mut _) } };
("clipboardWrite") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_clipboardWrite as *mut _) } };
("debugger") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_debugger as *mut _) } };
("tabs") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_tabs as *mut _) } };
("webRequestBlocking") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_webRequestBlocking as *mut _) } };
("http") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_http as *mut _) } };
("https") =>

View file

@ -1087,8 +1087,8 @@ extern "C" {
extern "C" {
pub fn Gecko_CalcStyleDifference(old_style: ServoStyleContextBorrowed,
new_style: ServoStyleContextBorrowed,
old_style_bits: u64,
any_style_changed: *mut bool) -> u32;
any_style_changed: *mut bool,
reset_only_changed: *mut bool) -> u32;
}
extern "C" {
pub fn Gecko_GetElementSnapshot(table: *const ServoElementSnapshotTable,
@ -1969,6 +1969,11 @@ extern "C" {
RawServoStyleSheetContentsBorrowed)
-> usize;
}
extern "C" {
pub fn Servo_StyleSheet_GetSourceMapURL(sheet:
RawServoStyleSheetContentsBorrowed,
result: *mut nsAString);
}
extern "C" {
pub fn Servo_StyleSheet_GetOrigin(sheet:
RawServoStyleSheetContentsBorrowed)

View file

@ -1045,20 +1045,8 @@ pub mod root {
}
pub type pair_first_type<_T1> = _T1;
pub type pair_second_type<_T2> = _T2;
pub type pair__EnableB = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pair__CheckArgs {
pub _address: u8,
}
pub type pair__CheckArgsDep = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pair__CheckTupleLikeConstructor {
pub _address: u8,
}
pub type pair__CheckTLC = u8;
pub type conditional_type<_If> = _If;
pub type pair__PCCP = u8;
pub type pair__PCCFP = u8;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct input_iterator_tag {
@ -1078,118 +1066,37 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct forward_iterator_tag {
pub _address: u8,
}
#[test]
fn bindgen_test_layout_forward_iterator_tag() {
assert_eq!(::std::mem::size_of::<forward_iterator_tag>() , 1usize
, concat ! (
"Size of: " , stringify ! ( forward_iterator_tag ) ));
assert_eq! (::std::mem::align_of::<forward_iterator_tag>() ,
1usize , concat ! (
"Alignment of " , stringify ! ( forward_iterator_tag )
));
}
impl Clone for forward_iterator_tag {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct bidirectional_iterator_tag {
pub _address: u8,
}
#[test]
fn bindgen_test_layout_bidirectional_iterator_tag() {
assert_eq!(::std::mem::size_of::<bidirectional_iterator_tag>() ,
1usize , concat ! (
"Size of: " , stringify ! ( bidirectional_iterator_tag
) ));
assert_eq! (::std::mem::align_of::<bidirectional_iterator_tag>() ,
1usize , concat ! (
"Alignment of " , stringify ! (
bidirectional_iterator_tag ) ));
}
impl Clone for bidirectional_iterator_tag {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct random_access_iterator_tag {
pub _address: u8,
}
#[test]
fn bindgen_test_layout_random_access_iterator_tag() {
assert_eq!(::std::mem::size_of::<random_access_iterator_tag>() ,
1usize , concat ! (
"Size of: " , stringify ! ( random_access_iterator_tag
) ));
assert_eq! (::std::mem::align_of::<random_access_iterator_tag>() ,
1usize , concat ! (
"Alignment of " , stringify ! (
random_access_iterator_tag ) ));
}
impl Clone for random_access_iterator_tag {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iterator {
pub _address: u8,
}
pub type iterator_iterator_category<_Category> = _Category;
pub type iterator_value_type<_Tp> = _Tp;
pub type iterator_difference_type<_Distance> = _Distance;
pub type iterator_pointer<_Pointer> = _Pointer;
pub type iterator_reference<_Reference> = _Reference;
pub type iterator_iterator_category<_Category> = _Category;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct atomic {
}
pub type atomic___base = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct function {
pub _address: u8,
}
pub type __bit_iterator_difference_type = [u8; 0usize];
pub type __bit_iterator_value_type = bool;
pub type __bit_iterator_pointer = u8;
pub type __bit_iterator_reference = u8;
pub type __bit_iterator_iterator_category =
root::std::random_access_iterator_tag;
pub type __bit_iterator___storage_type = [u8; 0usize];
pub type __bit_iterator___storage_pointer = [u8; 0usize];
pub type _Base_bitset__WordT = ::std::os::raw::c_ulong;
pub type bitset__Base = u8;
pub type bitset__WordT = ::std::os::raw::c_ulong;
#[repr(C)]
pub struct __bit_const_reference {
pub __seg_: root::std::__bit_const_reference___storage_pointer,
pub __mask_: root::std::__bit_const_reference___storage_type,
#[derive(Debug)]
pub struct bitset_reference {
pub _M_wp: *mut root::std::bitset__WordT,
pub _M_bpos: usize,
}
pub type __bit_const_reference___storage_type = [u8; 0usize];
pub type __bit_const_reference___storage_pointer = [u8; 0usize];
pub type __bit_reference___storage_type = [u8; 0usize];
pub type __bit_reference___storage_pointer = [u8; 0usize];
pub type __bitset_difference_type = isize;
pub type __bitset_size_type = usize;
pub type __bitset___storage_type = root::std::__bitset_size_type;
pub type __bitset___self = u8;
pub type __bitset___storage_pointer =
*mut root::std::__bitset___storage_type;
pub type __bitset___const_storage_pointer =
*const root::std::__bitset___storage_type;
pub const __bitset___bits_per_word: ::std::os::raw::c_uint = 64;
pub type __bitset_reference = u8;
pub type __bitset_const_reference = root::std::__bit_const_reference;
pub type __bitset_iterator = u8;
pub type __bitset_const_iterator = u8;
extern "C" {
#[link_name = "__n_words"]
pub static bitset___n_words: ::std::os::raw::c_uint;
}
pub type bitset_base = u8;
pub type bitset_reference = root::std::bitset_base;
pub type bitset_const_reference = root::std::bitset_base;
}
pub mod __gnu_cxx {
#[allow(unused_imports)]
use self::super::super::root;
}
pub mod mozilla {
#[allow(unused_imports)]
@ -2330,7 +2237,7 @@ pub mod root {
}
}
#[repr(C)]
#[derive(Debug, Copy)]
#[derive(Debug)]
pub struct ThreadSafeAutoRefCnt {
pub mValue: u64,
}
@ -2351,9 +2258,6 @@ pub mod root {
ThreadSafeAutoRefCnt ) , "::" , stringify ! ( mValue )
));
}
impl Clone for ThreadSafeAutoRefCnt {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug)]
pub struct OwningNonNull<T> {
@ -6161,13 +6065,14 @@ pub mod root {
pub mFirstChild: root::RefPtr<root::mozilla::StyleSheet>,
pub mSheets: [u64; 10usize],
pub mSourceMapURL: ::nsstring::nsStringRepr,
pub mSourceMapURLFromComment: ::nsstring::nsStringRepr,
pub mPrincipalSet: bool,
}
pub use self::super::super::root::mozilla::net::ReferrerPolicy as
StyleSheetInfo_ReferrerPolicy;
#[test]
fn bindgen_test_layout_StyleSheetInfo() {
assert_eq!(::std::mem::size_of::<StyleSheetInfo>() , 216usize ,
assert_eq!(::std::mem::size_of::<StyleSheetInfo>() , 232usize ,
concat ! ( "Size of: " , stringify ! ( StyleSheetInfo )
));
assert_eq! (::std::mem::align_of::<StyleSheetInfo>() , 8usize ,
@ -6233,7 +6138,14 @@ pub mod root {
) , "::" , stringify ! ( mSourceMapURL ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const StyleSheetInfo ) ) .
mPrincipalSet as * const _ as usize } , 208usize ,
mSourceMapURLFromComment as * const _ as usize } ,
208usize , concat ! (
"Alignment of field: " , stringify ! ( StyleSheetInfo
) , "::" , stringify ! ( mSourceMapURLFromComment )
));
assert_eq! (unsafe {
& ( * ( 0 as * const StyleSheetInfo ) ) .
mPrincipalSet as * const _ as usize } , 224usize ,
concat ! (
"Alignment of field: " , stringify ! ( StyleSheetInfo
) , "::" , stringify ! ( mPrincipalSet ) ));
@ -6284,6 +6196,128 @@ pub mod root {
NotPseudo = 28,
MAX = 29,
}
/// The set of style sheets that apply to a document, backed by a Servo
/// Stylist. A ServoStyleSet contains ServoStyleSheets.
#[repr(C)]
#[derive(Debug)]
pub struct ServoStyleSet {
pub mKind: root::mozilla::ServoStyleSet_Kind,
pub mPresContext: *mut root::nsPresContext,
pub mLastPresContextUsesXBLStyleSet: *mut ::std::os::raw::c_void,
pub mRawSet: root::mozilla::UniquePtr<root::RawServoStyleSet>,
pub mSheets: [u64; 9usize],
pub mAuthorStyleDisabled: bool,
pub mStylistState: root::mozilla::StylistState,
pub mUserFontSetUpdateGeneration: u64,
pub mUserFontCacheUpdateGeneration: u32,
pub mNeedsRestyleAfterEnsureUniqueInner: bool,
pub mNonInheritingStyleContexts: [u64; 7usize],
pub mPostTraversalTasks: root::nsTArray<root::mozilla::PostTraversalTask>,
pub mStyleRuleMap: root::RefPtr<root::mozilla::ServoStyleRuleMap>,
pub mBindingManager: root::RefPtr<root::nsBindingManager>,
}
pub type ServoStyleSet_SnapshotTable =
root::mozilla::ServoElementSnapshotTable;
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ServoStyleSet_Kind { Master = 0, ForXBL = 1, }
extern "C" {
#[link_name = "_ZN7mozilla13ServoStyleSet17sInServoTraversalE"]
pub static mut ServoStyleSet_sInServoTraversal:
*mut root::mozilla::ServoStyleSet;
}
#[test]
fn bindgen_test_layout_ServoStyleSet() {
assert_eq!(::std::mem::size_of::<ServoStyleSet>() , 208usize ,
concat ! ( "Size of: " , stringify ! ( ServoStyleSet )
));
assert_eq! (::std::mem::align_of::<ServoStyleSet>() , 8usize ,
concat ! (
"Alignment of " , stringify ! ( ServoStyleSet ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mKind as *
const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mKind ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mPresContext
as * const _ as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mPresContext ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mLastPresContextUsesXBLStyleSet as * const _ as usize
} , 16usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mLastPresContextUsesXBLStyleSet
) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mRawSet as *
const _ as usize } , 24usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mRawSet ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mSheets as *
const _ as usize } , 32usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mSheets ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mAuthorStyleDisabled as * const _ as usize } ,
104usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mAuthorStyleDisabled ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mStylistState
as * const _ as usize } , 105usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mStylistState ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mUserFontSetUpdateGeneration as * const _ as usize } ,
112usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mUserFontSetUpdateGeneration )
));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mUserFontCacheUpdateGeneration as * const _ as usize }
, 120usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mUserFontCacheUpdateGeneration
) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mNeedsRestyleAfterEnsureUniqueInner as * const _ as
usize } , 124usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! (
mNeedsRestyleAfterEnsureUniqueInner ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mNonInheritingStyleContexts as * const _ as usize } ,
128usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mNonInheritingStyleContexts )
));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mPostTraversalTasks as * const _ as usize } , 184usize
, concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mPostTraversalTasks ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mStyleRuleMap
as * const _ as usize } , 192usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mStyleRuleMap ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mBindingManager as * const _ as usize } , 200usize ,
concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mBindingManager ) ));
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct SeenPtrs {
@ -9030,7 +9064,7 @@ pub mod root {
#[test]
fn bindgen_test_layout_ServoStyleSheetInner() {
assert_eq!(::std::mem::size_of::<ServoStyleSheetInner>() ,
232usize , concat ! (
248usize , concat ! (
"Size of: " , stringify ! ( ServoStyleSheetInner ) ));
assert_eq! (::std::mem::align_of::<ServoStyleSheetInner>() ,
8usize , concat ! (
@ -9038,14 +9072,14 @@ pub mod root {
));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSheetInner ) ) .
mContents as * const _ as usize } , 216usize , concat
mContents as * const _ as usize } , 232usize , concat
! (
"Alignment of field: " , stringify ! (
ServoStyleSheetInner ) , "::" , stringify ! (
mContents ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSheetInner ) ) .
mURLData as * const _ as usize } , 224usize , concat !
mURLData as * const _ as usize } , 240usize , concat !
(
"Alignment of field: " , stringify ! (
ServoStyleSheetInner ) , "::" , stringify ! ( mURLData
@ -9880,6 +9914,18 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ServoStyleRuleMap {
_unused: [u8; 0],
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StylistState {
NotDirty = 0,
StyleSheetsDirty = 1,
XBLStyleSheetsDirty = 2,
}
#[repr(C)]
#[derive(Debug)]
pub struct CSSFontFaceDescriptors {
pub mFamily: root::nsCSSValue,
@ -11114,6 +11160,7 @@ pub mod root {
pub mRecording: bool,
pub mSeenBadToken: bool,
pub mSeenVariableReference: bool,
pub mSourceMapURL: ::nsstring::nsStringRepr,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
@ -11129,7 +11176,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_nsCSSScanner() {
assert_eq!(::std::mem::size_of::<nsCSSScanner>() , 64usize , concat !
assert_eq!(::std::mem::size_of::<nsCSSScanner>() , 80usize , concat !
( "Size of: " , stringify ! ( nsCSSScanner ) ));
assert_eq! (::std::mem::align_of::<nsCSSScanner>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsCSSScanner ) ));
@ -11204,6 +11251,11 @@ pub mod root {
concat ! (
"Alignment of field: " , stringify ! ( nsCSSScanner ) ,
"::" , stringify ! ( mSeenVariableReference ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsCSSScanner ) ) . mSourceMapURL as *
const _ as usize } , 64usize , concat ! (
"Alignment of field: " , stringify ! ( nsCSSScanner ) ,
"::" , stringify ! ( mSourceMapURL ) ));
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -13578,8 +13630,11 @@ pub mod root {
pub const nsChangeHint_nsChangeHint_UpdateWidgetProperties:
root::nsChangeHint =
nsChangeHint(536870912);
pub const nsChangeHint_nsChangeHint_UpdateTableCellSpans:
root::nsChangeHint =
nsChangeHint(1073741824);
pub const nsChangeHint_nsChangeHint_AllHints: root::nsChangeHint =
nsChangeHint(1073741823);
nsChangeHint(2147483647);
impl ::std::ops::BitOr<root::nsChangeHint> for root::nsChangeHint {
type
Output
@ -15993,7 +16048,7 @@ pub mod root {
, "::" , stringify ! ( writing_mode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedData ) ) . flags as *
const _ as usize } , 193usize , concat ! (
const _ as usize } , 194usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedData )
, "::" , stringify ! ( flags ) ));
assert_eq! (unsafe {
@ -16057,7 +16112,7 @@ pub mod root {
/// tracking. NOTE: A string buffer can be modified only if its reference
/// count is 1.
#[repr(C)]
#[derive(Debug, Copy)]
#[derive(Debug)]
pub struct nsStringBuffer {
pub mRefCount: u32,
pub mStorageSize: u32,
@ -16079,9 +16134,6 @@ pub mod root {
"Alignment of field: " , stringify ! ( nsStringBuffer ) ,
"::" , stringify ! ( mStorageSize ) ));
}
impl Clone for nsStringBuffer {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct nsIAtom {
@ -25809,57 +25861,57 @@ pub mod root {
pub struct nsRange {
_unused: [u8; 0],
}
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_TYPE_SPECIFIC_BITS_OFFSET;
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_18 {
pub enum _bindgen_ty_77 {
NODE_HAS_LISTENERMANAGER = 4,
NODE_HAS_PROPERTIES = 8,
NODE_IS_ANONYMOUS_ROOT = 16,
@ -33485,46 +33537,46 @@ pub mod root {
assert_eq! (::std::mem::align_of::<nsISMILAttr>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsISMILAttr ) ));
}
pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO:
root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_20
root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_79
=
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3;
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT:
root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR;
pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_PENDING_RESTYLE_FLAGS;
pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS;
pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_ALL_RESTYLE_FLAGS;
pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET;
root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR;
pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_PENDING_RESTYLE_FLAGS;
pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS;
pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_ALL_RESTYLE_FLAGS;
pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_20 {
pub enum _bindgen_ty_79 {
ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608,
ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216,
ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432,
@ -33912,6 +33964,19 @@ pub mod root {
pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozPlaceholder: u32 = 8;
pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder: u32 = 8;
pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch: u32 = 12;
pub type nsCSSAnonBoxes_NonInheritingBase = u8;
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsCSSAnonBoxes_NonInheriting {
oofPlaceholder = 0,
horizontalFramesetBorder = 1,
verticalFramesetBorder = 2,
framesetBlank = 3,
tableColGroup = 4,
tableCol = 5,
pageBreak = 6,
_Count = 7,
}
pub type nsBindingList = root::nsTArray<root::RefPtr<root::nsXBLBinding>>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -34414,7 +34479,7 @@ pub mod root {
root::nsTArray<root::gfxFontVariation> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212850_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_205354_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -34770,7 +34835,7 @@ pub mod root {
root::mozilla::binding_danger::TErrorResult ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214679_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_207182_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -34935,7 +35000,7 @@ pub mod root {
root::JS::DeletePolicy ) ));
}
#[test]
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_220268__bindgen_ty_id_220275_close0_instantiation() {
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_212773__bindgen_ty_id_212780_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize ,
concat ! (
"Size of template specialization: " , stringify ! (
@ -35183,7 +35248,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222771_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_215281_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIDocument_Element>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35251,7 +35316,7 @@ pub mod root {
root::nsCOMPtr<root::nsIObserver> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223076_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_215586_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIDocument_Element>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35363,7 +35428,7 @@ pub mod root {
root::RefPtr<root::mozilla::URLExtraData> ) ));
}
#[test]
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_223625_close0_instantiation() {
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_216135_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::nsIDocument_Encoding>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35765,7 +35830,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224047_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216557_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35855,7 +35920,20 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224455_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_ServoStyleSheet_close1_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>
) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216977_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35899,7 +35977,7 @@ pub mod root {
root::mozilla::DefaultDelete ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_ServoStyleSheet_close1_close0_instantiation_1() {
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_ServoStyleSheet_close1_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35912,6 +35990,17 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_ServoStyleContext_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::ServoStyleContext>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleContext> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::ServoStyleContext>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleContext> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_PostTraversalTask_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::PostTraversalTask>>()
, 8usize , concat ! (
@ -35923,6 +36012,28 @@ pub mod root {
root::nsTArray<root::mozilla::PostTraversalTask> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_ServoStyleRuleMap_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::ServoStyleRuleMap>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleRuleMap> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::ServoStyleRuleMap>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleRuleMap> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsBindingManager_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsBindingManager>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsBindingManager> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsBindingManager>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsBindingManager> ) ));
}
#[test]
fn __bindgen_test_layout_UniquePtr_open0_nsISMILAttr_DefaultDelete_open1_nsISMILAttr_close1_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsISMILAttr>>()
, 8usize , concat ! (
@ -35956,7 +36067,7 @@ pub mod root {
root::nsTArray<::nsstring::nsStringRepr> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225430_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_217952_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36049,7 +36160,7 @@ pub mod root {
root::RefPtr<root::nsCSSFontFaceRule> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225739_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_218261_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36060,7 +36171,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225744_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_218266_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36117,7 +36228,7 @@ pub mod root {
root::RefPtr<root::mozilla::CSSStyleSheet> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226237_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_218759_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36462,7 +36573,7 @@ pub mod root {
root::nsCOMPtr<root::nsIPrincipal> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsBindingManager_close0_instantiation() {
fn __bindgen_test_layout_RefPtr_open0_nsBindingManager_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsBindingManager>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36776,7 +36887,7 @@ pub mod root {
root::nsCOMPtr<root::nsIWeakReference> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229067_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_221602_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36855,7 +36966,7 @@ pub mod root {
root::mozilla::DefaultDelete ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_235293_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227828_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36888,7 +36999,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::CallbackObject> ) ));
}
#[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_236462_close0_instantiation() {
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_228997_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36899,7 +37010,7 @@ pub mod root {
root::JS::Heap<*mut root::JSObject> ) ));
}
#[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_236466_close0_instantiation() {
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_229001_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36921,7 +37032,7 @@ pub mod root {
root::nsCOMPtr<root::nsIGlobalObject> ) ));
}
#[test]
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_236473_close0_instantiation() {
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_229008_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize ,
concat ! (
"Size of template specialization: " , stringify ! (
@ -37000,7 +37111,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237926_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_230187_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -37195,7 +37306,7 @@ pub mod root {
root::nsTArray<f64> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239297_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231631_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -37300,7 +37411,7 @@ pub mod root {
root::nsRefPtrHashKey<root::nsIAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241701_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_234035_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38067,7 +38178,7 @@ pub mod root {
root::RefPtr<root::nsStyleImageRequest> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244267_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236601_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38304,7 +38415,7 @@ pub mod root {
root::nsCOMPtr<root::nsIURI> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251963_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244297_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38315,7 +38426,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251968_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244302_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38403,7 +38514,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::ShadowRoot> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_252081_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244415_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38690,7 +38801,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253688_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246012_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38712,7 +38823,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::Element> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253848_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246172_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38723,7 +38834,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253853_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246177_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38855,7 +38966,7 @@ pub mod root {
root::nsTArray<root::gfxFontVariation> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_256860_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_248457_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38866,7 +38977,7 @@ pub mod root {
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_256868_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_248465_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (

View file

@ -1045,20 +1045,8 @@ pub mod root {
}
pub type pair_first_type<_T1> = _T1;
pub type pair_second_type<_T2> = _T2;
pub type pair__EnableB = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pair__CheckArgs {
pub _address: u8,
}
pub type pair__CheckArgsDep = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pair__CheckTupleLikeConstructor {
pub _address: u8,
}
pub type pair__CheckTLC = u8;
pub type conditional_type<_If> = _If;
pub type pair__PCCP = u8;
pub type pair__PCCFP = u8;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct input_iterator_tag {
@ -1078,118 +1066,37 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct forward_iterator_tag {
pub _address: u8,
}
#[test]
fn bindgen_test_layout_forward_iterator_tag() {
assert_eq!(::std::mem::size_of::<forward_iterator_tag>() , 1usize
, concat ! (
"Size of: " , stringify ! ( forward_iterator_tag ) ));
assert_eq! (::std::mem::align_of::<forward_iterator_tag>() ,
1usize , concat ! (
"Alignment of " , stringify ! ( forward_iterator_tag )
));
}
impl Clone for forward_iterator_tag {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct bidirectional_iterator_tag {
pub _address: u8,
}
#[test]
fn bindgen_test_layout_bidirectional_iterator_tag() {
assert_eq!(::std::mem::size_of::<bidirectional_iterator_tag>() ,
1usize , concat ! (
"Size of: " , stringify ! ( bidirectional_iterator_tag
) ));
assert_eq! (::std::mem::align_of::<bidirectional_iterator_tag>() ,
1usize , concat ! (
"Alignment of " , stringify ! (
bidirectional_iterator_tag ) ));
}
impl Clone for bidirectional_iterator_tag {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct random_access_iterator_tag {
pub _address: u8,
}
#[test]
fn bindgen_test_layout_random_access_iterator_tag() {
assert_eq!(::std::mem::size_of::<random_access_iterator_tag>() ,
1usize , concat ! (
"Size of: " , stringify ! ( random_access_iterator_tag
) ));
assert_eq! (::std::mem::align_of::<random_access_iterator_tag>() ,
1usize , concat ! (
"Alignment of " , stringify ! (
random_access_iterator_tag ) ));
}
impl Clone for random_access_iterator_tag {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iterator {
pub _address: u8,
}
pub type iterator_iterator_category<_Category> = _Category;
pub type iterator_value_type<_Tp> = _Tp;
pub type iterator_difference_type<_Distance> = _Distance;
pub type iterator_pointer<_Pointer> = _Pointer;
pub type iterator_reference<_Reference> = _Reference;
pub type iterator_iterator_category<_Category> = _Category;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct atomic {
}
pub type atomic___base = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct function {
pub _address: u8,
}
pub type __bit_iterator_difference_type = [u8; 0usize];
pub type __bit_iterator_value_type = bool;
pub type __bit_iterator_pointer = u8;
pub type __bit_iterator_reference = u8;
pub type __bit_iterator_iterator_category =
root::std::random_access_iterator_tag;
pub type __bit_iterator___storage_type = [u8; 0usize];
pub type __bit_iterator___storage_pointer = [u8; 0usize];
pub type _Base_bitset__WordT = ::std::os::raw::c_ulong;
pub type bitset__Base = u8;
pub type bitset__WordT = ::std::os::raw::c_ulong;
#[repr(C)]
pub struct __bit_const_reference {
pub __seg_: root::std::__bit_const_reference___storage_pointer,
pub __mask_: root::std::__bit_const_reference___storage_type,
#[derive(Debug)]
pub struct bitset_reference {
pub _M_wp: *mut root::std::bitset__WordT,
pub _M_bpos: usize,
}
pub type __bit_const_reference___storage_type = [u8; 0usize];
pub type __bit_const_reference___storage_pointer = [u8; 0usize];
pub type __bit_reference___storage_type = [u8; 0usize];
pub type __bit_reference___storage_pointer = [u8; 0usize];
pub type __bitset_difference_type = isize;
pub type __bitset_size_type = usize;
pub type __bitset___storage_type = root::std::__bitset_size_type;
pub type __bitset___self = u8;
pub type __bitset___storage_pointer =
*mut root::std::__bitset___storage_type;
pub type __bitset___const_storage_pointer =
*const root::std::__bitset___storage_type;
pub const __bitset___bits_per_word: ::std::os::raw::c_uint = 64;
pub type __bitset_reference = u8;
pub type __bitset_const_reference = root::std::__bit_const_reference;
pub type __bitset_iterator = u8;
pub type __bitset_const_iterator = u8;
extern "C" {
#[link_name = "__n_words"]
pub static bitset___n_words: ::std::os::raw::c_uint;
}
pub type bitset_base = u8;
pub type bitset_reference = root::std::bitset_base;
pub type bitset_const_reference = root::std::bitset_base;
}
pub mod __gnu_cxx {
#[allow(unused_imports)]
use self::super::super::root;
}
pub mod mozilla {
#[allow(unused_imports)]
@ -2254,7 +2161,7 @@ pub mod root {
}
}
#[repr(C)]
#[derive(Debug, Copy)]
#[derive(Debug)]
pub struct ThreadSafeAutoRefCnt {
pub mValue: u64,
}
@ -2275,9 +2182,6 @@ pub mod root {
ThreadSafeAutoRefCnt ) , "::" , stringify ! ( mValue )
));
}
impl Clone for ThreadSafeAutoRefCnt {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug)]
pub struct OwningNonNull<T> {
@ -6050,12 +5954,13 @@ pub mod root {
pub mFirstChild: root::RefPtr<root::mozilla::StyleSheet>,
pub mSheets: [u64; 10usize],
pub mSourceMapURL: ::nsstring::nsStringRepr,
pub mSourceMapURLFromComment: ::nsstring::nsStringRepr,
}
pub use self::super::super::root::mozilla::net::ReferrerPolicy as
StyleSheetInfo_ReferrerPolicy;
#[test]
fn bindgen_test_layout_StyleSheetInfo() {
assert_eq!(::std::mem::size_of::<StyleSheetInfo>() , 208usize ,
assert_eq!(::std::mem::size_of::<StyleSheetInfo>() , 224usize ,
concat ! ( "Size of: " , stringify ! ( StyleSheetInfo )
));
assert_eq! (::std::mem::align_of::<StyleSheetInfo>() , 8usize ,
@ -6119,6 +6024,13 @@ pub mod root {
concat ! (
"Alignment of field: " , stringify ! ( StyleSheetInfo
) , "::" , stringify ! ( mSourceMapURL ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const StyleSheetInfo ) ) .
mSourceMapURLFromComment as * const _ as usize } ,
208usize , concat ! (
"Alignment of field: " , stringify ! ( StyleSheetInfo
) , "::" , stringify ! ( mSourceMapURLFromComment )
));
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
@ -6166,6 +6078,128 @@ pub mod root {
NotPseudo = 28,
MAX = 29,
}
/// The set of style sheets that apply to a document, backed by a Servo
/// Stylist. A ServoStyleSet contains ServoStyleSheets.
#[repr(C)]
#[derive(Debug)]
pub struct ServoStyleSet {
pub mKind: root::mozilla::ServoStyleSet_Kind,
pub mPresContext: *mut root::nsPresContext,
pub mLastPresContextUsesXBLStyleSet: *mut ::std::os::raw::c_void,
pub mRawSet: root::mozilla::UniquePtr<root::RawServoStyleSet>,
pub mSheets: [u64; 9usize],
pub mAuthorStyleDisabled: bool,
pub mStylistState: root::mozilla::StylistState,
pub mUserFontSetUpdateGeneration: u64,
pub mUserFontCacheUpdateGeneration: u32,
pub mNeedsRestyleAfterEnsureUniqueInner: bool,
pub mNonInheritingStyleContexts: [u64; 7usize],
pub mPostTraversalTasks: root::nsTArray<root::mozilla::PostTraversalTask>,
pub mStyleRuleMap: root::RefPtr<root::mozilla::ServoStyleRuleMap>,
pub mBindingManager: root::RefPtr<root::nsBindingManager>,
}
pub type ServoStyleSet_SnapshotTable =
root::mozilla::ServoElementSnapshotTable;
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ServoStyleSet_Kind { Master = 0, ForXBL = 1, }
extern "C" {
#[link_name = "_ZN7mozilla13ServoStyleSet17sInServoTraversalE"]
pub static mut ServoStyleSet_sInServoTraversal:
*mut root::mozilla::ServoStyleSet;
}
#[test]
fn bindgen_test_layout_ServoStyleSet() {
assert_eq!(::std::mem::size_of::<ServoStyleSet>() , 208usize ,
concat ! ( "Size of: " , stringify ! ( ServoStyleSet )
));
assert_eq! (::std::mem::align_of::<ServoStyleSet>() , 8usize ,
concat ! (
"Alignment of " , stringify ! ( ServoStyleSet ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mKind as *
const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mKind ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mPresContext
as * const _ as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mPresContext ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mLastPresContextUsesXBLStyleSet as * const _ as usize
} , 16usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mLastPresContextUsesXBLStyleSet
) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mRawSet as *
const _ as usize } , 24usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mRawSet ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mSheets as *
const _ as usize } , 32usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mSheets ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mAuthorStyleDisabled as * const _ as usize } ,
104usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mAuthorStyleDisabled ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mStylistState
as * const _ as usize } , 105usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mStylistState ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mUserFontSetUpdateGeneration as * const _ as usize } ,
112usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mUserFontSetUpdateGeneration )
));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mUserFontCacheUpdateGeneration as * const _ as usize }
, 120usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mUserFontCacheUpdateGeneration
) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mNeedsRestyleAfterEnsureUniqueInner as * const _ as
usize } , 124usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! (
mNeedsRestyleAfterEnsureUniqueInner ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mNonInheritingStyleContexts as * const _ as usize } ,
128usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mNonInheritingStyleContexts )
));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mPostTraversalTasks as * const _ as usize } , 184usize
, concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mPostTraversalTasks ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) . mStyleRuleMap
as * const _ as usize } , 192usize , concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mStyleRuleMap ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSet ) ) .
mBindingManager as * const _ as usize } , 200usize ,
concat ! (
"Alignment of field: " , stringify ! ( ServoStyleSet )
, "::" , stringify ! ( mBindingManager ) ));
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct SeenPtrs {
@ -8876,7 +8910,7 @@ pub mod root {
#[test]
fn bindgen_test_layout_ServoStyleSheetInner() {
assert_eq!(::std::mem::size_of::<ServoStyleSheetInner>() ,
224usize , concat ! (
240usize , concat ! (
"Size of: " , stringify ! ( ServoStyleSheetInner ) ));
assert_eq! (::std::mem::align_of::<ServoStyleSheetInner>() ,
8usize , concat ! (
@ -8884,14 +8918,14 @@ pub mod root {
));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSheetInner ) ) .
mContents as * const _ as usize } , 208usize , concat
mContents as * const _ as usize } , 224usize , concat
! (
"Alignment of field: " , stringify ! (
ServoStyleSheetInner ) , "::" , stringify ! (
mContents ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoStyleSheetInner ) ) .
mURLData as * const _ as usize } , 216usize , concat !
mURLData as * const _ as usize } , 232usize , concat !
(
"Alignment of field: " , stringify ! (
ServoStyleSheetInner ) , "::" , stringify ! ( mURLData
@ -9726,6 +9760,18 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ServoStyleRuleMap {
_unused: [u8; 0],
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StylistState {
NotDirty = 0,
StyleSheetsDirty = 1,
XBLStyleSheetsDirty = 2,
}
#[repr(C)]
#[derive(Debug)]
pub struct CSSFontFaceDescriptors {
pub mFamily: root::nsCSSValue,
@ -10960,6 +11006,7 @@ pub mod root {
pub mRecording: bool,
pub mSeenBadToken: bool,
pub mSeenVariableReference: bool,
pub mSourceMapURL: ::nsstring::nsStringRepr,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
@ -10975,7 +11022,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_nsCSSScanner() {
assert_eq!(::std::mem::size_of::<nsCSSScanner>() , 64usize , concat !
assert_eq!(::std::mem::size_of::<nsCSSScanner>() , 80usize , concat !
( "Size of: " , stringify ! ( nsCSSScanner ) ));
assert_eq! (::std::mem::align_of::<nsCSSScanner>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsCSSScanner ) ));
@ -11050,6 +11097,11 @@ pub mod root {
concat ! (
"Alignment of field: " , stringify ! ( nsCSSScanner ) ,
"::" , stringify ! ( mSeenVariableReference ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsCSSScanner ) ) . mSourceMapURL as *
const _ as usize } , 64usize , concat ! (
"Alignment of field: " , stringify ! ( nsCSSScanner ) ,
"::" , stringify ! ( mSourceMapURL ) ));
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -13370,8 +13422,11 @@ pub mod root {
pub const nsChangeHint_nsChangeHint_UpdateWidgetProperties:
root::nsChangeHint =
nsChangeHint(536870912);
pub const nsChangeHint_nsChangeHint_UpdateTableCellSpans:
root::nsChangeHint =
nsChangeHint(1073741824);
pub const nsChangeHint_nsChangeHint_AllHints: root::nsChangeHint =
nsChangeHint(1073741823);
nsChangeHint(2147483647);
impl ::std::ops::BitOr<root::nsChangeHint> for root::nsChangeHint {
type
Output
@ -15785,7 +15840,7 @@ pub mod root {
, "::" , stringify ! ( writing_mode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ServoComputedData ) ) . flags as *
const _ as usize } , 193usize , concat ! (
const _ as usize } , 194usize , concat ! (
"Alignment of field: " , stringify ! ( ServoComputedData )
, "::" , stringify ! ( flags ) ));
assert_eq! (unsafe {
@ -15849,7 +15904,7 @@ pub mod root {
/// tracking. NOTE: A string buffer can be modified only if its reference
/// count is 1.
#[repr(C)]
#[derive(Debug, Copy)]
#[derive(Debug)]
pub struct nsStringBuffer {
pub mRefCount: u32,
pub mStorageSize: u32,
@ -15871,9 +15926,6 @@ pub mod root {
"Alignment of field: " , stringify ! ( nsStringBuffer ) ,
"::" , stringify ! ( mStorageSize ) ));
}
impl Clone for nsStringBuffer {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct nsIAtom {
@ -25414,57 +25466,57 @@ pub mod root {
pub struct nsRange {
_unused: [u8; 0],
}
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_18 =
_bindgen_ty_18::NODE_TYPE_SPECIFIC_BITS_OFFSET;
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_77 =
_bindgen_ty_77::NODE_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_18 {
pub enum _bindgen_ty_77 {
NODE_HAS_LISTENERMANAGER = 4,
NODE_HAS_PROPERTIES = 8,
NODE_IS_ANONYMOUS_ROOT = 16,
@ -32994,46 +33046,46 @@ pub mod root {
assert_eq! (::std::mem::align_of::<nsISMILAttr>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsISMILAttr ) ));
}
pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO:
root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_20
root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_79
=
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3;
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT:
root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR;
pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_PENDING_RESTYLE_FLAGS;
pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS;
pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_ALL_RESTYLE_FLAGS;
pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_20 =
_bindgen_ty_20::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET;
root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR;
pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_PENDING_RESTYLE_FLAGS;
pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS;
pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_ALL_RESTYLE_FLAGS;
pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_79 =
_bindgen_ty_79::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_20 {
pub enum _bindgen_ty_79 {
ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608,
ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216,
ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432,
@ -33421,6 +33473,19 @@ pub mod root {
pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozPlaceholder: u32 = 8;
pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder: u32 = 8;
pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch: u32 = 12;
pub type nsCSSAnonBoxes_NonInheritingBase = u8;
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsCSSAnonBoxes_NonInheriting {
oofPlaceholder = 0,
horizontalFramesetBorder = 1,
verticalFramesetBorder = 2,
framesetBlank = 3,
tableColGroup = 4,
tableCol = 5,
pageBreak = 6,
_Count = 7,
}
pub type nsBindingList = root::nsTArray<root::RefPtr<root::nsXBLBinding>>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -33923,7 +33988,7 @@ pub mod root {
root::nsTArray<root::gfxFontVariation> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210478_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_202983_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -34279,7 +34344,7 @@ pub mod root {
root::mozilla::binding_danger::TErrorResult ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212273_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_204777_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -34444,7 +34509,7 @@ pub mod root {
root::JS::DeletePolicy ) ));
}
#[test]
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_217834__bindgen_ty_id_217841_close0_instantiation() {
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_210340__bindgen_ty_id_210347_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize ,
concat ! (
"Size of template specialization: " , stringify ! (
@ -34692,7 +34757,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_220335_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212846_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIDocument_Element>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -34760,7 +34825,7 @@ pub mod root {
root::nsCOMPtr ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_220640_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213151_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIDocument_Element>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -34872,7 +34937,7 @@ pub mod root {
root::RefPtr<root::mozilla::URLExtraData> ) ));
}
#[test]
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_221189_close0_instantiation() {
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_213700_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::nsIDocument_Encoding>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35274,7 +35339,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_221609_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214120_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35364,7 +35429,20 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222015_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_ServoStyleSheet_close1_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>
) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214538_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35408,7 +35486,7 @@ pub mod root {
root::mozilla::DefaultDelete ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_ServoStyleSheet_close1_close0_instantiation_1() {
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_ServoStyleSheet_close1_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::ServoStyleSheet>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35421,6 +35499,17 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_ServoStyleContext_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::ServoStyleContext>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleContext> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::ServoStyleContext>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleContext> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_PostTraversalTask_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::PostTraversalTask>>()
, 8usize , concat ! (
@ -35432,6 +35521,28 @@ pub mod root {
root::nsTArray<root::mozilla::PostTraversalTask> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_ServoStyleRuleMap_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::ServoStyleRuleMap>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleRuleMap> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::ServoStyleRuleMap>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::mozilla::ServoStyleRuleMap> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsBindingManager_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsBindingManager>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsBindingManager> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsBindingManager>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsBindingManager> ) ));
}
#[test]
fn __bindgen_test_layout_UniquePtr_open0_nsISMILAttr_DefaultDelete_open1_nsISMILAttr_close1_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsISMILAttr>>()
, 8usize , concat ! (
@ -35465,7 +35576,7 @@ pub mod root {
root::nsTArray<::nsstring::nsStringRepr> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222980_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_215503_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35558,7 +35669,7 @@ pub mod root {
root::RefPtr<root::nsCSSFontFaceRule> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223287_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_215810_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35569,7 +35680,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223292_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_215815_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35626,7 +35737,7 @@ pub mod root {
root::RefPtr<root::mozilla::CSSStyleSheet> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223769_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216292_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -35969,7 +36080,7 @@ pub mod root {
root::nsCOMPtr ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsBindingManager_close0_instantiation() {
fn __bindgen_test_layout_RefPtr_open0_nsBindingManager_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsBindingManager>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36272,7 +36383,7 @@ pub mod root {
root::nsCOMPtr ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226569_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_219105_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36351,7 +36462,7 @@ pub mod root {
root::mozilla::DefaultDelete ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_232778_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225314_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36384,7 +36495,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::CallbackObject> ) ));
}
#[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_233947_close0_instantiation() {
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_226483_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36395,7 +36506,7 @@ pub mod root {
root::JS::Heap<*mut root::JSObject> ) ));
}
#[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_233951_close0_instantiation() {
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_226487_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36417,7 +36528,7 @@ pub mod root {
root::nsCOMPtr ) ));
}
#[test]
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_233958_close0_instantiation() {
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_226494_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize ,
concat ! (
"Size of template specialization: " , stringify ! (
@ -36496,7 +36607,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_235411_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227673_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36691,7 +36802,7 @@ pub mod root {
root::nsTArray<f64> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236782_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229117_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -36796,7 +36907,7 @@ pub mod root {
root::nsRefPtrHashKey<root::nsIAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239151_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231486_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -37563,7 +37674,7 @@ pub mod root {
root::RefPtr<root::nsStyleImageRequest> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241641_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_233976_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -37800,7 +37911,7 @@ pub mod root {
root::nsCOMPtr ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249337_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241672_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -37811,7 +37922,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249342_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241677_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -37899,7 +38010,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::ShadowRoot> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249455_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241790_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38186,7 +38297,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251056_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243381_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38208,7 +38319,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::Element> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251212_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243537_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38219,7 +38330,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251217_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243542_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38351,7 +38462,7 @@ pub mod root {
root::nsTArray<root::gfxFontVariation> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_254214_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_245812_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -38362,7 +38473,7 @@ pub mod root {
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_254220_close0_instantiation() {
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_245818_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (

View file

@ -42,27 +42,26 @@ impl GeckoRestyleDamage {
}
/// Computes the `StyleDifference` (including the appropriate change hint)
/// given an old style (in the form of a `nsStyleContext`, and a new style
/// (in the form of `ComputedValues`).
///
/// Note that we could in theory just get two `ComputedValues` here and diff
/// them, but Gecko has an interesting optimization when they mark accessed
/// structs, so they effectively only diff structs that have ever been
/// accessed from layout.
/// given an old and a new style.
pub fn compute_style_difference(
old_style: &ComputedValues,
new_style: &ComputedValues,
) -> StyleDifference {
let mut any_style_changed: bool = false;
let mut any_style_changed = false;
let mut reset_only = false;
let hint = unsafe {
bindings::Gecko_CalcStyleDifference(
old_style,
new_style,
structs::NS_STYLE_INHERIT_MASK as u64,
&mut any_style_changed
&mut any_style_changed,
&mut reset_only,
)
};
let change = if any_style_changed { StyleChange::Changed } else { StyleChange::Unchanged };
let change = if any_style_changed {
StyleChange::Changed { reset_only }
} else {
StyleChange::Unchanged
};
StyleDifference::new(GeckoRestyleDamage(nsChangeHint(hint)), change)
}

View file

@ -21,6 +21,7 @@ use servo_arc::{Arc, ArcBorrow};
use traversal_flags;
/// Represents the result of comparing an element's old and new style.
#[derive(Debug)]
pub struct StyleDifference {
/// The resulting damage.
pub damage: RestyleDamage,
@ -40,12 +41,15 @@ impl StyleDifference {
}
/// Represents whether or not the style of an element has changed.
#[derive(Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum StyleChange {
/// The style hasn't changed.
Unchanged,
/// The style has changed.
Changed,
Changed {
/// Whether only reset structs changed.
reset_only: bool,
},
}
/// Whether or not newly computed values for an element need to be cascade
@ -56,19 +60,23 @@ pub enum ChildCascadeRequirement {
/// we won't bother recomputing style for children, so we can skip cascading
/// the new values into child elements.
CanSkipCascade = 0,
/// The same as `MustCascadeChildren`, but we only need to actually
/// recascade if the child inherits any explicit reset style.
MustCascadeChildrenIfInheritResetStyle = 1,
/// Old and new computed values were different, so we must cascade the
/// new values to children.
///
/// FIXME(heycam) Although this is "must" cascade, in the future we should
/// track whether child elements rely specifically on inheriting particular
/// property values. When we do that, we can treat `MustCascadeChildren` as
/// "must cascade unless we know that changes to these properties can be
/// ignored".
MustCascadeChildren = 1,
MustCascadeChildren = 2,
/// The same as `MustCascadeChildren`, but for the entire subtree. This is
/// used to handle root font-size updates needing to recascade the whole
/// document.
MustCascadeDescendants = 2,
MustCascadeDescendants = 3,
}
impl ChildCascadeRequirement {
/// Whether we can unconditionally skip the cascade.
pub fn can_skip_cascade(&self) -> bool {
matches!(*self, ChildCascadeRequirement::CanSkipCascade)
}
}
bitflags! {
@ -341,16 +349,19 @@ trait PrivateMatchMethods: TElement {
/// Computes and applies non-redundant damage.
#[cfg(feature = "gecko")]
fn accumulate_damage_for(&self,
shared_context: &SharedStyleContext,
restyle: &mut RestyleData,
old_values: &ComputedValues,
new_values: &ComputedValues,
pseudo: Option<&PseudoElement>)
-> ChildCascadeRequirement {
fn accumulate_damage_for(
&self,
shared_context: &SharedStyleContext,
restyle: &mut RestyleData,
old_values: &ComputedValues,
new_values: &ComputedValues,
pseudo: Option<&PseudoElement>
) -> ChildCascadeRequirement {
debug!("accumulate_damage_for: {:?}", self);
// Don't accumulate damage if we're in a forgetful traversal.
if shared_context.traversal_flags.contains(traversal_flags::Forgetful) {
debug!(" > forgetful traversal");
return ChildCascadeRequirement::MustCascadeChildren;
}
@ -362,7 +373,7 @@ trait PrivateMatchMethods: TElement {
// for followup work to make the optimization here more optimal by considering
// each bit individually.
let skip_applying_damage =
restyle.reconstructed_self_or_ancestor();
cfg!(feature = "gecko") && restyle.reconstructed_self_or_ancestor();
let difference =
self.compute_style_difference(old_values, new_values, pseudo);
@ -371,37 +382,77 @@ trait PrivateMatchMethods: TElement {
restyle.damage |= difference.damage;
}
debug!(" > style difference: {:?}", difference);
// We need to cascade the children in order to ensure the correct
// propagation of computed value flags.
//
// FIXME(emilio): If we start optimizing changes to reset-only
// properties that aren't explicitly inherited, we'd need to add a flag
// to handle justify-items: auto correctly when there's a legacy
// justify-items.
if old_values.flags != new_values.flags {
debug!(" > flags changed: {:?} != {:?}", old_values.flags, new_values.flags);
return ChildCascadeRequirement::MustCascadeChildren;
}
match difference.change {
StyleChange::Unchanged => ChildCascadeRequirement::CanSkipCascade,
StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren,
}
}
StyleChange::Changed { reset_only } => {
// If inherited properties changed, the best we can do is
// cascade the children.
if !reset_only {
return ChildCascadeRequirement::MustCascadeChildren
}
/// Computes and applies restyle damage unless we've already maxed it out.
#[cfg(feature = "servo")]
fn accumulate_damage_for(&self,
_shared_context: &SharedStyleContext,
restyle: &mut RestyleData,
old_values: &ComputedValues,
new_values: &ComputedValues,
pseudo: Option<&PseudoElement>)
-> ChildCascadeRequirement {
let difference = self.compute_style_difference(old_values, new_values, pseudo);
restyle.damage |= difference.damage;
match difference.change {
StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren,
StyleChange::Unchanged => ChildCascadeRequirement::CanSkipCascade,
let old_display = old_values.get_box().clone_display();
let new_display = new_values.get_box().clone_display();
// Blockification of children may depend on our display value,
// so we need to actually do the recascade. We could potentially
// do better, but it doesn't seem worth it.
if old_display.is_item_container() != new_display.is_item_container() {
return ChildCascadeRequirement::MustCascadeChildren
}
// Line break suppression may also be affected if the display
// type changes from ruby to non-ruby.
#[cfg(feature = "gecko")]
{
if old_display.is_ruby_type() != new_display.is_ruby_type() {
return ChildCascadeRequirement::MustCascadeChildren
}
}
// Children with justify-items: auto may depend on our
// justify-items property value.
//
// Similarly, we could potentially do better, but this really
// seems not common enough to care about.
#[cfg(feature = "gecko")]
{
use values::specified::align;
let old_justify_items =
old_values.get_position().clone_justify_items();
let new_justify_items =
new_values.get_position().clone_justify_items();
let was_legacy_justify_items =
old_justify_items.computed.0.contains(align::ALIGN_LEGACY);
let is_legacy_justify_items =
new_justify_items.computed.0.contains(align::ALIGN_LEGACY);
if is_legacy_justify_items != was_legacy_justify_items {
return ChildCascadeRequirement::MustCascadeChildren;
}
if was_legacy_justify_items &&
old_justify_items.computed != new_justify_items.computed {
return ChildCascadeRequirement::MustCascadeChildren;
}
}
// We could prove that, if our children don't inherit reset
// properties, we can stop the cascade.
ChildCascadeRequirement::MustCascadeChildrenIfInheritResetStyle
}
}
}

View file

@ -11,7 +11,7 @@ bitflags! {
/// anonymous boxes, see StyleBuilder::for_inheritance and its callsites.
/// If we ever want to add some flags that shouldn't inherit for them,
/// we might want to add a function to handle this.
pub flags ComputedValueFlags: u8 {
pub flags ComputedValueFlags: u16 {
/// Whether the style or any of the ancestors has a text-decoration-line
/// property that should get propagated to descendants.
///
@ -56,5 +56,8 @@ bitflags! {
///
/// Important because of the same reason.
const INHERITS_CONTENT = 1 << 7,
/// Whether the child explicitly inherits any reset property.
const INHERITS_RESET_STYLE = 1 << 8,
}
}

View file

@ -2661,6 +2661,10 @@ impl<'a> StyleBuilder<'a> {
self.inherited_style_ignoring_first_line.get_${property.style_struct.name_lower}();
% endif
% if not property.style_struct.inherited:
self.flags.insert(::properties::computed_value_flags::INHERITS_RESET_STYLE);
% endif
% if property.ident == "content":
self.flags.insert(::properties::computed_value_flags::INHERITS_CONTENT);
% endif

View file

@ -65,7 +65,14 @@ impl ServoRestyleDamage {
new: &ComputedValues,
) -> StyleDifference {
let damage = compute_damage(old, new);
let change = if damage.is_empty() { StyleChange::Unchanged } else { StyleChange::Changed };
let change = if damage.is_empty() {
StyleChange::Unchanged
} else {
// FIXME(emilio): Differentiate between reset and inherited
// properties here, and set `reset_only` appropriately so the
// optimization to skip the cascade in those cases applies.
StyleChange::Changed { reset_only: false }
};
StyleDifference::new(damage, change)
}

View file

@ -13,7 +13,11 @@ use properties::longhands::float::computed_value::T as float;
use properties::longhands::overflow_x::computed_value::T as overflow;
use properties::longhands::position::computed_value::T as position;
/// An unsized struct that implements all the adjustment methods.
/// A struct that implements all the adjustment methods.
///
/// NOTE(emilio): If new adjustments are introduced that depend on reset
/// properties of the parent, you may need tweaking the
/// `ChildCascadeRequirement` code in `matching.rs`.
pub struct StyleAdjuster<'a, 'b: 'a> {
style: &'a mut StyleBuilder<'b>,
}
@ -50,9 +54,11 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// Apply the blockification rules based on the table in CSS 2.2 section 9.7.
/// https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
fn blockify_if_necessary(&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags) {
fn blockify_if_necessary(
&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags,
) {
let mut blockify = false;
macro_rules! blockify_if {
($if_what:expr) => {
@ -80,8 +86,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
let blockified_display =
display.equivalent_block_display(flags.contains(IS_ROOT_ELEMENT));
if display != blockified_display {
self.style.mutate_box().set_adjusted_display(blockified_display,
is_item_or_root);
self.style.mutate_box().set_adjusted_display(
blockified_display,
is_item_or_root,
);
}
}
@ -165,10 +173,14 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
///
/// https://lists.w3.org/Archives/Public/www-style/2017Mar/0045.html
/// https://github.com/servo/servo/issues/15754
fn adjust_for_writing_mode(&mut self,
layout_parent_style: &ComputedValues) {
let our_writing_mode = self.style.get_inheritedbox().clone_writing_mode();
let parent_writing_mode = layout_parent_style.get_inheritedbox().clone_writing_mode();
fn adjust_for_writing_mode(
&mut self,
layout_parent_style: &ComputedValues,
) {
let our_writing_mode =
self.style.get_inheritedbox().clone_writing_mode();
let parent_writing_mode =
layout_parent_style.get_inheritedbox().clone_writing_mode();
if our_writing_mode != parent_writing_mode &&
self.style.get_box().clone_display() == display::inline {
@ -323,10 +335,16 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// If a <fieldset> has grid/flex display type, we need to inherit
/// this type into its ::-moz-fieldset-content anonymous box.
///
/// NOTE(emilio): We don't need to handle the display change for this case
/// in matching.rs because anonymous box restyling works separately to the
/// normal cascading process.
#[cfg(feature = "gecko")]
fn adjust_for_fieldset_content(&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags) {
fn adjust_for_fieldset_content(
&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags,
) {
use properties::IS_FIELDSET_CONTENT;
if !flags.contains(IS_FIELDSET_CONTENT) {
return;
@ -337,8 +355,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
// when <fieldset> has "display: contents".
let parent_display = layout_parent_style.get_box().clone_display();
let new_display = match parent_display {
display::flex | display::inline_flex => Some(display::flex),
display::grid | display::inline_grid => Some(display::grid),
display::flex |
display::inline_flex => Some(display::flex),
display::grid |
display::inline_grid => Some(display::grid),
_ => None,
};
if let Some(new_display) = new_display {
@ -355,22 +375,25 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
#[cfg(feature = "gecko")]
fn adjust_for_table_text_align(&mut self) {
use properties::longhands::text_align::computed_value::T as text_align;
if self.style.get_box().clone_display() != display::table {
return;
}
if self.style.get_box().clone_display() != display::table {
return;
}
match self.style.get_inheritedtext().clone_text_align() {
text_align::_moz_left |
text_align::_moz_center |
text_align::_moz_right => {}
_ => return,
}
match self.style.get_inheritedtext().clone_text_align() {
text_align::_moz_left |
text_align::_moz_center |
text_align::_moz_right => {},
_ => return,
}
self.style.mutate_inheritedtext().set_text_align(text_align::start);
self.style.mutate_inheritedtext().set_text_align(text_align::start)
}
/// Set the HAS_TEXT_DECORATION_LINES flag based on parent style.
fn adjust_for_text_decoration_lines(&mut self, layout_parent_style: &ComputedValues) {
fn adjust_for_text_decoration_lines(
&mut self,
layout_parent_style: &ComputedValues,
) {
use properties::computed_value_flags::HAS_TEXT_DECORATION_LINES;
if layout_parent_style.flags.contains(HAS_TEXT_DECORATION_LINES) ||
!self.style.get_text().clone_text_decoration_line().is_empty() {
@ -379,7 +402,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
}
#[cfg(feature = "gecko")]
fn should_suppress_linebreak(&self, layout_parent_style: &ComputedValues) -> bool {
fn should_suppress_linebreak(
&self,
layout_parent_style: &ComputedValues,
) -> bool {
use properties::computed_value_flags::SHOULD_SUPPRESS_LINEBREAK;
// Line break suppression should only be propagated to in-flow children.
if self.style.floated() || self.style.out_of_flow_positioned() {
@ -395,13 +421,15 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
}
match self.style.get_box().clone_display() {
// Ruby base and text are always non-breakable.
display::ruby_base | display::ruby_text => true,
display::ruby_base |
display::ruby_text => true,
// Ruby base container and text container are breakable.
// Note that, when certain HTML tags, e.g. form controls, have ruby
// level container display type, they could also escape from the
// line break suppression flag while they shouldn't. However, it is
// generally fine since they themselves are non-breakable.
display::ruby_base_container | display::ruby_text_container => false,
display::ruby_base_container |
display::ruby_text_container => false,
// Anything else is non-breakable if and only if its layout parent
// has a ruby display type, because any of the ruby boxes can be
// anonymous.
@ -415,9 +443,11 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// * suppress border and padding for ruby level containers,
/// * correct unicode-bidi.
#[cfg(feature = "gecko")]
fn adjust_for_ruby(&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags) {
fn adjust_for_ruby(
&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags,
) {
use properties::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP;
use properties::computed_value_flags::SHOULD_SUPPRESS_LINEBREAK;
use properties::longhands::unicode_bidi::computed_value::T as unicode_bidi;
@ -447,7 +477,8 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
// per spec https://drafts.csswg.org/css-ruby-1/#bidi
if self_display.is_ruby_type() {
let new_value = match self.style.get_text().clone_unicode_bidi() {
unicode_bidi::normal | unicode_bidi::embed => Some(unicode_bidi::isolate),
unicode_bidi::normal |
unicode_bidi::embed => Some(unicode_bidi::isolate),
unicode_bidi::bidi_override => Some(unicode_bidi::isolate_override),
_ => None,
};
@ -521,9 +552,11 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// When comparing to Gecko, this is similar to the work done by
/// `nsStyleContext::ApplyStyleFixups`, plus some parts of
/// `nsStyleSet::GetContext`.
pub fn adjust(&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags) {
pub fn adjust(
&mut self,
layout_parent_style: &ComputedValues,
flags: CascadeFlags,
) {
self.adjust_for_visited(flags);
#[cfg(feature = "gecko")]
{

View file

@ -453,7 +453,9 @@ where
D: DomTraversal<E>,
F: FnMut(E::ConcreteNode),
{
use std::cmp;
use traversal_flags::*;
let flags = context.shared.traversal_flags;
context.thread_local.begin_element(element, data);
context.thread_local.statistics.elements_traversed += 1;
@ -462,28 +464,25 @@ where
"Should've handled snapshots here already");
let compute_self = !element.has_current_styles_for_traversal(data, flags);
let mut hint = RestyleHint::empty();
debug!("recalc_style_at: {:?} (compute_self={:?}, \
dirty_descendants={:?}, data={:?})",
element, compute_self, element.has_dirty_descendants(), data);
let mut child_cascade_requirement = ChildCascadeRequirement::CanSkipCascade;
// Compute style for this element if necessary.
if compute_self {
match compute_style(traversal_data, context, element, data) {
ChildCascadeRequirement::MustCascadeChildren => {
hint |= RECASCADE_SELF;
}
ChildCascadeRequirement::MustCascadeDescendants => {
hint |= RECASCADE_SELF | RECASCADE_DESCENDANTS;
}
ChildCascadeRequirement::CanSkipCascade => {}
};
child_cascade_requirement =
compute_style(traversal_data, context, element, data);
// We must always cascade native anonymous subtrees, since they inherit
// styles from their first non-NAC ancestor.
if element.is_native_anonymous() {
hint |= RECASCADE_SELF;
// We must always cascade native anonymous subtrees, since they inherit
// styles from their first non-NAC ancestor.
child_cascade_requirement = cmp::max(
child_cascade_requirement,
ChildCascadeRequirement::MustCascadeChildren,
);
}
// If we're restyling this element to display:none, throw away all style
@ -507,7 +506,7 @@ where
// those operations and compute the propagated restyle hint (unless we're
// not processing invalidations, in which case don't need to propagate it
// and must avoid clearing it).
let mut propagated_hint = if flags.contains(UnstyledOnly) {
let propagated_hint = if flags.contains(UnstyledOnly) {
RestyleHint::empty()
} else {
debug_assert!(flags.for_animation_only() ||
@ -517,13 +516,10 @@ where
data.restyle.hint.propagate(&flags)
};
// FIXME(bholley): Need to handle explicitly-inherited reset properties
// somewhere.
propagated_hint.insert(hint);
trace!("propagated_hint={:?} \
trace!("propagated_hint={:?}, cascade_requirement={:?}, \
is_display_none={:?}, implementing_pseudo={:?}",
propagated_hint,
child_cascade_requirement,
data.styles.is_display_none(),
element.implemented_pseudo_element());
debug_assert!(element.has_current_styles_for_traversal(data, flags),
@ -553,6 +549,7 @@ where
// enumerated in should_cull_subtree().
let mut traverse_children = has_dirty_descendants_for_this_restyle ||
!propagated_hint.is_empty() ||
!child_cascade_requirement.can_skip_cascade() ||
context.thread_local.is_initial_style() ||
data.restyle.reconstructed_self() ||
is_servo_nonincremental_layout();
@ -567,6 +564,7 @@ where
element,
data,
propagated_hint,
child_cascade_requirement,
data.restyle.reconstructed_self_or_ancestor(),
note_child
);
@ -778,6 +776,7 @@ fn note_children<E, D, F>(
element: E,
data: &ElementData,
propagated_hint: RestyleHint,
cascade_requirement: ChildCascadeRequirement,
reconstructed_ancestor: bool,
mut note_child: F,
)
@ -816,7 +815,24 @@ where
// subtree.
child_data.restyle.set_reconstructed_ancestor(reconstructed_ancestor);
child_data.restyle.hint.insert(propagated_hint);
let mut child_hint = propagated_hint;
match cascade_requirement {
ChildCascadeRequirement::CanSkipCascade => {}
ChildCascadeRequirement::MustCascadeDescendants => {
child_hint |= RECASCADE_SELF | RECASCADE_DESCENDANTS;
}
ChildCascadeRequirement::MustCascadeChildrenIfInheritResetStyle => {
use properties::computed_value_flags::INHERITS_RESET_STYLE;
if child_data.styles.primary().flags.contains(INHERITS_RESET_STYLE) {
child_hint |= RECASCADE_SELF;
}
}
ChildCascadeRequirement::MustCascadeChildren => {
child_hint |= RECASCADE_SELF;
}
}
child_data.restyle.hint.insert(child_hint);
// Handle element snapshots and invalidation of descendants and siblings
// as needed.