Auto merge of #18196 - bholley:restyle_roots, r=emilio

stylo: Maintain a restyle root and use it to cull the traversal

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

<!-- 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/18196)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-22 22:04:34 -05:00 committed by GitHub
commit 20c73e7f7d
12 changed files with 398 additions and 320 deletions

View file

@ -501,13 +501,20 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
unsafe fn unset_animation_only_dirty_descendants(&self) { unsafe fn unset_animation_only_dirty_descendants(&self) {
} }
/// Clear all bits related to dirty descendant. /// Clear all bits related describing the dirtiness of descendants.
/// ///
/// In Gecko, this corresponds to the regular dirty descendants bit, the /// In Gecko, this corresponds to the regular dirty descendants bit, the
/// animation-only dirty descendants bit, and the lazy frame construction /// animation-only dirty descendants bit, and the lazy frame construction
/// descendants bit. /// descendants bit.
unsafe fn clear_descendants_bits(&self) { self.unset_dirty_descendants(); } unsafe fn clear_descendants_bits(&self) { self.unset_dirty_descendants(); }
/// Clear all element flags related to dirtiness.
///
/// In Gecko, this corresponds to the regular dirty descendants bit, the
/// animation-only dirty descendants bit, the lazy frame construction bit,
/// and the lazy frame construction descendants bit.
unsafe fn clear_dirty_bits(&self) { self.unset_dirty_descendants(); }
/// Returns true if this element is a visited link. /// Returns true if this element is a visited link.
/// ///
/// Servo doesn't support visited styles yet. /// Servo doesn't support visited styles yet.
@ -718,28 +725,6 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
-> bool; -> bool;
} }
/// Trait abstracting over different kinds of dirty-descendants bits.
pub trait DescendantsBit<E: TElement> {
/// Returns true if the Element has the bit.
fn has(el: E) -> bool;
/// Sets the bit on the Element.
unsafe fn set(el: E);
}
/// Implementation of DescendantsBit for the regular dirty descendants bit.
pub struct DirtyDescendants;
impl<E: TElement> DescendantsBit<E> for DirtyDescendants {
fn has(el: E) -> bool { el.has_dirty_descendants() }
unsafe fn set(el: E) { el.set_dirty_descendants(); }
}
/// Implementation of DescendantsBit for the animation-only dirty descendants bit.
pub struct AnimationOnlyDirtyDescendants;
impl<E: TElement> DescendantsBit<E> for AnimationOnlyDirtyDescendants {
fn has(el: E) -> bool { el.has_animation_only_dirty_descendants() }
unsafe fn set(el: E) { el.set_animation_only_dirty_descendants(); }
}
/// TNode and TElement aren't Send because we want to be careful and explicit /// TNode and TElement aren't Send because we want to be careful and explicit
/// about our parallel traversal. However, there are certain situations /// about our parallel traversal. However, there are certain situations
/// (including but not limited to the traversal) where we need to send DOM /// (including but not limited to the traversal) where we need to send DOM

View file

@ -152,7 +152,7 @@ impl PerDocumentStyleDataImpl {
&mut self, &mut self,
guard: &SharedRwLockReadGuard, guard: &SharedRwLockReadGuard,
document_element: Option<E>, document_element: Option<E>,
) ) -> bool
where where
E: TElement, E: TElement,
{ {

View file

@ -1916,6 +1916,10 @@ extern "C" {
index: usize) index: usize)
-> ServoStyleContextStrong; -> ServoStyleContextStrong;
} }
extern "C" {
pub fn Servo_Element_IsDisplayNone(element: RawGeckoElementBorrowed)
-> bool;
}
extern "C" { extern "C" {
pub fn Servo_StyleSheet_FromUTF8Bytes(loader: *mut Loader, pub fn Servo_StyleSheet_FromUTF8Bytes(loader: *mut Loader,
gecko_stylesheet: gecko_stylesheet:

View file

@ -1047,6 +1047,8 @@ pub mod root {
} }
pub type pair_first_type<_T1> = _T1; pub type pair_first_type<_T1> = _T1;
pub type pair_second_type<_T2> = _T2; pub type pair_second_type<_T2> = _T2;
pub type pair__PCCP = u8;
pub type pair__PCCFP = u8;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy)] #[derive(Debug, Copy)]
pub struct input_iterator_tag { pub struct input_iterator_tag {
@ -2632,6 +2634,7 @@ pub mod root {
impl Clone for Element_MappedAttributeEntry { impl Clone for Element_MappedAttributeEntry {
fn clone(&self) -> Self { *self } fn clone(&self) -> Self { *self }
} }
pub const Element_kAllServoDescendantBits: u32 = 25296896;
pub const Element_kFireMutationEvent: bool = true; pub const Element_kFireMutationEvent: bool = true;
pub const Element_kDontFireMutationEvent: bool = false; pub const Element_kDontFireMutationEvent: bool = false;
pub const Element_kNotifyDocumentObservers: bool = true; pub const Element_kNotifyDocumentObservers: bool = true;
@ -4929,7 +4932,7 @@ pub mod root {
pub const ServoTraversalFlags_AggressivelyForgetful: pub const ServoTraversalFlags_AggressivelyForgetful:
root::mozilla::ServoTraversalFlags = root::mozilla::ServoTraversalFlags =
16; 16;
pub const ServoTraversalFlags_ClearDirtyDescendants: pub const ServoTraversalFlags_ClearDirtyBits:
root::mozilla::ServoTraversalFlags = root::mozilla::ServoTraversalFlags =
32; 32;
pub const ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants: pub const ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants:
@ -9508,15 +9511,6 @@ pub mod root {
"Alignment of field: " , stringify ! ( ServoMediaList "Alignment of field: " , stringify ! ( ServoMediaList
) , "::" , stringify ! ( mRawList ) )); ) , "::" , stringify ! ( mRawList ) ));
} }
pub mod dmd {
#[allow(unused_imports)]
use self::super::super::super::root;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSONWriteFunc {
_unused: [u8; 0],
}
/// A PostTraversalTask is a task to be performed immediately after a Servo /// A PostTraversalTask is a task to be performed immediately after a Servo
/// traversal. There are just a few tasks we need to perform, so we use this /// traversal. There are just a few tasks we need to perform, so we use this
/// class rather than Runnables, to avoid virtual calls and some allocations. /// class rather than Runnables, to avoid virtual calls and some allocations.
@ -10068,8 +10062,6 @@ pub mod root {
NS_ERROR_SAVE_LINK_AS_TIMEOUT = 2153578528, NS_ERROR_SAVE_LINK_AS_TIMEOUT = 2153578528,
NS_ERROR_PARSED_DATA_CACHED = 2153578529, NS_ERROR_PARSED_DATA_CACHED = 2153578529,
NS_REFRESHURI_HEADER_FOUND = 6094850, NS_REFRESHURI_HEADER_FOUND = 6094850,
NS_ERROR_IMAGE_SRC_CHANGED = 2153644036,
NS_ERROR_IMAGE_BLOCKED = 2153644037,
NS_ERROR_CONTENT_BLOCKED = 2153644038, NS_ERROR_CONTENT_BLOCKED = 2153644038,
NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = 2153644039, NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = 2153644039,
NS_PROPTABLE_PROP_NOT_THERE = 2153644042, NS_PROPTABLE_PROP_NOT_THERE = 2153644042,
@ -17064,6 +17056,8 @@ pub mod root {
pub mDocGroup: root::RefPtr<root::mozilla::dom::DocGroup>, pub mDocGroup: root::RefPtr<root::mozilla::dom::DocGroup>,
pub mTrackingScripts: [u64; 6usize], pub mTrackingScripts: [u64; 6usize],
pub mBufferedCSPViolations: root::nsTArray<root::nsCOMPtr<root::nsIRunnable>>, pub mBufferedCSPViolations: root::nsTArray<root::nsCOMPtr<root::nsIRunnable>>,
pub mServoRestyleRoot: root::nsCOMPtr<root::nsINode>,
pub mServoRestyleRootDirtyBits: u32,
} }
pub type nsIDocument_GlobalObject = root::mozilla::dom::GlobalObject; pub type nsIDocument_GlobalObject = root::mozilla::dom::GlobalObject;
pub type nsIDocument_Encoding = root::mozilla::Encoding; pub type nsIDocument_Encoding = root::mozilla::Encoding;
@ -17358,7 +17352,7 @@ pub mod root {
pub const nsIDocument_kSegmentSize: usize = 128; pub const nsIDocument_kSegmentSize: usize = 128;
#[test] #[test]
fn bindgen_test_layout_nsIDocument() { fn bindgen_test_layout_nsIDocument() {
assert_eq!(::std::mem::size_of::<nsIDocument>() , 888usize , concat ! assert_eq!(::std::mem::size_of::<nsIDocument>() , 904usize , concat !
( "Size of: " , stringify ! ( nsIDocument ) )); ( "Size of: " , stringify ! ( nsIDocument ) ));
assert_eq! (::std::mem::align_of::<nsIDocument>() , 8usize , concat ! assert_eq! (::std::mem::align_of::<nsIDocument>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsIDocument ) )); ( "Alignment of " , stringify ! ( nsIDocument ) ));
@ -25213,57 +25207,57 @@ pub mod root {
pub struct nsRange { pub struct nsRange {
_unused: [u8; 0], _unused: [u8; 0],
} }
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_LISTENERMANAGER; _bindgen_ty_72::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_PROPERTIES; _bindgen_ty_72::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; _bindgen_ty_72::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; _bindgen_ty_72::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; _bindgen_ty_72::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; _bindgen_ty_72::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = pub const NODE_IS_EDITABLE: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_EDITABLE; _bindgen_ty_72::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; _bindgen_ty_72::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; _bindgen_ty_72::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; _bindgen_ty_72::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; _bindgen_ty_72::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = pub const NODE_NEEDS_FRAME: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_NEEDS_FRAME; _bindgen_ty_72::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; _bindgen_ty_72::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_ACCESSKEY; _bindgen_ty_72::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_DIRECTION_RTL; _bindgen_ty_72::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_DIRECTION_LTR; _bindgen_ty_72::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; _bindgen_ty_72::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; _bindgen_ty_72::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; _bindgen_ty_72::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_TYPE_SPECIFIC_BITS_OFFSET; _bindgen_ty_72::NODE_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_83 { pub enum _bindgen_ty_72 {
NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_LISTENERMANAGER = 4,
NODE_HAS_PROPERTIES = 8, NODE_HAS_PROPERTIES = 8,
NODE_IS_ANONYMOUS_ROOT = 16, NODE_IS_ANONYMOUS_ROOT = 16,
@ -32841,46 +32835,46 @@ pub mod root {
assert_eq! (::std::mem::align_of::<nsISMILAttr>() , 8usize , concat ! assert_eq! (::std::mem::align_of::<nsISMILAttr>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsISMILAttr ) )); ( "Alignment of " , stringify ! ( nsISMILAttr ) ));
} }
pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO:
root::_bindgen_ty_85 = root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_74
= =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT:
root::_bindgen_ty_85 = root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; _bindgen_ty_74::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR;
pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; _bindgen_ty_74::ELEMENT_PENDING_RESTYLE_FLAGS;
pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; _bindgen_ty_74::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS;
pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; _bindgen_ty_74::ELEMENT_ALL_RESTYLE_FLAGS;
pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; _bindgen_ty_74::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_85 { pub enum _bindgen_ty_74 {
ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608,
ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216,
ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432,
@ -33756,7 +33750,7 @@ pub mod root {
root::nsTArray<root::mozilla::gfx::FontVariation> ) )); root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_228788_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_203496_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34112,7 +34106,7 @@ pub mod root {
root::mozilla::binding_danger::TErrorResult ) )); root::mozilla::binding_danger::TErrorResult ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_230622_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_205330_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34273,7 +34267,7 @@ pub mod root {
root::JS::DeletePolicy ) )); root::JS::DeletePolicy ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_236242__bindgen_ty_id_236249_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_210954__bindgen_ty_id_210961_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize , assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize ,
concat ! ( concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34521,7 +34515,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) )); root::RefPtr<root::mozilla::StyleSheet> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238741_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213453_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34589,7 +34583,7 @@ pub mod root {
root::nsCOMPtr<root::nsIObserver> ) )); root::nsCOMPtr<root::nsIObserver> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239043_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213755_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34701,7 +34695,7 @@ pub mod root {
root::RefPtr<root::mozilla::URLExtraData> ) )); root::RefPtr<root::mozilla::URLExtraData> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_239588_close0_instantiation() { fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_214304_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::mozilla::Encoding>>() assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::mozilla::Encoding>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35048,6 +35042,17 @@ pub mod root {
root::nsCOMPtr<root::nsIRunnable> ) )); root::nsCOMPtr<root::nsIRunnable> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsCOMPtr_open0_nsINode_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsINode>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsCOMPtr<root::nsINode> ) ));
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsINode>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsCOMPtr<root::nsINode> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_CSSRuleListImpl_close0_instantiation() { fn __bindgen_test_layout_RefPtr_open0_CSSRuleListImpl_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::CSSRuleListImpl>>() assert_eq!(::std::mem::size_of::<root::RefPtr<root::CSSRuleListImpl>>()
, 8usize , concat ! ( , 8usize , concat ! (
@ -35105,7 +35110,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) )); root::RefPtr<root::mozilla::StyleSheet> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240009_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214728_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35195,7 +35200,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240409_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_215128_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35296,7 +35301,7 @@ pub mod root {
root::nsTArray<::nsstring::nsStringRepr> ) )); root::nsTArray<::nsstring::nsStringRepr> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241380_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216101_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35385,7 +35390,7 @@ pub mod root {
root::RefPtr<root::nsCSSFontFaceRule> ) )); root::RefPtr<root::nsCSSFontFaceRule> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241685_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216406_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35396,7 +35401,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) )); root::nsTArray<*mut root::nsIContent> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241690_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216411_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35453,7 +35458,7 @@ pub mod root {
root::RefPtr<root::mozilla::CSSStyleSheet> ) )); root::RefPtr<root::mozilla::CSSStyleSheet> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242181_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216902_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36101,7 +36106,7 @@ pub mod root {
root::nsCOMPtr<root::nsIWeakReference> ) )); root::nsCOMPtr<root::nsIWeakReference> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_245037_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_219758_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36180,7 +36185,7 @@ pub mod root {
root::mozilla::DefaultDelete ) )); root::mozilla::DefaultDelete ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251322_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226043_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36213,7 +36218,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::CallbackObject> ) )); root::RefPtr<root::mozilla::dom::CallbackObject> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_252491_close0_instantiation() { fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_227212_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>() assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36224,7 +36229,7 @@ pub mod root {
root::JS::Heap<*mut root::JSObject> ) )); root::JS::Heap<*mut root::JSObject> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_252495_close0_instantiation() { fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_227216_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>() assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36246,7 +36251,7 @@ pub mod root {
root::nsCOMPtr<root::nsIGlobalObject> ) )); root::nsCOMPtr<root::nsIGlobalObject> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_252502_close0_instantiation() { fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_227223_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize , assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize ,
concat ! ( concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36325,7 +36330,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253607_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_228396_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36520,7 +36525,7 @@ pub mod root {
root::nsTArray<f64> ) )); root::nsTArray<f64> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_255055_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229844_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36625,7 +36630,7 @@ pub mod root {
root::nsRefPtrHashKey<root::nsIAtom> ) )); root::nsRefPtrHashKey<root::nsIAtom> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_257463_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_232252_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37326,7 +37331,7 @@ pub mod root {
root::RefPtr<root::nsStyleImageRequest> ) )); root::RefPtr<root::nsStyleImageRequest> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_260021_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_234810_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37563,7 +37568,7 @@ pub mod root {
root::nsCOMPtr<root::nsIURI> ) )); root::nsCOMPtr<root::nsIURI> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267833_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242622_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37574,7 +37579,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) )); root::nsTArray<*mut root::nsIContent> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267838_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242627_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37662,7 +37667,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::ShadowRoot> ) )); root::RefPtr<root::mozilla::dom::ShadowRoot> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267951_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242740_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37949,7 +37954,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_269537_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244326_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37971,7 +37976,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::Element> ) )); root::RefPtr<root::mozilla::dom::Element> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_269699_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244488_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37982,7 +37987,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) )); root::nsTArray<*mut root::nsIContent> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_269704_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244493_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -38114,7 +38119,7 @@ pub mod root {
root::nsTArray<root::mozilla::gfx::FontVariation> ) )); root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_272231_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246732_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -38125,7 +38130,7 @@ pub mod root {
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_272239_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246740_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (

View file

@ -1047,6 +1047,8 @@ pub mod root {
} }
pub type pair_first_type<_T1> = _T1; pub type pair_first_type<_T1> = _T1;
pub type pair_second_type<_T2> = _T2; pub type pair_second_type<_T2> = _T2;
pub type pair__PCCP = u8;
pub type pair__PCCFP = u8;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy)] #[derive(Debug, Copy)]
pub struct input_iterator_tag { pub struct input_iterator_tag {
@ -2554,6 +2556,7 @@ pub mod root {
impl Clone for Element_MappedAttributeEntry { impl Clone for Element_MappedAttributeEntry {
fn clone(&self) -> Self { *self } fn clone(&self) -> Self { *self }
} }
pub const Element_kAllServoDescendantBits: u32 = 25296896;
pub const Element_kFireMutationEvent: bool = true; pub const Element_kFireMutationEvent: bool = true;
pub const Element_kDontFireMutationEvent: bool = false; pub const Element_kDontFireMutationEvent: bool = false;
pub const Element_kNotifyDocumentObservers: bool = true; pub const Element_kNotifyDocumentObservers: bool = true;
@ -4817,7 +4820,7 @@ pub mod root {
pub const ServoTraversalFlags_AggressivelyForgetful: pub const ServoTraversalFlags_AggressivelyForgetful:
root::mozilla::ServoTraversalFlags = root::mozilla::ServoTraversalFlags =
16; 16;
pub const ServoTraversalFlags_ClearDirtyDescendants: pub const ServoTraversalFlags_ClearDirtyBits:
root::mozilla::ServoTraversalFlags = root::mozilla::ServoTraversalFlags =
32; 32;
pub const ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants: pub const ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants:
@ -9354,15 +9357,6 @@ pub mod root {
"Alignment of field: " , stringify ! ( ServoMediaList "Alignment of field: " , stringify ! ( ServoMediaList
) , "::" , stringify ! ( mRawList ) )); ) , "::" , stringify ! ( mRawList ) ));
} }
pub mod dmd {
#[allow(unused_imports)]
use self::super::super::super::root;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSONWriteFunc {
_unused: [u8; 0],
}
/// A PostTraversalTask is a task to be performed immediately after a Servo /// A PostTraversalTask is a task to be performed immediately after a Servo
/// traversal. There are just a few tasks we need to perform, so we use this /// traversal. There are just a few tasks we need to perform, so we use this
/// class rather than Runnables, to avoid virtual calls and some allocations. /// class rather than Runnables, to avoid virtual calls and some allocations.
@ -9914,8 +9908,6 @@ pub mod root {
NS_ERROR_SAVE_LINK_AS_TIMEOUT = 2153578528, NS_ERROR_SAVE_LINK_AS_TIMEOUT = 2153578528,
NS_ERROR_PARSED_DATA_CACHED = 2153578529, NS_ERROR_PARSED_DATA_CACHED = 2153578529,
NS_REFRESHURI_HEADER_FOUND = 6094850, NS_REFRESHURI_HEADER_FOUND = 6094850,
NS_ERROR_IMAGE_SRC_CHANGED = 2153644036,
NS_ERROR_IMAGE_BLOCKED = 2153644037,
NS_ERROR_CONTENT_BLOCKED = 2153644038, NS_ERROR_CONTENT_BLOCKED = 2153644038,
NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = 2153644039, NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = 2153644039,
NS_PROPTABLE_PROP_NOT_THERE = 2153644042, NS_PROPTABLE_PROP_NOT_THERE = 2153644042,
@ -16830,6 +16822,8 @@ pub mod root {
pub mDocGroup: root::RefPtr<root::mozilla::dom::DocGroup>, pub mDocGroup: root::RefPtr<root::mozilla::dom::DocGroup>,
pub mTrackingScripts: [u64; 5usize], pub mTrackingScripts: [u64; 5usize],
pub mBufferedCSPViolations: root::nsTArray<root::nsCOMPtr>, pub mBufferedCSPViolations: root::nsTArray<root::nsCOMPtr>,
pub mServoRestyleRoot: root::nsCOMPtr,
pub mServoRestyleRootDirtyBits: u32,
} }
pub type nsIDocument_GlobalObject = root::mozilla::dom::GlobalObject; pub type nsIDocument_GlobalObject = root::mozilla::dom::GlobalObject;
pub type nsIDocument_Encoding = root::mozilla::Encoding; pub type nsIDocument_Encoding = root::mozilla::Encoding;
@ -17124,7 +17118,7 @@ pub mod root {
pub const nsIDocument_kSegmentSize: usize = 128; pub const nsIDocument_kSegmentSize: usize = 128;
#[test] #[test]
fn bindgen_test_layout_nsIDocument() { fn bindgen_test_layout_nsIDocument() {
assert_eq!(::std::mem::size_of::<nsIDocument>() , 864usize , concat ! assert_eq!(::std::mem::size_of::<nsIDocument>() , 880usize , concat !
( "Size of: " , stringify ! ( nsIDocument ) )); ( "Size of: " , stringify ! ( nsIDocument ) ));
assert_eq! (::std::mem::align_of::<nsIDocument>() , 8usize , concat ! assert_eq! (::std::mem::align_of::<nsIDocument>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsIDocument ) )); ( "Alignment of " , stringify ! ( nsIDocument ) ));
@ -24817,57 +24811,57 @@ pub mod root {
pub struct nsRange { pub struct nsRange {
_unused: [u8; 0], _unused: [u8; 0],
} }
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_LISTENERMANAGER; _bindgen_ty_72::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_PROPERTIES; _bindgen_ty_72::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; _bindgen_ty_72::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; _bindgen_ty_72::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; _bindgen_ty_72::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; _bindgen_ty_72::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = pub const NODE_IS_EDITABLE: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_EDITABLE; _bindgen_ty_72::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; _bindgen_ty_72::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; _bindgen_ty_72::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; _bindgen_ty_72::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; _bindgen_ty_72::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = pub const NODE_NEEDS_FRAME: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_NEEDS_FRAME; _bindgen_ty_72::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; _bindgen_ty_72::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_ACCESSKEY; _bindgen_ty_72::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_DIRECTION_RTL; _bindgen_ty_72::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_HAS_DIRECTION_LTR; _bindgen_ty_72::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; _bindgen_ty_72::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; _bindgen_ty_72::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; _bindgen_ty_72::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_72 =
_bindgen_ty_83::NODE_TYPE_SPECIFIC_BITS_OFFSET; _bindgen_ty_72::NODE_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_83 { pub enum _bindgen_ty_72 {
NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_LISTENERMANAGER = 4,
NODE_HAS_PROPERTIES = 8, NODE_HAS_PROPERTIES = 8,
NODE_IS_ANONYMOUS_ROOT = 16, NODE_IS_ANONYMOUS_ROOT = 16,
@ -32349,46 +32343,46 @@ pub mod root {
assert_eq! (::std::mem::align_of::<nsISMILAttr>() , 8usize , concat ! assert_eq! (::std::mem::align_of::<nsISMILAttr>() , 8usize , concat !
( "Alignment of " , stringify ! ( nsISMILAttr ) )); ( "Alignment of " , stringify ! ( nsISMILAttr ) ));
} }
pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO:
root::_bindgen_ty_85 = root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1;
pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2;
pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_74
= =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3;
pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT:
root::_bindgen_ty_85 = root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4;
pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; _bindgen_ty_74::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR;
pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; _bindgen_ty_74::ELEMENT_PENDING_RESTYLE_FLAGS;
pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; _bindgen_ty_74::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS;
pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; _bindgen_ty_74::ELEMENT_ALL_RESTYLE_FLAGS;
pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_74 =
_bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; _bindgen_ty_74::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_85 { pub enum _bindgen_ty_74 {
ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608,
ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216,
ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432,
@ -33264,7 +33258,7 @@ pub mod root {
root::nsTArray<root::mozilla::gfx::FontVariation> ) )); root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226420_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_201132_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -33620,7 +33614,7 @@ pub mod root {
root::mozilla::binding_danger::TErrorResult ) )); root::mozilla::binding_danger::TErrorResult ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_228220_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_202932_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -33781,7 +33775,7 @@ pub mod root {
root::JS::DeletePolicy ) )); root::JS::DeletePolicy ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_233812__bindgen_ty_id_233819_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_208528__bindgen_ty_id_208535_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize , assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize ,
concat ! ( concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34029,7 +34023,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) )); root::RefPtr<root::mozilla::StyleSheet> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236309_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211025_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34097,7 +34091,7 @@ pub mod root {
root::nsCOMPtr ) )); root::nsCOMPtr ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236611_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211327_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34209,7 +34203,7 @@ pub mod root {
root::RefPtr<root::mozilla::URLExtraData> ) )); root::RefPtr<root::mozilla::URLExtraData> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_237156_close0_instantiation() { fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_211876_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::mozilla::Encoding>>() assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::mozilla::Encoding>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34554,6 +34548,17 @@ pub mod root {
root::nsCOMPtr ) )); root::nsCOMPtr ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsCOMPtr_open0_nsINode_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat !
(
"Size of template specialization: " , stringify ! (
root::nsCOMPtr ) ));
assert_eq!(::std::mem::align_of::<root::nsCOMPtr>() , 8usize , concat
! (
"Alignment of template specialization: " , stringify ! (
root::nsCOMPtr ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_CSSRuleListImpl_close0_instantiation() { fn __bindgen_test_layout_RefPtr_open0_CSSRuleListImpl_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::CSSRuleListImpl>>() assert_eq!(::std::mem::size_of::<root::RefPtr<root::CSSRuleListImpl>>()
, 8usize , concat ! ( , 8usize , concat ! (
@ -34611,7 +34616,7 @@ pub mod root {
root::RefPtr<root::mozilla::StyleSheet> ) )); root::RefPtr<root::mozilla::StyleSheet> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237575_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212298_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34701,7 +34706,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237973_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212696_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34802,7 +34807,7 @@ pub mod root {
root::nsTArray<::nsstring::nsStringRepr> ) )); root::nsTArray<::nsstring::nsStringRepr> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238934_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213659_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34891,7 +34896,7 @@ pub mod root {
root::RefPtr<root::nsCSSFontFaceRule> ) )); root::RefPtr<root::nsCSSFontFaceRule> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239237_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213962_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34902,7 +34907,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) )); root::nsTArray<*mut root::nsIContent> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239242_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213967_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -34959,7 +34964,7 @@ pub mod root {
root::RefPtr<root::mozilla::CSSStyleSheet> ) )); root::RefPtr<root::mozilla::CSSStyleSheet> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239717_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214442_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35594,7 +35599,7 @@ pub mod root {
root::nsCOMPtr ) )); root::nsCOMPtr ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242543_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_217268_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35673,7 +35678,7 @@ pub mod root {
root::mozilla::DefaultDelete ) )); root::mozilla::DefaultDelete ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_248811_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223536_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35706,7 +35711,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::CallbackObject> ) )); root::RefPtr<root::mozilla::dom::CallbackObject> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_249980_close0_instantiation() { fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224705_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>() assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35717,7 +35722,7 @@ pub mod root {
root::JS::Heap<*mut root::JSObject> ) )); root::JS::Heap<*mut root::JSObject> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_249984_close0_instantiation() { fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224709_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>() assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35739,7 +35744,7 @@ pub mod root {
root::nsCOMPtr ) )); root::nsCOMPtr ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_249991_close0_instantiation() { fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_224716_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize , assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize ,
concat ! ( concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -35818,7 +35823,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251096_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225889_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36013,7 +36018,7 @@ pub mod root {
root::nsTArray<f64> ) )); root::nsTArray<f64> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_252544_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227337_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36118,7 +36123,7 @@ pub mod root {
root::nsRefPtrHashKey<root::nsIAtom> ) )); root::nsRefPtrHashKey<root::nsIAtom> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_254917_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229710_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -36819,7 +36824,7 @@ pub mod root {
root::RefPtr<root::nsStyleImageRequest> ) )); root::RefPtr<root::nsStyleImageRequest> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_257399_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_232192_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37056,7 +37061,7 @@ pub mod root {
root::nsCOMPtr ) )); root::nsCOMPtr ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_265211_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240004_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37067,7 +37072,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) )); root::nsTArray<*mut root::nsIContent> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_265216_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240009_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37155,7 +37160,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::ShadowRoot> ) )); root::RefPtr<root::mozilla::dom::ShadowRoot> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_265329_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240122_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37442,7 +37447,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_266909_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241702_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37464,7 +37469,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::Element> ) )); root::RefPtr<root::mozilla::dom::Element> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267067_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241860_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37475,7 +37480,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) )); root::nsTArray<*mut root::nsIContent> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267072_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241865_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37607,7 +37612,7 @@ pub mod root {
root::nsTArray<root::mozilla::gfx::FontVariation> ) )); root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_269589_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244094_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (
@ -37618,7 +37623,7 @@ pub mod root {
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
} }
#[test] #[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_269595_close0_instantiation() { fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244100_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>() assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! ( , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( "Size of template specialization: " , stringify ! (

View file

@ -61,6 +61,7 @@ use gecko_bindings::structs::ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO;
use gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT; use gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT;
use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel; use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel;
use gecko_bindings::structs::NODE_DESCENDANTS_NEED_FRAMES; use gecko_bindings::structs::NODE_DESCENDANTS_NEED_FRAMES;
use gecko_bindings::structs::NODE_NEEDS_FRAME;
use gecko_bindings::structs::nsChangeHint; use gecko_bindings::structs::nsChangeHint;
use gecko_bindings::structs::nsIDocument_DocumentTheme as DocumentTheme; use gecko_bindings::structs::nsIDocument_DocumentTheme as DocumentTheme;
use gecko_bindings::structs::nsRestyleHint; use gecko_bindings::structs::nsRestyleHint;
@ -493,6 +494,33 @@ impl<'le> GeckoElement<'le> {
unsafe { Gecko_UnsetNodeFlags(self.as_node().0, flags) } unsafe { Gecko_UnsetNodeFlags(self.as_node().0, flags) }
} }
/// Returns true if this element has descendants for lazy frame construction.
pub fn descendants_need_frames(&self) -> bool {
self.flags() & (NODE_DESCENDANTS_NEED_FRAMES as u32) != 0
}
/// Returns true if this element needs lazy frame construction.
pub fn needs_frame(&self) -> bool {
self.flags() & (NODE_NEEDS_FRAME as u32) != 0
}
/// Returns true if a traversal starting from this element requires a post-traversal.
pub fn needs_post_traversal(&self) -> bool {
debug!("needs_post_traversal: dd={}, aodd={}, lfcd={}, lfc={}, restyle={:?}",
self.has_dirty_descendants(),
self.has_animation_only_dirty_descendants(),
self.descendants_need_frames(),
self.needs_frame(),
self.borrow_data().unwrap().restyle);
let has_flag =
self.flags() & (ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
NODE_DESCENDANTS_NEED_FRAMES as u32 |
NODE_NEEDS_FRAME as u32) != 0;
has_flag || self.borrow_data().unwrap().restyle.contains_restyle_data()
}
/// Returns true if this element has a shadow root. /// Returns true if this element has a shadow root.
fn has_shadow_root(&self) -> bool { fn has_shadow_root(&self) -> bool {
self.get_extended_slots().map_or(false, |slots| !slots.mShadowRoot.mRawPtr.is_null()) self.get_extended_slots().map_or(false, |slots| !slots.mShadowRoot.mRawPtr.is_null())
@ -1070,6 +1098,13 @@ impl<'le> TElement for GeckoElement<'le> {
} }
#[inline] #[inline]
unsafe fn clear_dirty_bits(&self) {
self.unset_flags(ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
NODE_DESCENDANTS_NEED_FRAMES as u32 |
NODE_NEEDS_FRAME as u32)
}
fn is_visited_link(&self) -> bool { fn is_visited_link(&self) -> bool {
use element_state::IN_VISITED_STATE; use element_state::IN_VISITED_STATE;
self.get_state().intersects(IN_VISITED_STATE) self.get_state().intersects(IN_VISITED_STATE)

View file

@ -117,13 +117,17 @@ impl StylesheetInvalidationSet {
/// Clears the invalidation set, invalidating elements as needed if /// Clears the invalidation set, invalidating elements as needed if
/// `document_element` is provided. /// `document_element` is provided.
pub fn flush<E>(&mut self, document_element: Option<E>) ///
/// Returns true if any invalidations ocurred.
pub fn flush<E>(&mut self, document_element: Option<E>) -> bool
where E: TElement, where E: TElement,
{ {
if let Some(e) = document_element { let have_invalidations = match document_element {
self.process_invalidations(e); Some(e) => self.process_invalidations(e),
} None => false,
};
self.clear(); self.clear();
have_invalidations
} }
/// Clears the invalidation set without processing. /// Clears the invalidation set without processing.

View file

@ -182,25 +182,28 @@ where
/// Flush the current set, unmarking it as dirty, and returns an iterator /// Flush the current set, unmarking it as dirty, and returns an iterator
/// over the new stylesheet list. /// over the new stylesheet list.
///
/// Returns true if any elements were invalidated.
pub fn flush<E>( pub fn flush<E>(
&mut self, &mut self,
document_element: Option<E>, document_element: Option<E>,
) -> (StylesheetIterator<S>, OriginSet) ) -> (StylesheetIterator<S>, OriginSet, bool)
where where
E: TElement, E: TElement,
{ {
debug!("StylesheetSet::flush"); debug!("StylesheetSet::flush");
let mut origins = OriginSet::empty(); let mut origins = OriginSet::empty();
let mut have_invalidations = false;
for (data, origin) in self.invalidation_data.iter_mut_origins() { for (data, origin) in self.invalidation_data.iter_mut_origins() {
if data.dirty { if data.dirty {
data.invalidations.flush(document_element); have_invalidations |= data.invalidations.flush(document_element);
data.dirty = false; data.dirty = false;
origins |= origin; origins |= origin;
} }
} }
(self.iter(), origins) (self.iter(), origins, have_invalidations)
} }
/// Flush stylesheets, but without running any of the invalidation passes. /// Flush stylesheets, but without running any of the invalidation passes.

View file

@ -481,19 +481,20 @@ impl Stylist {
ua_sheets: Option<&UserAgentStylesheets>, ua_sheets: Option<&UserAgentStylesheets>,
extra_data: &mut PerOrigin<ExtraStyleData>, extra_data: &mut PerOrigin<ExtraStyleData>,
document_element: Option<E>, document_element: Option<E>,
) ) -> bool
where where
E: TElement, E: TElement,
{ {
if !self.stylesheets.has_changed() { if !self.stylesheets.has_changed() {
return; return false;
} }
let author_style_disabled = self.stylesheets.author_style_disabled(); let author_style_disabled = self.stylesheets.author_style_disabled();
let (doc_stylesheets, origins_to_rebuild) = self.stylesheets.flush(document_element); let (doc_stylesheets, origins_to_rebuild, have_invalidations) =
self.stylesheets.flush(document_element);
if origins_to_rebuild.is_empty() { if origins_to_rebuild.is_empty() {
return; return have_invalidations;
} }
self.num_rebuilds += 1; self.num_rebuilds += 1;
@ -538,6 +539,8 @@ impl Stylist {
extra_data, extra_data,
origins_to_rebuild, origins_to_rebuild,
); );
have_invalidations
} }
/// Insert a given stylesheet before another stylesheet in the document. /// Insert a given stylesheet before another stylesheet in the document.

View file

@ -185,10 +185,16 @@ pub trait DomTraversal<E: TElement> : Sync {
let should_traverse = Self::element_needs_traversal( let should_traverse = Self::element_needs_traversal(
root, root,
flags, flags,
data.map(|d| &*d), data.as_mut().map(|d| &**d),
parent_data.as_ref().map(|d| &**d) parent_data.as_ref().map(|d| &**d)
); );
// If we're not going to traverse at all, we may need to clear some state
// off the root (which would normally be done at the end of recalc_style_at).
if !should_traverse && data.is_some() {
clear_state_after_traversing(root, data.unwrap(), flags);
}
PreTraverseToken(should_traverse) PreTraverseToken(should_traverse)
} }
@ -592,6 +598,31 @@ where
); );
} }
// FIXME(bholley): Make these assertions pass for servo.
if cfg!(feature = "gecko") && cfg!(debug_assertions) && data.styles.is_display_none() {
debug_assert!(!element.has_dirty_descendants());
debug_assert!(!element.has_animation_only_dirty_descendants());
}
debug_assert!(flags.for_animation_only() ||
!flags.contains(ClearDirtyBits) ||
!element.has_animation_only_dirty_descendants(),
"Should have cleared animation bits already");
clear_state_after_traversing(element, data, flags);
context.thread_local.end_element(element);
}
fn clear_state_after_traversing<E>(
element: E,
data: &mut ElementData,
flags: TraversalFlags
)
where
E: TElement,
{
use traversal_flags::*;
// If we are in a forgetful traversal, drop the existing restyle // If we are in a forgetful traversal, drop the existing restyle
// data here, since we won't need to perform a post-traversal to pick up // data here, since we won't need to perform a post-traversal to pick up
// any change hints. // any change hints.
@ -599,32 +630,16 @@ where
data.clear_restyle_flags_and_damage(); data.clear_restyle_flags_and_damage();
} }
// Optionally clear the descendants bits. // Clear dirty bits as appropriate.
if data.styles.is_display_none() { if flags.for_animation_only() {
// When this element is the root of a display:none subtree, we want to clear if flags.intersects(ClearDirtyBits | ClearAnimationOnlyDirtyDescendants) {
// the bits even if the style didn't change (since, if the style did change,
// we'd have already cleared it above).
//
// This keeps the tree in a valid state without requiring the DOM to check
// display:none on the parent when inserting new children (which can be
// moderately expensive). Instead, DOM implementations can unconditionally
// set the dirty descendants bit on any styled parent, and let the traversal
// sort it out.
//
// Note that the NODE_DESCENDANTS_NEED_FRAMES bit should generally only be set
// when appending content beneath an element with a frame (i.e. not
// display:none), so clearing it here isn't strictly necessary, but good
// belt-and-suspenders.
unsafe { element.clear_descendants_bits(); }
} else if flags.for_animation_only() {
if flags.contains(ClearAnimationOnlyDirtyDescendants) {
unsafe { element.unset_animation_only_dirty_descendants(); } unsafe { element.unset_animation_only_dirty_descendants(); }
} }
} else if flags.contains(ClearDirtyDescendants) { } else if flags.contains(ClearDirtyBits) {
unsafe { element.unset_dirty_descendants(); } // The animation traversal happens first, so we don't need to guard against
// clearing the animation bit on the regular traversal.
unsafe { element.clear_dirty_bits(); }
} }
context.thread_local.end_element(element);
} }
fn compute_style<E>( fn compute_style<E>(
@ -855,6 +870,11 @@ where
} }
} }
} }
p.clear_descendants_bits(); if p == root {
// Make sure not to clear NODE_NEEDS_FRAME on the root.
p.clear_descendants_bits();
} else {
p.clear_dirty_bits();
}
} }
} }

View file

@ -27,8 +27,8 @@ bitflags! {
/// Actively seeks out and clears change hints that may have been posted into /// Actively seeks out and clears change hints that may have been posted into
/// the tree. Nonsensical without also passing Forgetful. /// the tree. Nonsensical without also passing Forgetful.
const AggressivelyForgetful = 1 << 4, const AggressivelyForgetful = 1 << 4,
/// Clears the dirty descendants bit in the subtree. /// Clears all the dirty bits on the elements traversed.
const ClearDirtyDescendants = 1 << 5, const ClearDirtyBits = 1 << 5,
/// Clears the animation-only dirty descendants bit in the subtree. /// Clears the animation-only dirty descendants bit in the subtree.
const ClearAnimationOnlyDirtyDescendants = 1 << 6, const ClearAnimationOnlyDirtyDescendants = 1 << 6,
/// Allows the traversal to run in parallel if there are sufficient cores on /// Allows the traversal to run in parallel if there are sufficient cores on
@ -67,7 +67,7 @@ pub fn assert_traversal_flags_match() {
ServoTraversalFlags_UnstyledOnly => UnstyledOnly, ServoTraversalFlags_UnstyledOnly => UnstyledOnly,
ServoTraversalFlags_Forgetful => Forgetful, ServoTraversalFlags_Forgetful => Forgetful,
ServoTraversalFlags_AggressivelyForgetful => AggressivelyForgetful, ServoTraversalFlags_AggressivelyForgetful => AggressivelyForgetful,
ServoTraversalFlags_ClearDirtyDescendants => ClearDirtyDescendants, ServoTraversalFlags_ClearDirtyBits => ClearDirtyBits,
ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants => ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants =>
ClearAnimationOnlyDirtyDescendants, ClearAnimationOnlyDirtyDescendants,
ServoTraversalFlags_ParallelTraversal => ParallelTraversal, ServoTraversalFlags_ParallelTraversal => ParallelTraversal,

View file

@ -25,6 +25,7 @@ use style::gecko::restyle_damage::GeckoRestyleDamage;
use style::gecko::selector_parser::PseudoElement; use style::gecko::selector_parser::PseudoElement;
use style::gecko::traversal::RecalcStyleOnly; use style::gecko::traversal::RecalcStyleOnly;
use style::gecko::wrapper::GeckoElement; use style::gecko::wrapper::GeckoElement;
use style::gecko_bindings::bindings;
use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoElementBorrowedOrNull}; use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoElementBorrowedOrNull};
use style::gecko_bindings::bindings::{RawGeckoKeyframeListBorrowed, RawGeckoKeyframeListBorrowedMut}; use style::gecko_bindings::bindings::{RawGeckoKeyframeListBorrowed, RawGeckoKeyframeListBorrowedMut};
use style::gecko_bindings::bindings::{RawServoDeclarationBlockBorrowed, RawServoDeclarationBlockStrong}; use style::gecko_bindings::bindings::{RawServoDeclarationBlockBorrowed, RawServoDeclarationBlockStrong};
@ -291,14 +292,14 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
traversal_flags, traversal_flags,
unsafe { &*snapshots }); unsafe { &*snapshots });
debug!("Servo_TraverseSubtree complete (dd={}, aodd={}, restyle={:?})", debug!("Servo_TraverseSubtree complete (dd={}, aodd={}, lfcd={}, lfc={}, restyle={:?})",
element.has_dirty_descendants(), element.has_dirty_descendants(),
element.has_animation_only_dirty_descendants(), element.has_animation_only_dirty_descendants(),
element.descendants_need_frames(),
element.needs_frame(),
element.borrow_data().unwrap().restyle); element.borrow_data().unwrap().restyle);
element.has_dirty_descendants() || element.needs_post_traversal()
element.has_animation_only_dirty_descendants() ||
element.borrow_data().unwrap().restyle.contains_restyle_data()
} }
/// Checks whether the rule tree has crossed its threshold for unused nodes, and /// Checks whether the rule tree has crossed its threshold for unused nodes, and
@ -826,6 +827,14 @@ pub extern "C" fn Servo_Element_GetPseudoComputedValues(element: RawGeckoElement
.clone().into() .clone().into()
} }
#[no_mangle]
pub extern "C" fn Servo_Element_IsDisplayNone(element: RawGeckoElementBorrowed) -> bool
{
let element = GeckoElement(element);
let data = element.borrow_data().expect("Invoking Servo_Element_IsDisplayNone on unstyled element");
data.styles.is_display_none()
}
#[no_mangle] #[no_mangle]
pub extern "C" fn Servo_StyleSheet_Empty(mode: SheetParsingMode) -> RawServoStyleSheetContentsStrong { pub extern "C" fn Servo_StyleSheet_Empty(mode: SheetParsingMode) -> RawServoStyleSheetContentsStrong {
let global_style_data = &*GLOBAL_STYLE_DATA; let global_style_data = &*GLOBAL_STYLE_DATA;
@ -991,7 +1000,12 @@ pub extern "C" fn Servo_StyleSet_FlushStyleSheets(
let guard = global_style_data.shared_lock.read(); let guard = global_style_data.shared_lock.read();
let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
let doc_element = doc_element.map(GeckoElement); let doc_element = doc_element.map(GeckoElement);
data.flush_stylesheets(&guard, doc_element); let have_invalidations = data.flush_stylesheets(&guard, doc_element);
if have_invalidations && doc_element.is_some() {
// The invalidation machinery propagates the bits up, but we still
// need to tell the gecko restyle root machinery about it.
unsafe { bindings::Gecko_NoteDirtyElement(doc_element.unwrap().0); }
}
} }
#[no_mangle] #[no_mangle]