From 191c39f28cf9ad0244fad6c3214c0df9f4f13acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 21 Oct 2017 13:00:54 +0200 Subject: [PATCH 01/15] style: Make invalidations with offset zero "universal" invalidations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We'll use this for querySelector / querySelectorAll. Signed-off-by: Emilio Cobos Álvarez --- components/selectors/matching.rs | 3 +-- components/style/invalidation/element/invalidator.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/selectors/matching.rs b/components/selectors/matching.rs index f648594db04..7b505779315 100644 --- a/components/selectors/matching.rs +++ b/components/selectors/matching.rs @@ -338,8 +338,7 @@ pub fn matches_compound_selector( where E: Element { - debug_assert_ne!(from_offset, 0); - if cfg!(debug_assertions) { + if cfg!(debug_assertions) && from_offset != 0 { selector.combinator_at_parse_order(from_offset - 1); // This asserts. } diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index 99e42e6d860..359617466d9 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -112,6 +112,10 @@ impl Invalidation { /// Whether this invalidation is effective for the next sibling or /// descendant after us. fn effective_for_next(&self) -> bool { + if self.offset == 0 { + return true; + } + // TODO(emilio): For pseudo-elements this should be mostly false, except // for the weird pseudos in . // @@ -124,6 +128,10 @@ impl Invalidation { } fn kind(&self) -> InvalidationKind { + if self.offset == 0 { + return InvalidationKind::Descendant; + } + if self.selector.combinator_at_parse_order(self.offset - 1).is_ancestor() { InvalidationKind::Descendant } else { From 5ac0f5121eca9bd9fa4a56827be6acd262bda33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 21 Oct 2017 13:12:17 +0200 Subject: [PATCH 02/15] style: Add a way to add self-invalidations to the initial collection. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emilio Cobos Álvarez --- components/style/invalidation/element/collector.rs | 1 + components/style/invalidation/element/invalidator.rs | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/components/style/invalidation/element/collector.rs b/components/style/invalidation/element/collector.rs index ff74ad9f3a2..8696afe5793 100644 --- a/components/style/invalidation/element/collector.rs +++ b/components/style/invalidation/element/collector.rs @@ -82,6 +82,7 @@ where element: E, nth_index_cache: Option<&mut NthIndexCache>, quirks_mode: QuirksMode, + _self_invalidations: &mut InvalidationVector, descendant_invalidations: &mut InvalidationVector, sibling_invalidations: &mut InvalidationVector, ) -> bool { diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index 359617466d9..0c2a36142f2 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -34,6 +34,7 @@ where element: E, nth_index_cache: Option<&mut NthIndexCache>, quirks_mode: QuirksMode, + self_invalidations: &mut InvalidationVector, descendant_invalidations: &mut InvalidationVector, sibling_invalidations: &mut InvalidationVector, ) -> bool; @@ -226,21 +227,30 @@ where pub fn invalidate(mut self) -> InvalidationResult { debug!("StyleTreeInvalidator::invalidate({:?})", self.element); + let mut self_invalidations = InvalidationVector::new(); let mut descendant_invalidations = InvalidationVector::new(); let mut sibling_invalidations = InvalidationVector::new(); - let invalidated_self = self.processor.collect_invalidations( + let mut invalidated_self = self.processor.collect_invalidations( self.element, self.nth_index_cache.as_mut().map(|c| &mut **c), self.quirks_mode, + &mut self_invalidations, &mut descendant_invalidations, &mut sibling_invalidations, ); debug!("Collected invalidations (self: {}): ", invalidated_self); + debug!(" > self: {:?}", descendant_invalidations); debug!(" > descendants: {:?}", descendant_invalidations); debug!(" > siblings: {:?}", sibling_invalidations); + invalidated_self |= self.process_descendant_invalidations( + &self_invalidations, + &mut descendant_invalidations, + &mut sibling_invalidations, + ); + let invalidated_descendants = self.invalidate_descendants(&descendant_invalidations); let invalidated_siblings = self.invalidate_siblings(&mut sibling_invalidations); From 258efb70df87cab2ad5c0ab68f309623a010e9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 21 Oct 2017 13:48:21 +0200 Subject: [PATCH 03/15] style: Move MatchingContext to the InvalidationProcessor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids threading the quirks mode and nth-index cache around, and prevents having to thread even more arguments down for the querySelector stuff (at least VisitedHandlingMode and the style scope). Signed-off-by: Emilio Cobos Álvarez --- components/style/data.rs | 3 +- .../style/invalidation/element/collector.rs | 27 ++++++--- .../style/invalidation/element/invalidator.rs | 57 +++++++------------ 3 files changed, 39 insertions(+), 48 deletions(-) diff --git a/components/style/data.rs b/components/style/data.rs index b9aed397f23..e68cc2041f5 100644 --- a/components/style/data.rs +++ b/components/style/data.rs @@ -263,13 +263,12 @@ impl ElementData { shared_context, element, self, + nth_index_cache, ); let invalidator = TreeStyleInvalidator::new( element, - shared_context.quirks_mode(), stack_limit_checker, - nth_index_cache, &mut processor, ); diff --git a/components/style/invalidation/element/collector.rs b/components/style/invalidation/element/collector.rs index 8696afe5793..4152e63d43d 100644 --- a/components/style/invalidation/element/collector.rs +++ b/components/style/invalidation/element/collector.rs @@ -51,24 +51,34 @@ where /// An invalidation processor for style changes due to state and attribute /// changes. -pub struct StateAndAttrInvalidationProcessor<'a, 'b: 'a, E> { +pub struct StateAndAttrInvalidationProcessor<'a, 'b: 'a, E: TElement> { shared_context: &'a SharedStyleContext<'b>, element: E, data: &'a mut ElementData, + matching_context: MatchingContext<'a, E::Impl>, } -impl<'a, 'b: 'a, E> StateAndAttrInvalidationProcessor<'a, 'b, E> { +impl<'a, 'b: 'a, E: TElement> StateAndAttrInvalidationProcessor<'a, 'b, E> { /// Creates a new StateAndAttrInvalidationProcessor. pub fn new( shared_context: &'a SharedStyleContext<'b>, element: E, data: &'a mut ElementData, + nth_index_cache: Option<&'a mut NthIndexCache>, ) -> Self { - Self { shared_context, element, data } + let matching_context = MatchingContext::new_for_visited( + MatchingMode::Normal, + None, + nth_index_cache, + VisitedHandlingMode::AllLinksVisitedAndUnvisited, + shared_context.quirks_mode(), + ); + + Self { shared_context, element, data, matching_context } } } -impl<'a, 'b: 'a, E> InvalidationProcessor for StateAndAttrInvalidationProcessor<'a, 'b, E> +impl<'a, 'b: 'a, E> InvalidationProcessor<'a, E> for StateAndAttrInvalidationProcessor<'a, 'b, E> where E: TElement, { @@ -77,17 +87,18 @@ where /// content being generated. fn invalidates_on_eager_pseudo_element(&self) -> bool { true } + fn matching_context(&mut self) -> &mut MatchingContext<'a, E::Impl> { + &mut self.matching_context + } + fn collect_invalidations( &mut self, element: E, - nth_index_cache: Option<&mut NthIndexCache>, - quirks_mode: QuirksMode, _self_invalidations: &mut InvalidationVector, descendant_invalidations: &mut InvalidationVector, sibling_invalidations: &mut InvalidationVector, ) -> bool { debug_assert!(element.has_snapshot(), "Why bothering?"); - debug_assert_eq!(quirks_mode, self.shared_context.quirks_mode(), "How exactly?"); let wrapper = ElementWrapper::new(element, &*self.shared_context.snapshot_map); @@ -150,11 +161,11 @@ where let mut collector = Collector { wrapper, lookup_element, - nth_index_cache, state_changes, element, snapshot: &snapshot, quirks_mode: self.shared_context.quirks_mode(), + nth_index_cache: self.matching_context.nth_index_cache.as_mut().map(|c| &mut **c), removed_id: id_removed.as_ref(), added_id: id_added.as_ref(), classes_removed: &classes_removed, diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index 0c2a36142f2..dadbe5a39f7 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -8,16 +8,14 @@ use context::StackLimitChecker; use dom::{TElement, TNode}; use selector_parser::SelectorImpl; -use selectors::NthIndexCache; -use selectors::matching::{MatchingContext, MatchingMode, QuirksMode, VisitedHandlingMode}; -use selectors::matching::CompoundSelectorMatchingResult; +use selectors::matching::{CompoundSelectorMatchingResult, MatchingContext}; use selectors::matching::matches_compound_selector; use selectors::parser::{Combinator, Component, Selector}; use smallvec::SmallVec; use std::fmt; /// A trait to abstract the collection of invalidations for a given pass. -pub trait InvalidationProcessor +pub trait InvalidationProcessor<'a, E> where E: TElement, { @@ -26,14 +24,15 @@ where /// that would originate it. fn invalidates_on_eager_pseudo_element(&self) -> bool { false } + /// The matching context that should be used to process invalidations. + fn matching_context(&mut self) -> &mut MatchingContext<'a, E::Impl>; + /// Collect invalidations for a given element's descendants and siblings. /// /// Returns whether the element itself was invalidated. fn collect_invalidations( &mut self, element: E, - nth_index_cache: Option<&mut NthIndexCache>, - quirks_mode: QuirksMode, self_invalidations: &mut InvalidationVector, descendant_invalidations: &mut InvalidationVector, sibling_invalidations: &mut InvalidationVector, @@ -56,16 +55,16 @@ where /// The struct that takes care of encapsulating all the logic on where and how /// element styles need to be invalidated. -pub struct TreeStyleInvalidator<'a, E, P: 'a> +pub struct TreeStyleInvalidator<'a, 'b, E, P: 'a> where + 'b: 'a, E: TElement, - P: InvalidationProcessor + P: InvalidationProcessor<'b, E>, { element: E, - quirks_mode: QuirksMode, stack_limit_checker: Option<&'a StackLimitChecker>, - nth_index_cache: Option<&'a mut NthIndexCache>, processor: &'a mut P, + _marker: ::std::marker::PhantomData<&'b ()> } /// A vector of invalidations, optimized for small invalidation sets. @@ -201,25 +200,23 @@ impl InvalidationResult { } } -impl<'a, E, P: 'a> TreeStyleInvalidator<'a, E, P> +impl<'a, 'b, E, P: 'a> TreeStyleInvalidator<'a, 'b, E, P> where + 'b: 'a, E: TElement, - P: InvalidationProcessor, + P: InvalidationProcessor<'b, E>, { /// Trivially constructs a new `TreeStyleInvalidator`. pub fn new( element: E, - quirks_mode: QuirksMode, stack_limit_checker: Option<&'a StackLimitChecker>, - nth_index_cache: Option<&'a mut NthIndexCache>, processor: &'a mut P, ) -> Self { Self { element, - quirks_mode, stack_limit_checker, - nth_index_cache, processor, + _marker: ::std::marker::PhantomData, } } @@ -233,8 +230,6 @@ where let mut invalidated_self = self.processor.collect_invalidations( self.element, - self.nth_index_cache.as_mut().map(|c| &mut **c), - self.quirks_mode, &mut self_invalidations, &mut descendant_invalidations, &mut sibling_invalidations, @@ -276,9 +271,7 @@ where while let Some(sibling) = current { let mut sibling_invalidator = TreeStyleInvalidator::new( sibling, - self.quirks_mode, self.stack_limit_checker, - self.nth_index_cache.as_mut().map(|c| &mut **c), self.processor, ); @@ -341,9 +334,7 @@ where let invalidated_descendants = { let mut child_invalidator = TreeStyleInvalidator::new( child, - self.quirks_mode, self.stack_limit_checker, - self.nth_index_cache.as_mut().map(|c| &mut **c), self.processor, ); @@ -570,22 +561,12 @@ where debug!("TreeStyleInvalidator::process_invalidation({:?}, {:?}, {:?})", self.element, invalidation, invalidation_kind); - let matching_result = { - let mut context = MatchingContext::new_for_visited( - MatchingMode::Normal, - None, - self.nth_index_cache.as_mut().map(|c| &mut **c), - VisitedHandlingMode::AllLinksVisitedAndUnvisited, - self.quirks_mode, - ); - - matches_compound_selector( - &invalidation.selector, - invalidation.offset, - &mut context, - &self.element - ) - }; + let matching_result = matches_compound_selector( + &invalidation.selector, + invalidation.offset, + self.processor.matching_context(), + &self.element + ); let mut invalidated_self = false; let mut matched = false; From 1b32709d953b56dff151345397c6fef1298755d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 21 Oct 2017 17:56:45 +0200 Subject: [PATCH 04/15] style: avoid selector refcount churn during invalidation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emilio Cobos Álvarez --- components/style/data.rs | 7 ++ components/style/dom.rs | 5 +- components/style/gecko/wrapper.rs | 17 ++--- .../style/invalidation/element/collector.rs | 71 +++++++++++-------- .../style/invalidation/element/invalidator.rs | 50 ++++++------- components/style/selector_map.rs | 27 +++---- components/style/stylist.rs | 5 +- 7 files changed, 103 insertions(+), 79 deletions(-) diff --git a/components/style/data.rs b/components/style/data.rs index e68cc2041f5..4d7d0deb3c3 100644 --- a/components/style/data.rs +++ b/components/style/data.rs @@ -17,6 +17,7 @@ use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage}; use selectors::NthIndexCache; use servo_arc::Arc; use shared_lock::StylesheetGuards; +use smallvec::SmallVec; use std::fmt; use std::mem; use std::ops::{Deref, DerefMut}; @@ -259,8 +260,14 @@ impl ElementData { return InvalidationResult::empty(); } + let mut xbl_stylists = SmallVec::<[_; 3]>::new(); + let cut_off_inheritance = + element.each_xbl_stylist(|s| xbl_stylists.push(s)); + let mut processor = StateAndAttrInvalidationProcessor::new( shared_context, + &xbl_stylists, + cut_off_inheritance, element, self, nth_index_cache, diff --git a/components/style/dom.rs b/components/style/dom.rs index e9405fdc767..6bd774a0198 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -686,9 +686,10 @@ pub trait TElement /// Implements Gecko's `nsBindingManager::WalkRules`. /// /// Returns whether to cut off the inheritance. - fn each_xbl_stylist(&self, _: F) -> bool + fn each_xbl_stylist<'a, F>(&self, _: F) -> bool where - F: FnMut(&Stylist), + Self: 'a, + F: FnMut(AtomicRef<'a, Stylist>), { false } diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 852436d3d06..bcdd2755519 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -17,7 +17,7 @@ use CaseSensitivityExt; use app_units::Au; use applicable_declarations::ApplicableDeclarationBlock; -use atomic_refcell::{AtomicRefCell, AtomicRefMut}; +use atomic_refcell::{AtomicRefCell, AtomicRef, AtomicRefMut}; use context::{QuirksMode, SharedStyleContext, PostAnimationTasks, UpdateAnimationsTasks}; use data::ElementData; use dom::{LayoutIterator, NodeInfo, TElement, TNode}; @@ -355,9 +355,9 @@ impl<'lb> GeckoXBLBinding<'lb> { } } - fn each_xbl_stylist(self, f: &mut F) + fn each_xbl_stylist(&self, f: &mut F) where - F: FnMut(&Stylist), + F: FnMut(AtomicRef<'lb, Stylist>), { if let Some(base) = self.base_binding() { base.each_xbl_stylist(f); @@ -369,7 +369,7 @@ impl<'lb> GeckoXBLBinding<'lb> { if let Some(raw_data) = raw_data { let data = PerDocumentStyleData::from_ffi(&*raw_data).borrow(); - f(&data.stylist); + f(AtomicRef::map(data, |d| &d.stylist)); } } } @@ -476,7 +476,7 @@ impl<'le> GeckoElement<'le> { } #[inline] - fn get_xbl_binding(&self) -> Option { + fn get_xbl_binding(&self) -> Option> { if self.flags() & (structs::NODE_MAY_BE_IN_BINDING_MNGR as u32) == 0 { return None; } @@ -485,7 +485,7 @@ impl<'le> GeckoElement<'le> { } #[inline] - fn get_xbl_binding_with_content(&self) -> Option { + fn get_xbl_binding_with_content(&self) -> Option> { self.get_xbl_binding() .and_then(|b| b.get_binding_with_content()) } @@ -1246,9 +1246,10 @@ impl<'le> TElement for GeckoElement<'le> { self.may_have_animations() && unsafe { Gecko_ElementHasCSSTransitions(self.0) } } - fn each_xbl_stylist(&self, mut f: F) -> bool + fn each_xbl_stylist<'a, F>(&self, mut f: F) -> bool where - F: FnMut(&Stylist), + 'le: 'a, + F: FnMut(AtomicRef<'a, Stylist>), { // Walk the binding scope chain, starting with the binding attached to // our content, up till we run out of scopes or we get cut off. diff --git a/components/style/invalidation/element/collector.rs b/components/style/invalidation/element/collector.rs index 4152e63d43d..62824517c7f 100644 --- a/components/style/invalidation/element/collector.rs +++ b/components/style/invalidation/element/collector.rs @@ -6,6 +6,7 @@ //! changes. use Atom; +use atomic_refcell::AtomicRef; use context::{QuirksMode, SharedStyleContext}; use data::ElementData; use dom::TElement; @@ -21,6 +22,7 @@ use selectors::attr::CaseSensitivity; use selectors::matching::{MatchingContext, MatchingMode, VisitedHandlingMode}; use selectors::matching::matches_selector; use smallvec::SmallVec; +use stylist::Stylist; #[derive(Debug, PartialEq)] enum VisitedDependent { @@ -29,7 +31,7 @@ enum VisitedDependent { } /// The collector implementation. -struct Collector<'a, 'b: 'a, E> +struct Collector<'a, 'b: 'a, 'selectors: 'a, E> where E: TElement, { @@ -44,8 +46,8 @@ where classes_removed: &'a SmallVec<[Atom; 8]>, classes_added: &'a SmallVec<[Atom; 8]>, state_changes: ElementState, - descendant_invalidations: &'a mut InvalidationVector, - sibling_invalidations: &'a mut InvalidationVector, + descendant_invalidations: &'a mut InvalidationVector<'selectors>, + sibling_invalidations: &'a mut InvalidationVector<'selectors>, invalidates_self: bool, } @@ -53,6 +55,8 @@ where /// changes. pub struct StateAndAttrInvalidationProcessor<'a, 'b: 'a, E: TElement> { shared_context: &'a SharedStyleContext<'b>, + xbl_stylists: &'a [AtomicRef<'b, Stylist>], + cut_off_inheritance: bool, element: E, data: &'a mut ElementData, matching_context: MatchingContext<'a, E::Impl>, @@ -62,6 +66,8 @@ impl<'a, 'b: 'a, E: TElement> StateAndAttrInvalidationProcessor<'a, 'b, E> { /// Creates a new StateAndAttrInvalidationProcessor. pub fn new( shared_context: &'a SharedStyleContext<'b>, + xbl_stylists: &'a [AtomicRef<'b, Stylist>], + cut_off_inheritance: bool, element: E, data: &'a mut ElementData, nth_index_cache: Option<&'a mut NthIndexCache>, @@ -74,11 +80,18 @@ impl<'a, 'b: 'a, E: TElement> StateAndAttrInvalidationProcessor<'a, 'b, E> { shared_context.quirks_mode(), ); - Self { shared_context, element, data, matching_context } + Self { + shared_context, + xbl_stylists, + cut_off_inheritance, + element, + data, + matching_context, + } } } -impl<'a, 'b: 'a, E> InvalidationProcessor<'a, E> for StateAndAttrInvalidationProcessor<'a, 'b, E> +impl<'a, 'b: 'a, E: 'a> InvalidationProcessor<'a, E> for StateAndAttrInvalidationProcessor<'a, 'b, E> where E: TElement, { @@ -94,9 +107,9 @@ where fn collect_invalidations( &mut self, element: E, - _self_invalidations: &mut InvalidationVector, - descendant_invalidations: &mut InvalidationVector, - sibling_invalidations: &mut InvalidationVector, + _self_invalidations: &mut InvalidationVector<'a>, + descendant_invalidations: &mut InvalidationVector<'a>, + sibling_invalidations: &mut InvalidationVector<'a>, ) -> bool { debug_assert!(element.has_snapshot(), "Why bothering?"); @@ -175,24 +188,21 @@ where invalidates_self: false, }; + // TODO(emilio): We could use the cut_off_inheritance from XBL to + // skip user and author stuff in here if it's true. self.shared_context.stylist.each_invalidation_map(|invalidation_map| { collector.collect_dependencies_in_invalidation_map(invalidation_map); }); - // TODO(emilio): Consider storing dependencies from the UA sheet in - // a different map. If we do that, we can skip the stuff on the - // shared stylist iff cut_off_inheritance is true, and we can look - // just at that map. - let _cut_off_inheritance = - element.each_xbl_stylist(|stylist| { - // FIXME(emilio): Replace with assert / remove when we - // figure out what to do with the quirks mode mismatches - // (that is, when bug 1406875 is properly fixed). - collector.quirks_mode = stylist.quirks_mode(); - stylist.each_invalidation_map(|invalidation_map| { - collector.collect_dependencies_in_invalidation_map(invalidation_map); - }); - }); + for stylist in self.xbl_stylists { + // FIXME(emilio): Replace with assert / remove when we + // figure out what to do with the quirks mode mismatches + // (that is, when bug 1406875 is properly fixed). + collector.quirks_mode = stylist.quirks_mode(); + stylist.each_invalidation_map(|invalidation_map| { + collector.collect_dependencies_in_invalidation_map(invalidation_map); + }) + } collector.invalidates_self }; @@ -259,13 +269,14 @@ where } } -impl<'a, 'b, E> Collector<'a, 'b, E> +impl<'a, 'b, 'selectors, E> Collector<'a, 'b, 'selectors, E> where E: TElement, + 'selectors: 'a, { fn collect_dependencies_in_invalidation_map( &mut self, - map: &InvalidationMap, + map: &'selectors InvalidationMap, ) { let quirks_mode = self.quirks_mode; let removed_id = self.removed_id; @@ -316,7 +327,7 @@ where fn collect_dependencies_in_map( &mut self, - map: &SelectorMap, + map: &'selectors SelectorMap, ) { map.lookup_with_additional( self.lookup_element, @@ -332,7 +343,7 @@ where fn collect_state_dependencies( &mut self, - map: &SelectorMap, + map: &'selectors SelectorMap, state_changes: ElementState, ) { map.lookup_with_additional( @@ -416,7 +427,7 @@ where fn scan_dependency( &mut self, - dependency: &Dependency, + dependency: &'selectors Dependency, is_visited_dependent: VisitedDependent, ) { debug!("TreeStyleInvalidator::scan_dependency({:?}, {:?}, {:?})", @@ -469,7 +480,7 @@ where } } - fn note_dependency(&mut self, dependency: &Dependency) { + fn note_dependency(&mut self, dependency: &'selectors Dependency) { if dependency.affects_self() { self.invalidates_self = true; } @@ -479,14 +490,14 @@ where debug_assert_ne!(dependency.selector_offset, dependency.selector.len()); debug_assert!(!dependency.affects_later_siblings()); self.descendant_invalidations.push(Invalidation::new( - dependency.selector.clone(), + &dependency.selector, dependency.selector.len() - dependency.selector_offset + 1, )); } else if dependency.affects_later_siblings() { debug_assert_ne!(dependency.selector_offset, 0); debug_assert_ne!(dependency.selector_offset, dependency.selector.len()); self.sibling_invalidations.push(Invalidation::new( - dependency.selector.clone(), + &dependency.selector, dependency.selector.len() - dependency.selector_offset + 1, )); } diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index dadbe5a39f7..164e15c830a 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -33,9 +33,9 @@ where fn collect_invalidations( &mut self, element: E, - self_invalidations: &mut InvalidationVector, - descendant_invalidations: &mut InvalidationVector, - sibling_invalidations: &mut InvalidationVector, + self_invalidations: &mut InvalidationVector<'a>, + descendant_invalidations: &mut InvalidationVector<'a>, + sibling_invalidations: &mut InvalidationVector<'a>, ) -> bool; /// Returns whether the invalidation process should process the descendants @@ -68,7 +68,7 @@ where } /// A vector of invalidations, optimized for small invalidation sets. -pub type InvalidationVector = SmallVec<[Invalidation; 10]>; +pub type InvalidationVector<'a> = SmallVec<[Invalidation<'a>; 10]>; /// The kind of invalidation we're processing. /// @@ -83,8 +83,8 @@ enum InvalidationKind { /// An `Invalidation` is a complex selector that describes which elements, /// relative to a current element we are processing, must be restyled. #[derive(Clone)] -pub struct Invalidation { - selector: Selector, +pub struct Invalidation<'a> { + selector: &'a Selector, /// The offset of the selector pointing to a compound selector. /// /// This order is a "parse order" offset, that is, zero is the leftmost part @@ -99,9 +99,9 @@ pub struct Invalidation { matched_by_any_previous: bool, } -impl Invalidation { +impl<'a> Invalidation<'a> { /// Create a new invalidation for a given selector and offset. - pub fn new(selector: Selector, offset: usize) -> Self { + pub fn new(selector: &'a Selector, offset: usize) -> Self { Self { selector, offset, @@ -140,7 +140,7 @@ impl Invalidation { } } -impl fmt::Debug for Invalidation { +impl<'a> fmt::Debug for Invalidation<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { use cssparser::ToCss; @@ -259,7 +259,7 @@ where /// was invalidated. fn invalidate_siblings( &mut self, - sibling_invalidations: &mut InvalidationVector, + sibling_invalidations: &mut InvalidationVector<'b>, ) -> bool { if sibling_invalidations.is_empty() { return false; @@ -300,7 +300,7 @@ where fn invalidate_pseudo_element_or_nac( &mut self, child: E, - invalidations: &InvalidationVector + invalidations: &InvalidationVector<'b>, ) -> bool { let mut sibling_invalidations = InvalidationVector::new(); @@ -325,8 +325,8 @@ where fn invalidate_child( &mut self, child: E, - invalidations: &InvalidationVector, - sibling_invalidations: &mut InvalidationVector, + invalidations: &InvalidationVector<'b>, + sibling_invalidations: &mut InvalidationVector<'b>, ) -> bool { let mut invalidations_for_descendants = InvalidationVector::new(); @@ -368,7 +368,7 @@ where fn invalidate_nac( &mut self, - invalidations: &InvalidationVector, + invalidations: &InvalidationVector<'b>, ) -> bool { let mut any_nac_root = false; @@ -386,7 +386,7 @@ where fn invalidate_dom_descendants_of( &mut self, parent: E::ConcreteNode, - invalidations: &InvalidationVector, + invalidations: &InvalidationVector<'b>, ) -> bool { let mut any_descendant = false; @@ -420,7 +420,7 @@ where /// descendants, and invalidate style on them. fn invalidate_descendants( &mut self, - invalidations: &InvalidationVector, + invalidations: &InvalidationVector<'b>, ) -> bool { if invalidations.is_empty() { return false; @@ -485,8 +485,8 @@ where /// Returns whether invalidated the current element's style. fn process_sibling_invalidations( &mut self, - descendant_invalidations: &mut InvalidationVector, - sibling_invalidations: &mut InvalidationVector, + descendant_invalidations: &mut InvalidationVector<'b>, + sibling_invalidations: &mut InvalidationVector<'b>, ) -> bool { let mut i = 0; let mut new_sibling_invalidations = InvalidationVector::new(); @@ -520,9 +520,9 @@ where /// Returns whether our style was invalidated as a result. fn process_descendant_invalidations( &mut self, - invalidations: &InvalidationVector, - descendant_invalidations: &mut InvalidationVector, - sibling_invalidations: &mut InvalidationVector, + invalidations: &InvalidationVector<'b>, + descendant_invalidations: &mut InvalidationVector<'b>, + sibling_invalidations: &mut InvalidationVector<'b>, ) -> bool { let mut invalidated = false; @@ -553,9 +553,9 @@ where /// down in the tree. fn process_invalidation( &mut self, - invalidation: &Invalidation, - descendant_invalidations: &mut InvalidationVector, - sibling_invalidations: &mut InvalidationVector, + invalidation: &Invalidation<'b>, + descendant_invalidations: &mut InvalidationVector<'b>, + sibling_invalidations: &mut InvalidationVector<'b>, invalidation_kind: InvalidationKind, ) -> SingleInvalidationResult { debug!("TreeStyleInvalidator::process_invalidation({:?}, {:?}, {:?})", @@ -627,7 +627,7 @@ where let next_invalidation = Invalidation { - selector: invalidation.selector.clone(), + selector: invalidation.selector, offset: next_combinator_offset + 1, matched_by_any_previous: false, }; diff --git a/components/style/selector_map.rs b/components/style/selector_map.rs index da9180b9549..13b16fd17d7 100644 --- a/components/style/selector_map.rs +++ b/components/style/selector_map.rs @@ -306,9 +306,10 @@ impl SelectorMap { /// FIXME(bholley) This overlaps with SelectorMap::get_all_matching_rules, /// but that function is extremely hot and I'd rather not rearrange it. #[inline] - pub fn lookup(&self, element: E, quirks_mode: QuirksMode, f: &mut F) -> bool - where E: TElement, - F: FnMut(&T) -> bool + pub fn lookup<'a, E, F>(&'a self, element: E, quirks_mode: QuirksMode, f: &mut F) -> bool + where + E: TElement, + F: FnMut(&'a T) -> bool { // Id. if let Some(id) = element.get_id() { @@ -366,15 +367,17 @@ impl SelectorMap { /// /// Returns false if the callback ever returns false. #[inline] - pub fn lookup_with_additional(&self, - element: E, - quirks_mode: QuirksMode, - additional_id: Option<&Atom>, - additional_classes: &[Atom], - f: &mut F) - -> bool - where E: TElement, - F: FnMut(&T) -> bool + pub fn lookup_with_additional<'a, E, F>( + &'a self, + element: E, + quirks_mode: QuirksMode, + additional_id: Option<&Atom>, + additional_classes: &[Atom], + f: &mut F, + ) -> bool + where + E: TElement, + F: FnMut(&'a T) -> bool { // Do the normal lookup. if !self.lookup(element, quirks_mode, f) { diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 038b7ceb888..4ea931ff42e 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -484,8 +484,9 @@ impl Stylist { /// NOTE(heycam) This might be better as an `iter_invalidation_maps`, once /// we have `impl trait` and can return that easily without bothering to /// create a whole new iterator type. - pub fn each_invalidation_map(&self, mut f: F) - where F: FnMut(&InvalidationMap) + pub fn each_invalidation_map<'a, F>(&'a self, mut f: F) + where + F: FnMut(&'a InvalidationMap) { for (data, _) in self.cascade_data.iter_origins() { f(&data.invalidation_map) From bd2a82334b17732831fb21b078a2b19c22b9bfef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 21 Oct 2017 18:55:27 +0200 Subject: [PATCH 05/15] style: Don't look at user and author rules if the element can't be affected by them. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emilio Cobos Álvarez --- .../style/invalidation/element/collector.rs | 17 ++++++++++++----- components/style/stylist.rs | 6 +++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/components/style/invalidation/element/collector.rs b/components/style/invalidation/element/collector.rs index 62824517c7f..31b93f8c732 100644 --- a/components/style/invalidation/element/collector.rs +++ b/components/style/invalidation/element/collector.rs @@ -22,6 +22,7 @@ use selectors::attr::CaseSensitivity; use selectors::matching::{MatchingContext, MatchingMode, VisitedHandlingMode}; use selectors::matching::matches_selector; use smallvec::SmallVec; +use stylesheets::origin::{Origin, OriginSet}; use stylist::Stylist; #[derive(Debug, PartialEq)] @@ -188,10 +189,16 @@ where invalidates_self: false, }; - // TODO(emilio): We could use the cut_off_inheritance from XBL to - // skip user and author stuff in here if it's true. - self.shared_context.stylist.each_invalidation_map(|invalidation_map| { - collector.collect_dependencies_in_invalidation_map(invalidation_map); + let document_origins = if self.cut_off_inheritance { + Origin::UserAgent.into() + } else { + OriginSet::all() + }; + + self.shared_context.stylist.each_invalidation_map(|invalidation_map, origin| { + if document_origins.contains(origin.into()) { + collector.collect_dependencies_in_invalidation_map(invalidation_map); + } }); for stylist in self.xbl_stylists { @@ -199,7 +206,7 @@ where // figure out what to do with the quirks mode mismatches // (that is, when bug 1406875 is properly fixed). collector.quirks_mode = stylist.quirks_mode(); - stylist.each_invalidation_map(|invalidation_map| { + stylist.each_invalidation_map(|invalidation_map, _| { collector.collect_dependencies_in_invalidation_map(invalidation_map); }) } diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 4ea931ff42e..b39f96d6813 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -486,10 +486,10 @@ impl Stylist { /// create a whole new iterator type. pub fn each_invalidation_map<'a, F>(&'a self, mut f: F) where - F: FnMut(&'a InvalidationMap) + F: FnMut(&'a InvalidationMap, Origin) { - for (data, _) in self.cascade_data.iter_origins() { - f(&data.invalidation_map) + for (data, origin) in self.cascade_data.iter_origins() { + f(&data.invalidation_map, origin) } } From 7f5536d5bc28856b90ba87f32c63dbf901d8b648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 22 Oct 2017 02:51:00 +0200 Subject: [PATCH 06/15] style: Ensure invalidated_self is called at most once per element. MozReview-Commit-ID: 1M0WuAduqun --- .../style/invalidation/element/invalidator.rs | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index 164e15c830a..6d29f9b273b 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -240,12 +240,18 @@ where debug!(" > descendants: {:?}", descendant_invalidations); debug!(" > siblings: {:?}", sibling_invalidations); + let invalidated_self_from_collection = invalidated_self; + invalidated_self |= self.process_descendant_invalidations( &self_invalidations, &mut descendant_invalidations, &mut sibling_invalidations, ); + if invalidated_self && !invalidated_self_from_collection { + self.processor.invalidated_self(self.element); + } + let invalidated_descendants = self.invalidate_descendants(&descendant_invalidations); let invalidated_siblings = self.invalidate_siblings(&mut sibling_invalidations); @@ -276,12 +282,18 @@ where ); let mut invalidations_for_descendants = InvalidationVector::new(); - any_invalidated |= + let invalidated_sibling = sibling_invalidator.process_sibling_invalidations( &mut invalidations_for_descendants, sibling_invalidations, ); + if invalidated_sibling { + sibling_invalidator.processor.invalidated_self(sibling); + } + + any_invalidated |= invalidated_sibling; + any_invalidated |= sibling_invalidator.invalidate_descendants( &invalidations_for_descendants @@ -351,6 +363,10 @@ where sibling_invalidations, ); + if invalidated_child { + child_invalidator.processor.invalidated_self(child); + } + child_invalidator.invalidate_descendants(&invalidations_for_descendants) }; @@ -718,10 +734,6 @@ where CompoundSelectorMatchingResult::NotMatched => {} } - if invalidated_self { - self.processor.invalidated_self(self.element); - } - SingleInvalidationResult { invalidated_self, matched, } } } From 6d78e9ba54917ff5dd67893cfd314c9e5fec51e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 21 Oct 2017 14:26:30 +0200 Subject: [PATCH 07/15] style: Add a very simple invalidation-based querySelector. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: Fimc8tz4OWX Signed-off-by: Emilio Cobos Álvarez --- components/style/dom_apis.rs | 128 +++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/components/style/dom_apis.rs b/components/style/dom_apis.rs index b050c181cfa..64bb8d31a12 100644 --- a/components/style/dom_apis.rs +++ b/components/style/dom_apis.rs @@ -6,8 +6,11 @@ //! and Gecko. use context::QuirksMode; +use dom::{TElement, TNode}; +use invalidation::element::invalidator::{Invalidation, InvalidationProcessor, InvalidationVector}; use selectors::{Element, NthIndexCache, SelectorList}; use selectors::matching::{self, MatchingContext, MatchingMode}; +use smallvec::SmallVec; /// pub fn element_matches( @@ -57,3 +60,128 @@ where return None; } + +/// The result of a querySelector call. +pub type QuerySelectorResult = SmallVec<[E; 128]>; + +/// The query kind we're doing (either only the first descendant that matches or +/// all of them). +pub enum QuerySelectorKind { + /// + All, + /// + First, +} + +struct QuerySelectorProcessor<'a, E: TElement + 'a> { + kind: QuerySelectorKind, + results: &'a mut QuerySelectorResult, + matching_context: MatchingContext<'a, E::Impl>, + selector_list: &'a SelectorList, +} + +impl<'a, E> InvalidationProcessor<'a, E> for QuerySelectorProcessor<'a, E> +where + E: TElement + 'a, +{ + fn collect_invalidations( + &mut self, + _element: E, + self_invalidations: &mut InvalidationVector<'a>, + descendant_invalidations: &mut InvalidationVector<'a>, + _sibling_invalidations: &mut InvalidationVector<'a>, + ) -> bool { + // FIXME(emilio): If the element is not a root element, and + // selector_list has any descendant combinator, we need to do extra work + // in order to handle properly things like: + // + //
+ //
+ //
+ //
+ //
+ // + // b.querySelector('#a div'); // Should return "c". + // + let target_vector = + if self.matching_context.scope_element.is_some() { + descendant_invalidations + } else { + self_invalidations + }; + + for selector in self.selector_list.0.iter() { + target_vector.push(Invalidation::new(selector, 0)) + } + + false + } + + fn matching_context(&mut self) -> &mut MatchingContext<'a, E::Impl> { + &mut self.matching_context + } + + fn should_process_descendants(&mut self, _: E) -> bool { + match self.kind { + QuerySelectorKind::All => true, + QuerySelectorKind::First => self.results.is_empty(), + } + } + + fn invalidated_self(&mut self, e: E) { + self.results.push(e); + } + + fn recursion_limit_exceeded(&mut self, _e: E) {} + fn invalidated_descendants(&mut self, _e: E, _child: E) {} +} + +/// +pub fn query_selector( + root: E::ConcreteNode, + selector_list: &SelectorList, + results: &mut QuerySelectorResult, + kind: QuerySelectorKind, + quirks_mode: QuirksMode, +) { + use invalidation::element::invalidator::TreeStyleInvalidator; + + let mut nth_index_cache = NthIndexCache::default(); + let mut matching_context = MatchingContext::new( + MatchingMode::Normal, + None, + Some(&mut nth_index_cache), + quirks_mode, + ); + + let root_element = root.as_element(); + matching_context.scope_element = root_element.map(|e| e.opaque()); + + let mut processor = QuerySelectorProcessor { + kind, + results, + matching_context, + selector_list, + }; + + match root_element { + Some(e) => { + TreeStyleInvalidator::new( + e, + /* stack_limit_checker = */ None, + &mut processor, + ).invalidate(); + } + None => { + for node in root.dom_children() { + if let Some(e) = node.as_element() { + TreeStyleInvalidator::new( + e, + /* stack_limit_checker = */ None, + &mut processor, + ).invalidate(); + } + } + } + } +} From 6ae8bdee61104b649e8a9237c4814fe8947580d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 21 Oct 2017 14:54:43 +0200 Subject: [PATCH 08/15] style: Hook QuerySelector into stylo. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 1410624 MozReview-Commit-ID: 4uKWN9uqi3r Signed-off-by: Emilio Cobos Álvarez --- components/style/gecko/wrapper.rs | 9 ++++++++- ports/geckolib/glue.rs | 27 +++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index bcdd2755519..c8fc86a5063 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -148,6 +148,12 @@ impl<'ln> GeckoNode<'ln> { (self.0).mBoolFlags } + /// Owner document quirks mode getter. + #[inline] + pub fn owner_document_quirks_mode(&self) -> QuirksMode { + self.owner_doc().mCompatMode.into() + } + #[inline] fn get_bool_flag(&self, flag: nsINode_BooleanFlag) -> bool { self.bool_flags() & (1u32 << flag as u32) != 0 @@ -625,8 +631,9 @@ impl<'le> GeckoElement<'le> { } /// Owner document quirks mode getter. + #[inline] pub fn owner_document_quirks_mode(&self) -> QuirksMode { - self.as_node().owner_doc().mCompatMode.into() + self.as_node().owner_document_quirks_mode() } /// Only safe to call on the main thread, with exclusive access to the element and diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index e5a21612dfb..b793c7d24e5 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -29,9 +29,9 @@ use style::gecko::global_style_data::{GLOBAL_STYLE_DATA, GlobalStyleData, STYLE_ use style::gecko::restyle_damage::GeckoRestyleDamage; use style::gecko::selector_parser::PseudoElement; use style::gecko::traversal::RecalcStyleOnly; -use style::gecko::wrapper::GeckoElement; +use style::gecko::wrapper::{GeckoElement, GeckoNode}; use style::gecko_bindings::bindings; -use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoElementBorrowedOrNull}; +use style::gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoElementBorrowedOrNull, RawGeckoNodeBorrowed}; use style::gecko_bindings::bindings::{RawGeckoKeyframeListBorrowed, RawGeckoKeyframeListBorrowedMut}; use style::gecko_bindings::bindings::{RawServoDeclarationBlockBorrowed, RawServoDeclarationBlockStrong}; use style::gecko_bindings::bindings::{RawServoDocumentRule, RawServoDocumentRuleBorrowed}; @@ -1614,6 +1614,29 @@ pub unsafe extern "C" fn Servo_SelectorList_Matches( ) } +#[no_mangle] +pub unsafe extern "C" fn Servo_SelectorList_QueryFirst( + node: RawGeckoNodeBorrowed, + selectors: RawServoSelectorListBorrowed, +) -> *const structs::RawGeckoElement { + use std::borrow::Borrow; + use style::dom_apis::{self, QuerySelectorResult, QuerySelectorKind}; + + let node = GeckoNode(node); + let selectors = ::selectors::SelectorList::from_ffi(selectors).borrow(); + let mut result = QuerySelectorResult::new(); + dom_apis::query_selector::( + node, + &selectors, + &mut result, + QuerySelectorKind::First, + node.owner_document_quirks_mode(), + ); + + result.first() + .map_or(ptr::null(), |e| e.0) +} + #[no_mangle] pub extern "C" fn Servo_ImportRule_GetHref(rule: RawServoImportRuleBorrowed, result: *mut nsAString) { read_locked_arc(rule, |rule: &ImportRule| { From 4f997bf3334f776e46cf78664c6e5a980dbfd72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 22 Oct 2017 01:18:44 +0200 Subject: [PATCH 09/15] style: Add methods to iterate a subtree in preorder. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emilio Cobos Álvarez --- components/style/dom.rs | 61 ++++++++++++++++++++++++++++++- components/style/gecko/wrapper.rs | 6 +++ 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/components/style/dom.rs b/components/style/dom.rs index 6bd774a0198..38d75a1eedb 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -110,9 +110,32 @@ where } } +/// An iterator over the DOM descendants of a node in pre-order. +pub struct DomDescendants { + previous: Option, + scope: N, +} + +impl Iterator for DomDescendants +where + N: TNode +{ + type Item = N; + + fn next(&mut self) -> Option { + let prev = match self.previous.take() { + None => return None, + Some(n) => n, + }; + + self.previous = prev.next_in_preorder(Some(self.scope)); + self.previous + } +} + /// The `TNode` trait. This is the main generic trait over which the style /// system can be implemented. -pub trait TNode : Sized + Copy + Clone + Debug + NodeInfo { +pub trait TNode : Sized + Copy + Clone + Debug + NodeInfo + PartialEq { /// The concrete `TElement` type. type ConcreteElement: TElement; @@ -131,11 +154,45 @@ pub trait TNode : Sized + Copy + Clone + Debug + NodeInfo { /// Get this node's next sibling. fn next_sibling(&self) -> Option; - /// Iterate over the DOM children of an element. + /// Iterate over the DOM children of a node. fn dom_children(&self) -> DomChildren { DomChildren(self.first_child()) } + /// Iterate over the DOM children of a node, in preorder. + fn dom_descendants(&self) -> DomDescendants { + DomDescendants { + previous: Some(*self), + scope: *self, + } + } + + /// Returns the next children in pre-order, optionally scoped to a subtree + /// root. + fn next_in_preorder(&self, scoped_to: Option) -> Option { + if let Some(c) = self.first_child() { + return Some(c); + } + + if Some(*self) == scoped_to { + return None; + } + + let mut current = *self; + loop { + if let Some(s) = current.next_sibling() { + return Some(s); + } + + let parent = current.parent_node(); + if parent == scoped_to { + return None; + } + + current = parent.expect("Not a descendant of the scope?"); + } + } + /// Get this node's parent element from the perspective of a restyle /// traversal. fn traversal_parent(&self) -> Option; diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index c8fc86a5063..9cdcdba9de4 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -104,6 +104,12 @@ use stylist::Stylist; #[derive(Clone, Copy)] pub struct GeckoNode<'ln>(pub &'ln RawGeckoNode); +impl<'ln> PartialEq for GeckoNode<'ln> { + fn eq(&self, other: &Self) -> bool { + self.0 as *const _ == other.0 as *const _ + } +} + impl<'ln> fmt::Debug for GeckoNode<'ln> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if let Some(el) = self.as_element() { From 2274fd7ef35a7b64d1f7cd65e65bf3acc99a1ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 22 Oct 2017 01:19:26 +0200 Subject: [PATCH 10/15] style: Refactor querySelector to be generic over the query type, and implement a tree-walking variant of it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emilio Cobos Álvarez --- components/style/dom_apis.rs | 205 +++++++++++++++++++++++++++-------- ports/geckolib/glue.rs | 10 +- 2 files changed, 162 insertions(+), 53 deletions(-) diff --git a/components/style/dom_apis.rs b/components/style/dom_apis.rs index 64bb8d31a12..a1eed66ee76 100644 --- a/components/style/dom_apis.rs +++ b/components/style/dom_apis.rs @@ -61,37 +61,86 @@ where return None; } -/// The result of a querySelector call. -pub type QuerySelectorResult = SmallVec<[E; 128]>; +/// A selector query abstraction, in order to be generic over QuerySelector and +/// QuerySelectorAll. +pub trait SelectorQuery { + /// The output of the query. + type Output; -/// The query kind we're doing (either only the first descendant that matches or -/// all of them). -pub enum QuerySelectorKind { - /// - All, - /// - First, + /// Whether the query should stop after the first element has been matched. + fn should_stop_after_first_match() -> bool; + + /// Append an element matching after the first query. + fn append_element(output: &mut Self::Output, element: E); + + /// Returns true if the output is empty. + fn is_empty(output: &Self::Output) -> bool; } -struct QuerySelectorProcessor<'a, E: TElement + 'a> { - kind: QuerySelectorKind, - results: &'a mut QuerySelectorResult, +/// The result of a querySelectorAll call. +pub type QuerySelectorAllResult = SmallVec<[E; 128]>; + +/// A query for all the elements in a subtree. +pub struct QueryAll; + +impl SelectorQuery for QueryAll { + type Output = QuerySelectorAllResult; + + fn should_stop_after_first_match() -> bool { false } + + fn append_element(output: &mut Self::Output, element: E) { + output.push(element); + } + + fn is_empty(output: &Self::Output) -> bool { + output.is_empty() + } +} + +/// A query for the first in-tree match of all the elements in a subtree. +pub struct QueryFirst; + +impl SelectorQuery for QueryFirst { + type Output = Option; + + fn should_stop_after_first_match() -> bool { true } + + fn append_element(output: &mut Self::Output, element: E) { + if output.is_none() { + *output = Some(element) + } + } + + fn is_empty(output: &Self::Output) -> bool { + output.is_none() + } +} + +struct QuerySelectorProcessor<'a, E, Q> +where + E: TElement + 'a, + Q: SelectorQuery, + Q::Output: 'a, +{ + results: &'a mut Q::Output, matching_context: MatchingContext<'a, E::Impl>, selector_list: &'a SelectorList, } -impl<'a, E> InvalidationProcessor<'a, E> for QuerySelectorProcessor<'a, E> +impl<'a, E, Q> InvalidationProcessor<'a, E> for QuerySelectorProcessor<'a, E, Q> where E: TElement + 'a, + Q: SelectorQuery, + Q::Output: 'a, { fn collect_invalidations( &mut self, - _element: E, + element: E, self_invalidations: &mut InvalidationVector<'a>, descendant_invalidations: &mut InvalidationVector<'a>, _sibling_invalidations: &mut InvalidationVector<'a>, ) -> bool { - // FIXME(emilio): If the element is not a root element, and + // TODO(emilio): If the element is not a root element, and // selector_list has any descendant combinator, we need to do extra work // in order to handle properly things like: // @@ -103,6 +152,9 @@ where // // b.querySelector('#a div'); // Should return "c". // + // For now, assert it's a root element. + debug_assert!(element.parent_element().is_none()); + let target_vector = if self.matching_context.scope_element.is_some() { descendant_invalidations @@ -122,30 +174,92 @@ where } fn should_process_descendants(&mut self, _: E) -> bool { - match self.kind { - QuerySelectorKind::All => true, - QuerySelectorKind::First => self.results.is_empty(), + if Q::should_stop_after_first_match() { + return Q::is_empty(&self.results) } + + true } fn invalidated_self(&mut self, e: E) { - self.results.push(e); + Q::append_element(self.results, e); } fn recursion_limit_exceeded(&mut self, _e: E) {} fn invalidated_descendants(&mut self, _e: E, _child: E) {} } -/// -pub fn query_selector( +/// Fast paths for a given selector query. +fn query_selector_fast( + _root: E::ConcreteNode, + _selector_list: &SelectorList, + _results: &mut Q::Output, + _quirks_mode: QuirksMode, +) -> Result<(), ()> +where + E: TElement, + Q: SelectorQuery, +{ + // FIXME(emilio): Implement :-) + Err(()) +} + +// Slow path for a given selector query. +fn query_selector_slow( root: E::ConcreteNode, selector_list: &SelectorList, - results: &mut QuerySelectorResult, - kind: QuerySelectorKind, + results: &mut Q::Output, + matching_context: &mut MatchingContext, +) +where + E: TElement, + Q: SelectorQuery, +{ + for node in root.dom_descendants() { + let element = match node.as_element() { + Some(e) => e, + None => continue, + }; + + if !matching::matches_selector_list(selector_list, &element, matching_context) { + continue; + } + + Q::append_element(results, element); + if Q::should_stop_after_first_match() { + return; + } + } +} + +/// +pub fn query_selector( + root: E::ConcreteNode, + selector_list: &SelectorList, + results: &mut Q::Output, quirks_mode: QuirksMode, -) { +) +where + E: TElement, + Q: SelectorQuery, +{ use invalidation::element::invalidator::TreeStyleInvalidator; + let fast_result = query_selector_fast::( + root, + selector_list, + results, + quirks_mode, + ); + + if fast_result.is_ok() { + return; + } + + // Slow path: Use the invalidation machinery if we're a root, and tree + // traversal otherwise. + // + // See the comment in collect_invalidations to see why only if we're a root. let mut nth_index_cache = NthIndexCache::default(); let mut matching_context = MatchingContext::new( MatchingMode::Normal, @@ -157,30 +271,27 @@ pub fn query_selector( let root_element = root.as_element(); matching_context.scope_element = root_element.map(|e| e.opaque()); - let mut processor = QuerySelectorProcessor { - kind, - results, - matching_context, - selector_list, - }; + if root_element.is_some() { + query_selector_slow::( + root, + selector_list, + results, + &mut matching_context, + ); + } else { + let mut processor = QuerySelectorProcessor:: { + results, + matching_context, + selector_list, + }; - match root_element { - Some(e) => { - TreeStyleInvalidator::new( - e, - /* stack_limit_checker = */ None, - &mut processor, - ).invalidate(); - } - None => { - for node in root.dom_children() { - if let Some(e) = node.as_element() { - TreeStyleInvalidator::new( - e, - /* stack_limit_checker = */ None, - &mut processor, - ).invalidate(); - } + for node in root.dom_children() { + if let Some(e) = node.as_element() { + TreeStyleInvalidator::new( + e, + /* stack_limit_checker = */ None, + &mut processor, + ).invalidate(); } } } diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index b793c7d24e5..7bedd0cea68 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -1620,21 +1620,19 @@ pub unsafe extern "C" fn Servo_SelectorList_QueryFirst( selectors: RawServoSelectorListBorrowed, ) -> *const structs::RawGeckoElement { use std::borrow::Borrow; - use style::dom_apis::{self, QuerySelectorResult, QuerySelectorKind}; + use style::dom_apis::{self, QueryFirst}; let node = GeckoNode(node); let selectors = ::selectors::SelectorList::from_ffi(selectors).borrow(); - let mut result = QuerySelectorResult::new(); - dom_apis::query_selector::( + let mut result = None; + dom_apis::query_selector::( node, &selectors, &mut result, - QuerySelectorKind::First, node.owner_document_quirks_mode(), ); - result.first() - .map_or(ptr::null(), |e| e.0) + result.map_or(ptr::null(), |e| e.0) } #[no_mangle] From d73af807b710ef903cc966242d9850a44f879821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 22 Oct 2017 01:48:14 +0200 Subject: [PATCH 11/15] style: Add a few QuerySelector fast-paths. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emilio Cobos Álvarez --- components/style/dom_apis.rs | 111 ++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 21 deletions(-) diff --git a/components/style/dom_apis.rs b/components/style/dom_apis.rs index a1eed66ee76..8cfc6bf5754 100644 --- a/components/style/dom_apis.rs +++ b/components/style/dom_apis.rs @@ -189,19 +189,100 @@ where fn invalidated_descendants(&mut self, _e: E, _child: E) {} } +fn collect_all_elements( + root: E::ConcreteNode, + results: &mut Q::Output, + mut filter: F, +) +where + E: TElement, + Q: SelectorQuery, + F: FnMut(E) -> bool, +{ + for node in root.dom_descendants() { + let element = match node.as_element() { + Some(e) => e, + None => continue, + }; + + if !filter(element) { + continue; + } + + Q::append_element(results, element); + if Q::should_stop_after_first_match() { + return; + } + } +} + /// Fast paths for a given selector query. +/// +/// FIXME(emilio, nbp): This may very well be a good candidate for code to be +/// replaced by HolyJit :) fn query_selector_fast( - _root: E::ConcreteNode, - _selector_list: &SelectorList, - _results: &mut Q::Output, - _quirks_mode: QuirksMode, + root: E::ConcreteNode, + selector_list: &SelectorList, + results: &mut Q::Output, + quirks_mode: QuirksMode, ) -> Result<(), ()> where E: TElement, Q: SelectorQuery, { - // FIXME(emilio): Implement :-) - Err(()) + use selectors::parser::{Component, LocalName}; + use std::borrow::Borrow; + + // We need to return elements in document order, and reordering them + // afterwards is kinda silly. + if selector_list.0.len() > 1 { + return Err(()); + } + + let selector = &selector_list.0[0]; + + // Let's just care about the easy cases for now. + // + // FIXME(emilio): Blink has a fast path for classes in ancestor combinators + // that may be worth stealing. + if selector.len() > 1 { + return Err(()); + } + + let component = selector.iter().next().unwrap(); + match *component { + Component::ExplicitUniversalType => { + collect_all_elements::(root, results, |_| true) + } + Component::ID(ref id) => { + // TODO(emilio): We may want to reuse Gecko's document ID table. + let case_sensitivity = quirks_mode.classes_and_ids_case_sensitivity(); + collect_all_elements::(root, results, |element| { + element.has_id(id, case_sensitivity) + }) + } + Component::Class(ref class) => { + let case_sensitivity = quirks_mode.classes_and_ids_case_sensitivity(); + collect_all_elements::(root, results, |element| { + element.has_class(class, case_sensitivity) + }) + } + Component::LocalName(LocalName { ref name, ref lower_name }) => { + collect_all_elements::(root, results, |element| { + if element.is_html_element_in_html_document() { + element.get_local_name() == lower_name.borrow() + } else { + element.get_local_name() == name.borrow() + } + }) + } + // TODO(emilio): More fast paths? + _ => { + return Err(()) + } + } + + Ok(()) } // Slow path for a given selector query. @@ -215,21 +296,9 @@ where E: TElement, Q: SelectorQuery, { - for node in root.dom_descendants() { - let element = match node.as_element() { - Some(e) => e, - None => continue, - }; - - if !matching::matches_selector_list(selector_list, &element, matching_context) { - continue; - } - - Q::append_element(results, element); - if Q::should_stop_after_first_match() { - return; - } - } + collect_all_elements::(root, results, |element| { + matching::matches_selector_list(selector_list, &element, matching_context) + }); } /// From 6b3821ae278d7b47879f0e932b6f478aa1cdc748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 22 Oct 2017 02:19:14 +0200 Subject: [PATCH 12/15] stylo: Integrate QuerySelectorAll in Gecko. Bug: 1410624 Reviewed-by: heycam MozReview-Commit-ID: 2Jf3Z6ikjXB --- ports/geckolib/glue.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 7bedd0cea68..f0f1baaf661 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -1635,6 +1635,38 @@ pub unsafe extern "C" fn Servo_SelectorList_QueryFirst( result.map_or(ptr::null(), |e| e.0) } +#[no_mangle] +pub unsafe extern "C" fn Servo_SelectorList_QueryAll( + node: RawGeckoNodeBorrowed, + selectors: RawServoSelectorListBorrowed, + content_list: *mut structs::nsSimpleContentList, +) { + use smallvec::SmallVec; + use std::borrow::Borrow; + use style::dom_apis::{self, QueryAll}; + + let node = GeckoNode(node); + let selectors = ::selectors::SelectorList::from_ffi(selectors).borrow(); + let mut result = SmallVec::new(); + + dom_apis::query_selector::( + node, + &selectors, + &mut result, + node.owner_document_quirks_mode(), + ); + + if !result.is_empty() { + // NOTE(emilio): This relies on a slice of GeckoElement having the same + // memory representation than a slice of element pointers. + bindings::Gecko_ContentList_AppendAll( + content_list, + result.as_ptr() as *mut *const _, + result.len(), + ) + } +} + #[no_mangle] pub extern "C" fn Servo_ImportRule_GetHref(rule: RawServoImportRuleBorrowed, result: *mut nsAString) { read_locked_arc(rule, |rule: &ImportRule| { From dd7196949fa24ea9f10eeb6df8b94d0507f6c425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 22 Oct 2017 03:14:13 +0200 Subject: [PATCH 13/15] style: Don't use the invalidation machinery unless we may get some benefit from it. MozReview-Commit-ID: 8Wpn2bjuHBQ --- components/style/dom_apis.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/style/dom_apis.rs b/components/style/dom_apis.rs index 8cfc6bf5754..5a096dac1a6 100644 --- a/components/style/dom_apis.rs +++ b/components/style/dom_apis.rs @@ -340,7 +340,14 @@ where let root_element = root.as_element(); matching_context.scope_element = root_element.map(|e| e.opaque()); - if root_element.is_some() { + // The invalidation mechanism is only useful in presence of combinators. + // + // We could do that check properly here, though checking the length of the + // selectors is a good heuristic. + let invalidation_may_be_useful = + selector_list.0.iter().any(|s| s.len() > 1); + + if root_element.is_some() || !invalidation_may_be_useful { query_selector_slow::( root, selector_list, From 644b502b0d409f85423c1ae164d1cc106ddf0f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 22 Oct 2017 13:11:18 +0200 Subject: [PATCH 14/15] style: Ensure QuerySelector only processes the light tree. MozReview-Commit-ID: 7Nw1SEuWNaC --- components/style/dom_apis.rs | 2 ++ components/style/invalidation/element/invalidator.rs | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/components/style/dom_apis.rs b/components/style/dom_apis.rs index 5a096dac1a6..c1aafed6b74 100644 --- a/components/style/dom_apis.rs +++ b/components/style/dom_apis.rs @@ -133,6 +133,8 @@ where Q: SelectorQuery, Q::Output: 'a, { + fn light_tree_only(&self) -> bool { true } + fn collect_invalidations( &mut self, element: E, diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index 6d29f9b273b..79052a31f9e 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -24,6 +24,11 @@ where /// that would originate it. fn invalidates_on_eager_pseudo_element(&self) -> bool { false } + /// Whether the invalidation processor only cares about light-tree + /// descendants of a given element, that is, doesn't invalidate + /// pseudo-elements, NAC, or XBL anon content. + fn light_tree_only(&self) -> bool { false } + /// The matching context that should be used to process invalidations. fn matching_context(&mut self) -> &mut MatchingContext<'a, E::Impl>; @@ -460,6 +465,11 @@ where } } + if self.processor.light_tree_only() { + let node = self.element.as_node(); + return self.invalidate_dom_descendants_of(node, invalidations); + } + let mut any_descendant = false; if let Some(anon_content) = self.element.xbl_binding_anonymous_content() { From 9a804f68f903ed8daa9225a84e56a0796ab4cdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 23 Oct 2017 08:24:20 +0200 Subject: [PATCH 15/15] style: Update bindings. --- .../style/gecko/generated/atom_macro.rs | 32 - components/style/gecko/generated/bindings.rs | 34 +- components/style/gecko/generated/structs.rs | 1875 ++++++++--------- 3 files changed, 913 insertions(+), 1028 deletions(-) diff --git a/components/style/gecko/generated/atom_macro.rs b/components/style/gecko/generated/atom_macro.rs index db43667f6b1..1e9a73d1044 100644 --- a/components/style/gecko/generated/atom_macro.rs +++ b/components/style/gecko/generated/atom_macro.rs @@ -4368,8 +4368,6 @@ cfg_if! { pub static nsGkAtoms_forcemessagemanager: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms16isPreloadBrowserE"] pub static nsGkAtoms_isPreloadBrowser: *mut nsAtom; - #[link_name = "_ZN9nsGkAtoms22color_picker_availableE"] - pub static nsGkAtoms_color_picker_available: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms24scrollbar_start_backwardE"] pub static nsGkAtoms_scrollbar_start_backward: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms23scrollbar_start_forwardE"] @@ -4400,8 +4398,6 @@ cfg_if! { pub static nsGkAtoms_menubar_drag: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms23swipe_animation_enabledE"] pub static nsGkAtoms_swipe_animation_enabled: *mut nsAtom; - #[link_name = "_ZN9nsGkAtoms20physical_home_buttonE"] - pub static nsGkAtoms_physical_home_button: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms15windows_classicE"] pub static nsGkAtoms_windows_classic: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms18windows_theme_aeroE"] @@ -4420,8 +4416,6 @@ cfg_if! { pub static nsGkAtoms_windows_theme_zune: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms21windows_theme_genericE"] pub static nsGkAtoms_windows_theme_generic: *mut nsAtom; - #[link_name = "_ZN9nsGkAtoms27_moz_color_picker_availableE"] - pub static nsGkAtoms__moz_color_picker_available: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms29_moz_scrollbar_start_backwardE"] pub static nsGkAtoms__moz_scrollbar_start_backward: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms28_moz_scrollbar_start_forwardE"] @@ -4464,8 +4458,6 @@ cfg_if! { pub static nsGkAtoms__moz_is_resource_document: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms28_moz_swipe_animation_enabledE"] pub static nsGkAtoms__moz_swipe_animation_enabled: *mut nsAtom; - #[link_name = "_ZN9nsGkAtoms25_moz_physical_home_buttonE"] - pub static nsGkAtoms__moz_physical_home_button: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms4BackE"] pub static nsGkAtoms_Back: *mut nsAtom; #[link_name = "_ZN9nsGkAtoms7ForwardE"] @@ -9539,8 +9531,6 @@ cfg_if! { pub static nsGkAtoms_forcemessagemanager: *mut nsAtom; #[link_name = "?isPreloadBrowser@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms_isPreloadBrowser: *mut nsAtom; - #[link_name = "?color_picker_available@nsGkAtoms@@2PEAVnsAtom@@EA"] - pub static nsGkAtoms_color_picker_available: *mut nsAtom; #[link_name = "?scrollbar_start_backward@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms_scrollbar_start_backward: *mut nsAtom; #[link_name = "?scrollbar_start_forward@nsGkAtoms@@2PEAVnsAtom@@EA"] @@ -9571,8 +9561,6 @@ cfg_if! { pub static nsGkAtoms_menubar_drag: *mut nsAtom; #[link_name = "?swipe_animation_enabled@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms_swipe_animation_enabled: *mut nsAtom; - #[link_name = "?physical_home_button@nsGkAtoms@@2PEAVnsAtom@@EA"] - pub static nsGkAtoms_physical_home_button: *mut nsAtom; #[link_name = "?windows_classic@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms_windows_classic: *mut nsAtom; #[link_name = "?windows_theme_aero@nsGkAtoms@@2PEAVnsAtom@@EA"] @@ -9591,8 +9579,6 @@ cfg_if! { pub static nsGkAtoms_windows_theme_zune: *mut nsAtom; #[link_name = "?windows_theme_generic@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms_windows_theme_generic: *mut nsAtom; - #[link_name = "?_moz_color_picker_available@nsGkAtoms@@2PEAVnsAtom@@EA"] - pub static nsGkAtoms__moz_color_picker_available: *mut nsAtom; #[link_name = "?_moz_scrollbar_start_backward@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms__moz_scrollbar_start_backward: *mut nsAtom; #[link_name = "?_moz_scrollbar_start_forward@nsGkAtoms@@2PEAVnsAtom@@EA"] @@ -9635,8 +9621,6 @@ cfg_if! { pub static nsGkAtoms__moz_is_resource_document: *mut nsAtom; #[link_name = "?_moz_swipe_animation_enabled@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms__moz_swipe_animation_enabled: *mut nsAtom; - #[link_name = "?_moz_physical_home_button@nsGkAtoms@@2PEAVnsAtom@@EA"] - pub static nsGkAtoms__moz_physical_home_button: *mut nsAtom; #[link_name = "?Back@nsGkAtoms@@2PEAVnsAtom@@EA"] pub static nsGkAtoms_Back: *mut nsAtom; #[link_name = "?Forward@nsGkAtoms@@2PEAVnsAtom@@EA"] @@ -14710,8 +14694,6 @@ cfg_if! { pub static nsGkAtoms_forcemessagemanager: *mut nsAtom; #[link_name = "\x01?isPreloadBrowser@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms_isPreloadBrowser: *mut nsAtom; - #[link_name = "\x01?color_picker_available@nsGkAtoms@@2PAVnsAtom@@A"] - pub static nsGkAtoms_color_picker_available: *mut nsAtom; #[link_name = "\x01?scrollbar_start_backward@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms_scrollbar_start_backward: *mut nsAtom; #[link_name = "\x01?scrollbar_start_forward@nsGkAtoms@@2PAVnsAtom@@A"] @@ -14742,8 +14724,6 @@ cfg_if! { pub static nsGkAtoms_menubar_drag: *mut nsAtom; #[link_name = "\x01?swipe_animation_enabled@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms_swipe_animation_enabled: *mut nsAtom; - #[link_name = "\x01?physical_home_button@nsGkAtoms@@2PAVnsAtom@@A"] - pub static nsGkAtoms_physical_home_button: *mut nsAtom; #[link_name = "\x01?windows_classic@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms_windows_classic: *mut nsAtom; #[link_name = "\x01?windows_theme_aero@nsGkAtoms@@2PAVnsAtom@@A"] @@ -14762,8 +14742,6 @@ cfg_if! { pub static nsGkAtoms_windows_theme_zune: *mut nsAtom; #[link_name = "\x01?windows_theme_generic@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms_windows_theme_generic: *mut nsAtom; - #[link_name = "\x01?_moz_color_picker_available@nsGkAtoms@@2PAVnsAtom@@A"] - pub static nsGkAtoms__moz_color_picker_available: *mut nsAtom; #[link_name = "\x01?_moz_scrollbar_start_backward@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms__moz_scrollbar_start_backward: *mut nsAtom; #[link_name = "\x01?_moz_scrollbar_start_forward@nsGkAtoms@@2PAVnsAtom@@A"] @@ -14806,8 +14784,6 @@ cfg_if! { pub static nsGkAtoms__moz_is_resource_document: *mut nsAtom; #[link_name = "\x01?_moz_swipe_animation_enabled@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms__moz_swipe_animation_enabled: *mut nsAtom; - #[link_name = "\x01?_moz_physical_home_button@nsGkAtoms@@2PAVnsAtom@@A"] - pub static nsGkAtoms__moz_physical_home_button: *mut nsAtom; #[link_name = "\x01?Back@nsGkAtoms@@2PAVnsAtom@@A"] pub static nsGkAtoms_Back: *mut nsAtom; #[link_name = "\x01?Forward@nsGkAtoms@@2PAVnsAtom@@A"] @@ -19884,8 +19860,6 @@ macro_rules! atom { { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_forcemessagemanager as *mut _) } }; ("isPreloadBrowser") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_isPreloadBrowser as *mut _) } }; -("color-picker-available") => - { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_color_picker_available as *mut _) } }; ("scrollbar-start-backward") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_scrollbar_start_backward as *mut _) } }; ("scrollbar-start-forward") => @@ -19916,8 +19890,6 @@ macro_rules! atom { { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_menubar_drag as *mut _) } }; ("swipe-animation-enabled") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_swipe_animation_enabled as *mut _) } }; -("physical-home-button") => - { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_physical_home_button as *mut _) } }; ("windows-classic") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_windows_classic as *mut _) } }; ("windows-theme-aero") => @@ -19936,8 +19908,6 @@ macro_rules! atom { { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_windows_theme_zune as *mut _) } }; ("windows-theme-generic") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_windows_theme_generic as *mut _) } }; -("-moz-color-picker-available") => - { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_color_picker_available as *mut _) } }; ("-moz-scrollbar-start-backward") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_scrollbar_start_backward as *mut _) } }; ("-moz-scrollbar-start-forward") => @@ -19980,8 +19950,6 @@ macro_rules! atom { { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_is_resource_document as *mut _) } }; ("-moz-swipe-animation-enabled") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_swipe_animation_enabled as *mut _) } }; -("-moz-physical-home-button") => - { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_physical_home_button as *mut _) } }; ("Back") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_Back as *mut _) } }; ("Forward") => diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 4f835ea19e7..7375fba01ba 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -23,6 +23,7 @@ use gecko_bindings::structs::ServoRawOffsetArc; use gecko_bindings::structs::nsIContent; use gecko_bindings::structs::nsIDocument; use gecko_bindings::structs::nsIDocument_DocumentTheme; +use gecko_bindings::structs::nsSimpleContentList; use gecko_bindings::structs::RawGeckoAnimationPropertySegment; use gecko_bindings::structs::RawGeckoComputedTiming; use gecko_bindings::structs::RawGeckoCSSPropertyIDList; @@ -75,6 +76,7 @@ use gecko_bindings::structs::nsCSSFontFaceRule; use gecko_bindings::structs::nsCSSKeyword; use gecko_bindings::structs::nsCSSPropertyID; use gecko_bindings::structs::nsCSSPropertyIDSet; +use gecko_bindings::structs::nsCSSRect; use gecko_bindings::structs::nsCSSShadowArray; use gecko_bindings::structs::nsCSSUnit; use gecko_bindings::structs::nsCSSValue; @@ -2129,6 +2131,17 @@ extern "C" { arg2: RawServoSelectorListBorrowed) -> *const RawGeckoElement; } +extern "C" { + pub fn Servo_SelectorList_QueryFirst(arg1: RawGeckoNodeBorrowed, + arg2: RawServoSelectorListBorrowed) + -> *const RawGeckoElement; +} +extern "C" { + pub fn Servo_SelectorList_QueryAll(arg1: RawGeckoNodeBorrowed, + arg2: RawServoSelectorListBorrowed, + content_list: + *mut nsSimpleContentList); +} extern "C" { pub fn Servo_StyleSet_AddSizeOfExcludingThis(malloc_size_of: MallocSizeOf, malloc_enclosing_size_of: @@ -2733,7 +2746,8 @@ extern "C" { pub fn Servo_DeclarationBlock_RemovePropertyById(declarations: RawServoDeclarationBlockBorrowed, property: - nsCSSPropertyID) -> bool; + nsCSSPropertyID) + -> bool; } extern "C" { pub fn Servo_DeclarationBlock_HasCSSWideKeyword(declarations: @@ -3075,6 +3089,19 @@ extern "C" { *const ServoRawOffsetArc) -> ServoRawOffsetArc; } +extern "C" { + pub fn Servo_IsValidCSSColor(value: *const nsAString) -> bool; +} +extern "C" { + pub fn Servo_ComputeColor(set: RawServoStyleSetBorrowedOrNull, + current_color: nscolor, value: *const nsAString, + result_color: *mut nscolor) -> bool; +} +extern "C" { + pub fn Servo_ParseIntersectionObserverRootMargin(value: *const nsAString, + result: *mut nsCSSRect) + -> bool; +} extern "C" { pub fn Gecko_CreateCSSErrorReporter(sheet: *mut ServoStyleSheet, loader: *mut Loader, uri: *mut nsIURI) @@ -3102,3 +3129,8 @@ extern "C" { sourceLen: u32, lineNumber: u32, colNumber: u32); } +extern "C" { + pub fn Gecko_ContentList_AppendAll(aContentList: *mut nsSimpleContentList, + aElements: *mut *const RawGeckoElement, + aLength: usize); +} diff --git a/components/style/gecko/generated/structs.rs b/components/style/gecko/generated/structs.rs index 9b2dd110f1b..e2368cac928 100644 --- a/components/style/gecko/generated/structs.rs +++ b/components/style/gecko/generated/structs.rs @@ -1000,6 +1000,8 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; + pub type pair__PCCP = u8; + pub type pair__PCCFP = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1051,6 +1053,14 @@ pub mod root { #[allow(unused_imports)] use self::super::super::root; } + pub type __int8_t = ::std::os::raw::c_schar; + pub type __uint8_t = ::std::os::raw::c_uchar; + pub type __int16_t = ::std::os::raw::c_short; + pub type __uint16_t = ::std::os::raw::c_ushort; + pub type __int32_t = ::std::os::raw::c_int; + pub type __uint32_t = ::std::os::raw::c_uint; + pub type __int64_t = ::std::os::raw::c_long; + pub type __uint64_t = ::std::os::raw::c_ulong; pub mod mozilla { #[allow(unused_imports)] use self::super::super::root; @@ -1095,6 +1105,8 @@ pub mod root { pub type nsTStringRepr_substring_type = root::nsTSubstring; pub type nsTStringRepr_substring_tuple_type = root::nsTSubstringTuple; + pub type nsTStringRepr_literalstring_type = + root::nsTLiteralString; pub type nsTStringRepr_const_iterator = root::nsReadingIterator>; pub type nsTStringRepr_iterator = @@ -1111,8 +1123,6 @@ pub mod root { root::mozilla::detail::StringDataFlags; pub type nsTStringRepr_ClassFlags = root::mozilla::detail::StringClassFlags; - pub type nsTStringRepr_IsChar = u8; - pub type nsTStringRepr_IsChar16 = u8; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsTStringRepr_raw_type { @@ -1148,6 +1158,11 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct WeakReference { } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct FreePolicy { + pub _address: u8, + } } pub type Conditional_Type = A; #[repr(u32)] @@ -2313,7 +2328,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct SRIMetadata { - pub mHashes: root::nsTArray>, + pub mHashes: root::nsTArray, pub mIntegrityString: ::nsstring::nsStringRepr, pub mAlgorithm: root::nsCString, pub mAlgorithmType: i8, @@ -2817,6 +2832,11 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy, Clone)] + pub struct HTMLSlotElement { + _unused: [u8; 0], + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct TabGroup { _unused: [u8; 0], } @@ -3172,6 +3192,8 @@ pub mod root { /// An array of web component insertion points to which this element /// is distributed. pub mDestInsertionPoints: root::nsTArray<*mut root::nsIContent>, + /// The assigned slot associated with this element. + pub mAssignedSlot: root::RefPtr, /// XBL binding installed on the element. pub mXBLBinding: root::RefPtr, /// XBL binding installed on the lement. @@ -3184,7 +3206,7 @@ pub mod root { #[test] fn bindgen_test_layout_FragmentOrElement_nsExtendedDOMSlots() { assert_eq!(::std::mem::size_of::() - , 96usize , concat ! ( + , 104usize , concat ! ( "Size of: " , stringify ! ( FragmentOrElement_nsExtendedDOMSlots ) )); assert_eq! (::std::mem::align_of::() @@ -3267,17 +3289,26 @@ pub mod root { & ( * ( 0 as * const FragmentOrElement_nsExtendedDOMSlots - ) ) . mXBLBinding as * const _ as usize } , + ) ) . mAssignedSlot as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( FragmentOrElement_nsExtendedDOMSlots ) , "::" , + stringify ! ( mAssignedSlot ) )); + assert_eq! (unsafe { + & ( + * ( + 0 as * const FragmentOrElement_nsExtendedDOMSlots + ) ) . mXBLBinding as * const _ as usize } , + 72usize , concat ! ( + "Alignment of field: " , stringify ! ( + FragmentOrElement_nsExtendedDOMSlots ) , "::" , stringify ! ( mXBLBinding ) )); assert_eq! (unsafe { & ( * ( 0 as * const FragmentOrElement_nsExtendedDOMSlots ) ) . mXBLInsertionParent as * const _ as usize } - , 72usize , concat ! ( + , 80usize , concat ! ( "Alignment of field: " , stringify ! ( FragmentOrElement_nsExtendedDOMSlots ) , "::" , stringify ! ( mXBLInsertionParent ) )); @@ -3286,7 +3317,7 @@ pub mod root { * ( 0 as * const FragmentOrElement_nsExtendedDOMSlots ) ) . mCustomElementData as * const _ as usize } , - 80usize , concat ! ( + 88usize , concat ! ( "Alignment of field: " , stringify ! ( FragmentOrElement_nsExtendedDOMSlots ) , "::" , stringify ! ( mCustomElementData ) )); @@ -3295,7 +3326,7 @@ pub mod root { * ( 0 as * const FragmentOrElement_nsExtendedDOMSlots ) ) . mFrameLoaderOrOpener as * const _ as usize } - , 88usize , concat ! ( + , 96usize , concat ! ( "Alignment of field: " , stringify ! ( FragmentOrElement_nsExtendedDOMSlots ) , "::" , stringify ! ( mFrameLoaderOrOpener ) )); @@ -5663,6 +5694,7 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( Runnable ) )); } + pub type Preferences_PrefSetting = root::mozilla::dom::PrefSetting; #[repr(C)] #[derive(Debug)] pub struct CycleCollectedJSContext_RunInMetastableStateData { @@ -5774,47 +5806,38 @@ pub mod root { eUseCounter_DataTransfer_mozSourceNode_setter = 53, eUseCounter_custom_JS_asmjs = 54, eUseCounter_custom_JS_wasm = 55, - eUseCounter_GetAttributeNode = 56, - eUseCounter_SetAttributeNode = 57, - eUseCounter_GetAttributeNodeNS = 58, - eUseCounter_SetAttributeNodeNS = 59, - eUseCounter_RemoveAttributeNode = 60, - eUseCounter_CreateAttribute = 61, - eUseCounter_CreateAttributeNS = 62, - eUseCounter_NodeValue = 63, - eUseCounter_TextContent = 64, - eUseCounter_EnablePrivilege = 65, - eUseCounter_DOMExceptionCode = 66, - eUseCounter_MutationEvent = 67, - eUseCounter_Components = 68, - eUseCounter_PrefixedVisibilityAPI = 69, - eUseCounter_NodeIteratorDetach = 70, - eUseCounter_LenientThis = 71, - eUseCounter_GetPreventDefault = 72, - eUseCounter_GetSetUserData = 73, - eUseCounter_MozGetAsFile = 74, - eUseCounter_UseOfCaptureEvents = 75, - eUseCounter_UseOfReleaseEvents = 76, - eUseCounter_UseOfDOM3LoadMethod = 77, - eUseCounter_ChromeUseOfDOM3LoadMethod = 78, - eUseCounter_ShowModalDialog = 79, - eUseCounter_SyncXMLHttpRequest = 80, - eUseCounter_Window_Cc_ontrollers = 81, - eUseCounter_ImportXULIntoContent = 82, - eUseCounter_PannerNodeDoppler = 83, - eUseCounter_NavigatorGetUserMedia = 84, - eUseCounter_WebrtcDeprecatedPrefix = 85, - eUseCounter_RTCPeerConnectionGetStreams = 86, - eUseCounter_AppCache = 87, - eUseCounter_PrefixedImageSmoothingEnabled = 88, - eUseCounter_PrefixedFullscreenAPI = 89, - eUseCounter_LenientSetter = 90, - eUseCounter_FileLastModifiedDate = 91, - eUseCounter_ImageBitmapRenderingContext_TransferImageBitmap = 92, - eUseCounter_URLCreateObjectURL_MediaStream = 93, - eUseCounter_XMLBaseAttribute = 94, - eUseCounter_WindowContentUntrusted = 95, - eUseCounter_Count = 96, + eUseCounter_EnablePrivilege = 56, + eUseCounter_DOMExceptionCode = 57, + eUseCounter_MutationEvent = 58, + eUseCounter_Components = 59, + eUseCounter_PrefixedVisibilityAPI = 60, + eUseCounter_NodeIteratorDetach = 61, + eUseCounter_LenientThis = 62, + eUseCounter_GetPreventDefault = 63, + eUseCounter_GetSetUserData = 64, + eUseCounter_MozGetAsFile = 65, + eUseCounter_UseOfCaptureEvents = 66, + eUseCounter_UseOfReleaseEvents = 67, + eUseCounter_UseOfDOM3LoadMethod = 68, + eUseCounter_ChromeUseOfDOM3LoadMethod = 69, + eUseCounter_ShowModalDialog = 70, + eUseCounter_SyncXMLHttpRequest = 71, + eUseCounter_Window_Cc_ontrollers = 72, + eUseCounter_ImportXULIntoContent = 73, + eUseCounter_PannerNodeDoppler = 74, + eUseCounter_NavigatorGetUserMedia = 75, + eUseCounter_WebrtcDeprecatedPrefix = 76, + eUseCounter_RTCPeerConnectionGetStreams = 77, + eUseCounter_AppCache = 78, + eUseCounter_PrefixedImageSmoothingEnabled = 79, + eUseCounter_PrefixedFullscreenAPI = 80, + eUseCounter_LenientSetter = 81, + eUseCounter_FileLastModifiedDate = 82, + eUseCounter_ImageBitmapRenderingContext_TransferImageBitmap = 83, + eUseCounter_URLCreateObjectURL_MediaStream = 84, + eUseCounter_XMLBaseAttribute = 85, + eUseCounter_WindowContentUntrusted = 86, + eUseCounter_Count = 87, } /// This class holds all non-tree-structural state of an element that might be /// used for selector matching eventually. @@ -6616,6 +6639,8 @@ pub mod root { #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct OriginFlags(pub u8); + pub type ComputedKeyframeValues = + root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_open0_RawServoStyleSet_close0_instantiation() { assert_eq!(::std::mem::size_of::() , @@ -7042,25 +7067,6 @@ pub mod root { pub struct RestyleManager { _unused: [u8; 0], } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct XREAppData_NSFreePolicy { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_XREAppData_NSFreePolicy() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of: " , stringify ! ( XREAppData_NSFreePolicy ) - )); - assert_eq! (::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of " , stringify ! ( - XREAppData_NSFreePolicy ) )); - } - impl Clone for XREAppData_NSFreePolicy { - fn clone(&self) -> Self { *self } - } pub mod image { #[allow(unused_imports)] use self::super::super::super::root; @@ -8596,13 +8602,11 @@ pub mod root { eIntID_ScrollbarButtonAutoRepeatBehavior = 43, eIntID_TooltipDelay = 44, eIntID_SwipeAnimationEnabled = 45, - eIntID_ColorPickerAvailable = 46, - eIntID_PhysicalHomeButton = 47, - eIntID_ScrollbarDisplayOnMouseMove = 48, - eIntID_ScrollbarFadeBeginDelay = 49, - eIntID_ScrollbarFadeDuration = 50, - eIntID_ContextMenuOffsetVertical = 51, - eIntID_ContextMenuOffsetHorizontal = 52, + eIntID_ScrollbarDisplayOnMouseMove = 46, + eIntID_ScrollbarFadeBeginDelay = 47, + eIntID_ScrollbarFadeDuration = 48, + eIntID_ContextMenuOffsetVertical = 49, + eIntID_ContextMenuOffsetHorizontal = 50, } #[repr(u32)] /// Windows themes we currently detect. @@ -8846,73 +8850,72 @@ pub mod root { unresolved = 18, mozNativeAnonymous = 19, mozUseShadowTreeRoot = 20, - mozSystemMetric = 21, - mozLocaleDir = 22, - mozLWTheme = 23, - mozLWThemeBrightText = 24, - mozLWThemeDarkText = 25, - mozWindowInactive = 26, - mozTableBorderNonzero = 27, - mozBrowserFrame = 28, - scope = 29, - negation = 30, - dir = 31, - link = 32, - mozAnyLink = 33, - anyLink = 34, - visited = 35, - active = 36, - checked = 37, - disabled = 38, - enabled = 39, - focus = 40, - focusWithin = 41, - hover = 42, - mozDragOver = 43, - target = 44, - indeterminate = 45, - mozDevtoolsHighlighted = 46, - mozStyleeditorTransitioning = 47, - fullscreen = 48, - mozFullScreen = 49, - mozFocusRing = 50, - mozBroken = 51, - mozLoading = 52, - mozUserDisabled = 53, - mozSuppressed = 54, - mozHandlerClickToPlay = 55, - mozHandlerVulnerableUpdatable = 56, - mozHandlerVulnerableNoUpdate = 57, - mozHandlerDisabled = 58, - mozHandlerBlocked = 59, - mozHandlerCrashed = 60, - mozMathIncrementScriptLevel = 61, - mozHasDirAttr = 62, - mozDirAttrLTR = 63, - mozDirAttrRTL = 64, - mozDirAttrLikeAuto = 65, - mozAutofill = 66, - mozAutofillPreview = 67, - required = 68, - optional = 69, - valid = 70, - invalid = 71, - inRange = 72, - outOfRange = 73, - defaultPseudo = 74, - placeholderShown = 75, - mozReadOnly = 76, - mozReadWrite = 77, - mozSubmitInvalid = 78, - mozUIInvalid = 79, - mozUIValid = 80, - mozMeterOptimum = 81, - mozMeterSubOptimum = 82, - mozMeterSubSubOptimum = 83, - mozPlaceholder = 84, - Count = 85, - NotPseudo = 86, - MAX = 87, + mozLocaleDir = 21, + mozLWTheme = 22, + mozLWThemeBrightText = 23, + mozLWThemeDarkText = 24, + mozWindowInactive = 25, + mozTableBorderNonzero = 26, + mozBrowserFrame = 27, + scope = 28, + negation = 29, + dir = 30, + link = 31, + mozAnyLink = 32, + anyLink = 33, + visited = 34, + active = 35, + checked = 36, + disabled = 37, + enabled = 38, + focus = 39, + focusWithin = 40, + hover = 41, + mozDragOver = 42, + target = 43, + indeterminate = 44, + mozDevtoolsHighlighted = 45, + mozStyleeditorTransitioning = 46, + fullscreen = 47, + mozFullScreen = 48, + mozFocusRing = 49, + mozBroken = 50, + mozLoading = 51, + mozUserDisabled = 52, + mozSuppressed = 53, + mozHandlerClickToPlay = 54, + mozHandlerVulnerableUpdatable = 55, + mozHandlerVulnerableNoUpdate = 56, + mozHandlerDisabled = 57, + mozHandlerBlocked = 58, + mozHandlerCrashed = 59, + mozMathIncrementScriptLevel = 60, + mozHasDirAttr = 61, + mozDirAttrLTR = 62, + mozDirAttrRTL = 63, + mozDirAttrLikeAuto = 64, + mozAutofill = 65, + mozAutofillPreview = 66, + required = 67, + optional = 68, + valid = 69, + invalid = 70, + inRange = 71, + outOfRange = 72, + defaultPseudo = 73, + placeholderShown = 74, + mozReadOnly = 75, + mozReadWrite = 76, + mozSubmitInvalid = 77, + mozUIInvalid = 78, + mozUIValid = 79, + mozMeterOptimum = 80, + mozMeterSubOptimum = 81, + mozMeterSubSubOptimum = 82, + mozPlaceholder = 83, + Count = 84, + NotPseudo = 85, + MAX = 86, } #[repr(C)] #[derive(Debug)] @@ -9667,6 +9670,8 @@ pub mod root { root::mozilla::detail::nsTStringRepr; pub type nsTSubstring_substring_type = root::nsTSubstring_base_string_type; + pub type nsTSubstring_literalstring_type = + root::nsTSubstring_base_string_type; pub type nsTSubstring_fallible_t = root::nsTSubstring_base_string_type; pub type nsTSubstring_char_type = @@ -9728,6 +9733,7 @@ pub mod root { pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsTString_self_type = root::nsTString; + pub type nsTString_literalstring_type = [u8; 0usize]; pub type nsTString_fallible_t = [u8; 0usize]; pub type nsTString_char_type = [u8; 0usize]; pub type nsTString_substring_tuple_type = [u8; 0usize]; @@ -9765,6 +9771,8 @@ pub mod root { root::nsTAutoStringN_base_string_type; pub type nsTAutoStringN_substring_tuple_type = root::nsTAutoStringN_base_string_type; + pub type nsTAutoStringN_literalstring_type = + root::nsTAutoStringN_base_string_type; pub type nsTAutoStringN_DataFlags = root::nsTAutoStringN_base_string_type; pub type nsTAutoStringN_ClassFlags = @@ -9777,6 +9785,32 @@ pub mod root { pub vtable_: *const nsTStringComparator__bindgen_vtable, } pub type nsTStringComparator_char_type = T; + /// nsTLiteralString_CharT + /// + /// Stores a null-terminated, immutable sequence of characters. + /// + /// nsTString-lookalike that restricts its string value to a literal character + /// sequence. Can be implicitly cast to const nsTString& (the const is + /// essential, since this class's data are not writable). The data are assumed + /// to be static (permanent) and therefore, as an optimization, this class + /// does not have a destructor. + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsTLiteralString { + pub _base: root::mozilla::detail::nsTStringRepr, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, + } + pub type nsTLiteralString_self_type = root::nsTLiteralString; + pub type nsTLiteralString_char_type = [u8; 0usize]; + pub type nsTLiteralString_size_type = [u8; 0usize]; + pub type nsTLiteralString_DataFlags = [u8; 0usize]; + pub type nsTLiteralString_ClassFlags = [u8; 0usize]; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsTLiteralString_raw_type { + pub _address: u8, + } + pub type nsTLiteralString_raw_type_type = *mut N; pub type nsAString = root::nsTSubstring; pub type nsAutoString = [u64; 19usize]; pub type nsACString = root::nsTSubstring<::std::os::raw::c_char>; @@ -11490,7 +11524,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, + pub featureSelectors: root::nsTArray, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -11595,7 +11629,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<::std::os::raw::c_uint>, + pub mValues: root::nsTArray, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -11693,7 +11727,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -12287,6 +12321,130 @@ pub mod root { pub struct nsRestyleHint(pub u32); #[repr(C)] #[derive(Debug)] + pub struct nsAtom { + pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, + pub _bitfield_1: u32, + pub mHash: u32, + pub mString: *mut u16, + } + #[repr(u8)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum nsAtom_AtomKind { + DynamicAtom = 0, + StaticAtom = 1, + HTML5Atom = 2, + } + pub type nsAtom_HasThreadSafeRefCnt = root::mozilla::TrueType; + #[test] + fn bindgen_test_layout_nsAtom() { + assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( + "Size of: " , stringify ! ( nsAtom ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of " , stringify ! ( nsAtom ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsAtom ) ) . mRefCnt as * const _ as + usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( nsAtom ) , "::" , + stringify ! ( mRefCnt ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsAtom ) ) . mHash as * const _ as + usize } , 12usize , concat ! ( + "Alignment of field: " , stringify ! ( nsAtom ) , "::" , + stringify ! ( mHash ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsAtom ) ) . mString as * const _ as + usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( nsAtom ) , "::" , + stringify ! ( mString ) )); + } + impl nsAtom { + #[inline] + pub fn mLength(&self) -> u32 { + let mut unit_field_val: u32 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as + *mut u32 as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 1073741823u64 as u32; + let val = (unit_field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u32) } + } + #[inline] + pub fn set_mLength(&mut self, val: u32) { + let mask = 1073741823u64 as u32; + let val = val as u32 as u32; + let mut unit_field_val: u32 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as + *mut u32 as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 0usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn mKind(&self) -> u32 { + let mut unit_field_val: u32 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as + *mut u32 as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 3221225472u64 as u32; + let val = (unit_field_val & mask) >> 30usize; + unsafe { ::std::mem::transmute(val as u32) } + } + #[inline] + pub fn set_mKind(&mut self, val: u32) { + let mask = 3221225472u64 as u32; + let val = val as u32 as u32; + let mut unit_field_val: u32 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as + *mut u32 as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 30usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn new_bitfield_1(mLength: u32, mKind: u32) -> u32 { + ({ + ({ 0 } | + ((mLength as u32 as u32) << 0usize) & + (1073741823u64 as u32)) + } | ((mKind as u32 as u32) << 30usize) & (3221225472u64 as u32)) + } + } + #[repr(C)] + #[derive(Debug)] pub struct nsStyleFont { pub mFont: root::nsFont, pub mSize: root::nscoord, @@ -14696,130 +14854,6 @@ pub mod root { "::" , stringify ! ( mStorageSize ) )); } #[repr(C)] - #[derive(Debug)] - pub struct nsAtom { - pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, - pub _bitfield_1: u32, - pub mHash: u32, - pub mString: *mut u16, - } - #[repr(u8)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum nsAtom_AtomKind { - DynamicAtom = 0, - StaticAtom = 1, - HTML5Atom = 2, - } - pub type nsAtom_HasThreadSafeRefCnt = root::mozilla::TrueType; - #[test] - fn bindgen_test_layout_nsAtom() { - assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( - "Size of: " , stringify ! ( nsAtom ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of " , stringify ! ( nsAtom ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsAtom ) ) . mRefCnt as * const _ as - usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( nsAtom ) , "::" , - stringify ! ( mRefCnt ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsAtom ) ) . mHash as * const _ as - usize } , 12usize , concat ! ( - "Alignment of field: " , stringify ! ( nsAtom ) , "::" , - stringify ! ( mHash ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsAtom ) ) . mString as * const _ as - usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( nsAtom ) , "::" , - stringify ! ( mString ) )); - } - impl nsAtom { - #[inline] - pub fn mLength(&self) -> u32 { - let mut unit_field_val: u32 = - unsafe { ::std::mem::uninitialized() }; - unsafe { - ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ - as *const u8, - &mut unit_field_val as - *mut u32 as *mut u8, - ::std::mem::size_of::()) - }; - let mask = 1073741823u64 as u32; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::std::mem::transmute(val as u32) } - } - #[inline] - pub fn set_mLength(&mut self, val: u32) { - let mask = 1073741823u64 as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = - unsafe { ::std::mem::uninitialized() }; - unsafe { - ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ - as *const u8, - &mut unit_field_val as - *mut u32 as *mut u8, - ::std::mem::size_of::()) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; - unsafe { - ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as - *const u8, - &mut self._bitfield_1 as - *mut _ as *mut u8, - ::std::mem::size_of::()); - } - } - #[inline] - pub fn mKind(&self) -> u32 { - let mut unit_field_val: u32 = - unsafe { ::std::mem::uninitialized() }; - unsafe { - ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ - as *const u8, - &mut unit_field_val as - *mut u32 as *mut u8, - ::std::mem::size_of::()) - }; - let mask = 3221225472u64 as u32; - let val = (unit_field_val & mask) >> 30usize; - unsafe { ::std::mem::transmute(val as u32) } - } - #[inline] - pub fn set_mKind(&mut self, val: u32) { - let mask = 3221225472u64 as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = - unsafe { ::std::mem::uninitialized() }; - unsafe { - ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ - as *const u8, - &mut unit_field_val as - *mut u32 as *mut u8, - ::std::mem::size_of::()) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 30usize) & mask; - unsafe { - ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as - *const u8, - &mut self._bitfield_1 as - *mut _ as *mut u8, - ::std::mem::size_of::()); - } - } - #[inline] - pub fn new_bitfield_1(mLength: u32, mKind: u32) -> u32 { - ({ - ({ 0 } | - ((mLength as u32 as u32) << 0usize) & - (1073741823u64 as u32)) - } | ((mKind as u32 as u32) << 30usize) & (3221225472u64 as u32)) - } - } - #[repr(C)] #[derive(Debug, Copy)] pub struct nsIPrincipal { pub _base: root::nsISerializable, @@ -15228,7 +15262,7 @@ pub mod root { /// An object implementing nsIDOMNodeList for this content (childNodes) /// @see nsIDOMNodeList /// @see nsGenericHTMLElement::GetChildNodes - pub mChildNodes: root::RefPtr, + pub mChildNodes: root::RefPtr, /// Weak reference to this node. This is cleared by the destructor of /// nsNodeWeakReference. pub mWeakReference: *mut root::nsNodeWeakReference, @@ -15965,7 +15999,8 @@ pub mod root { pub _base_1: root::mozilla::dom::DispatcherTrait, pub mDeprecationWarnedAbout: u64, pub mDocWarningWarnedAbout: u64, - pub mSelectorCache: root::nsAutoPtr, + pub mServoSelectorCache: root::mozilla::UniquePtr, + pub mGeckoSelectorCache: root::mozilla::UniquePtr, pub mReferrer: root::nsCString, pub mLastModified: ::nsstring::nsStringRepr, pub mDocumentURI: root::nsCOMPtr, @@ -15983,7 +16018,7 @@ pub mod root { pub mUpgradeInsecurePreloads: bool, pub mHSTSPrimingURIList: [u64; 4usize], pub mDocumentContainer: u64, - pub mCharacterSet: root::mozilla::NotNull<*const root::mozilla::Encoding>, + pub mCharacterSet: root::mozilla::NotNull<*const root::nsIDocument_Encoding>, pub mCharacterSetSource: i32, pub mParentDocument: *mut root::nsIDocument, pub mCachedRootElement: *mut root::mozilla::dom::Element, @@ -16032,7 +16067,7 @@ pub mod root { /// The current frame request callback handle pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -16055,6 +16090,7 @@ pub mod root { pub mTrackingScripts: [u64; 4usize], pub mBufferedCSPViolations: root::nsTArray, pub mAncestorPrincipals: root::nsTArray, + pub mAncestorOuterWindowIDs: root::nsTArray, pub mServoRestyleRoot: root::nsCOMPtr, pub mServoRestyleRootDirtyBits: u32, } @@ -16316,47 +16352,38 @@ pub mod root { #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsIDocument_DeprecatedOperations { - eGetAttributeNode = 0, - eSetAttributeNode = 1, - eGetAttributeNodeNS = 2, - eSetAttributeNodeNS = 3, - eRemoveAttributeNode = 4, - eCreateAttribute = 5, - eCreateAttributeNS = 6, - eNodeValue = 7, - eTextContent = 8, - eEnablePrivilege = 9, - eDOMExceptionCode = 10, - eMutationEvent = 11, - eComponents = 12, - ePrefixedVisibilityAPI = 13, - eNodeIteratorDetach = 14, - eLenientThis = 15, - eGetPreventDefault = 16, - eGetSetUserData = 17, - eMozGetAsFile = 18, - eUseOfCaptureEvents = 19, - eUseOfReleaseEvents = 20, - eUseOfDOM3LoadMethod = 21, - eChromeUseOfDOM3LoadMethod = 22, - eShowModalDialog = 23, - eSyncXMLHttpRequest = 24, - eWindow_Cc_ontrollers = 25, - eImportXULIntoContent = 26, - ePannerNodeDoppler = 27, - eNavigatorGetUserMedia = 28, - eWebrtcDeprecatedPrefix = 29, - eRTCPeerConnectionGetStreams = 30, - eAppCache = 31, - ePrefixedImageSmoothingEnabled = 32, - ePrefixedFullscreenAPI = 33, - eLenientSetter = 34, - eFileLastModifiedDate = 35, - eImageBitmapRenderingContext_TransferImageBitmap = 36, - eURLCreateObjectURL_MediaStream = 37, - eXMLBaseAttribute = 38, - eWindowContentUntrusted = 39, - eDeprecatedOperationCount = 40, + eEnablePrivilege = 0, + eDOMExceptionCode = 1, + eMutationEvent = 2, + eComponents = 3, + ePrefixedVisibilityAPI = 4, + eNodeIteratorDetach = 5, + eLenientThis = 6, + eGetPreventDefault = 7, + eGetSetUserData = 8, + eMozGetAsFile = 9, + eUseOfCaptureEvents = 10, + eUseOfReleaseEvents = 11, + eUseOfDOM3LoadMethod = 12, + eChromeUseOfDOM3LoadMethod = 13, + eShowModalDialog = 14, + eSyncXMLHttpRequest = 15, + eWindow_Cc_ontrollers = 16, + eImportXULIntoContent = 17, + ePannerNodeDoppler = 18, + eNavigatorGetUserMedia = 19, + eWebrtcDeprecatedPrefix = 20, + eRTCPeerConnectionGetStreams = 21, + eAppCache = 22, + ePrefixedImageSmoothingEnabled = 23, + ePrefixedFullscreenAPI = 24, + eLenientSetter = 25, + eFileLastModifiedDate = 26, + eImageBitmapRenderingContext_TransferImageBitmap = 27, + eURLCreateObjectURL_MediaStream = 28, + eXMLBaseAttribute = 29, + eWindowContentUntrusted = 30, + eDeprecatedOperationCount = 31, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -16413,7 +16440,7 @@ pub mod root { pub const nsIDocument_kSegmentSize: usize = 128; #[test] fn bindgen_test_layout_nsIDocument() { - assert_eq!(::std::mem::size_of::() , 872usize , concat ! + assert_eq!(::std::mem::size_of::() , 888usize , concat ! ( "Size of: " , stringify ! ( nsIDocument ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsIDocument ) )); @@ -19045,7 +19072,7 @@ pub mod root { pub _base: root::nsStubMutationObserver, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub mBoundContentSet: u64, - pub mWrapperTable: u64, + pub mWrapperTable: root::nsAutoPtr, pub mDocumentTable: u64, pub mLoadingDocTable: u64, pub mAttachedStack: root::nsBindingList, @@ -19331,14 +19358,6 @@ pub mod root { pub mPseudoTag: root::RefPtr, pub mBits: u64, } - pub const nsStyleContext_kAllResolvedStructs: - root::nsStyleContext__bindgen_ty_1 = - nsStyleContext__bindgen_ty_1::kAllResolvedStructs; - #[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum nsStyleContext__bindgen_ty_1 { - kAllResolvedStructs = 4294967295, - } #[test] fn bindgen_test_layout_nsStyleContext() { assert_eq!(::std::mem::size_of::() , 16usize , concat @@ -22739,7 +22758,7 @@ pub mod root { pub struct nsIGlobalObject { pub _base: root::nsISupports, pub _base_1: root::mozilla::dom::DispatcherTrait, - pub mHostObjectURIs: root::nsTArray>, + pub mHostObjectURIs: root::nsTArray, pub mIsDying: bool, } #[repr(C)] @@ -22853,7 +22872,7 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy, Clone)] - pub struct nsAttrChildContentList { + pub struct nsChildContentList { _unused: [u8; 0], } #[repr(C)] @@ -24146,57 +24165,57 @@ pub mod root { pub struct RawServoSelectorList { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = - _bindgen_ty_83::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_83 { + pub enum _bindgen_ty_77 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -26074,6 +26093,11 @@ pub mod root { , stringify ! ( mValue ) )); } #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsSimpleContentList { + _unused: [u8; 0], + } + #[repr(C)] #[derive(Debug, Copy)] pub struct nsTimingFunction { pub mType: root::nsTimingFunction_Type, @@ -26233,7 +26257,7 @@ pub mod root { pub type RawGeckoPropertyValuePairList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoStyleAnimationList = root::nsStyleAutoArray; pub type RawGeckoFontFaceRuleList = @@ -28343,7 +28367,7 @@ pub mod root { pub _base_4: root::nsITimedChannel, pub mRefCnt: root::nsAutoRefCnt, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mTabGroup: root::RefPtr, @@ -30196,7 +30220,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct nsBorderColors { - pub mColors: [root::nsTArray<::std::os::raw::c_uint>; 4usize], + pub mColors: [root::nsTArray; 4usize], } #[test] fn bindgen_test_layout_nsBorderColors() { @@ -30220,8 +30244,7 @@ pub mod root { pub mQuotePairs: root::nsStyleQuoteValues_QuotePairArray, } pub type nsStyleQuoteValues_QuotePairArray = - root::nsTArray>; + root::nsTArray>; pub type nsStyleQuoteValues_HasThreadSafeRefCnt = root::mozilla::TrueType; #[test] fn bindgen_test_layout_nsStyleQuoteValues() { @@ -31638,51 +31661,51 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsISMILAttr ) )); } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_SHARED_RESTYLE_BITS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BITS; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = - _bindgen_ty_85::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_SHARED_RESTYLE_BITS: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BITS; + 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_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 + 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_85::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_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_HAS_CHILD_WITH_LATER_SIBLINGS_HINT: root::_bindgen_ty_85 + 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_HAS_CHILD_WITH_LATER_SIBLINGS_HINT: root::_bindgen_ty_79 = - _bindgen_ty_85::ELEMENT_HAS_CHILD_WITH_LATER_SIBLINGS_HINT; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + _bindgen_ty_79::ELEMENT_HAS_CHILD_WITH_LATER_SIBLINGS_HINT; + 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_85 { + pub enum _bindgen_ty_79 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -32347,28 +32370,15 @@ pub mod root { root::nsTString<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsCString_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_nsTString_open0_char_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_UniquePtr_open0_JSErrorNotes_DeletePolicy_open1_JSErrorNotes_close1_close0_instantiation() { @@ -32485,26 +32495,26 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxFontFeatureValueSet_ValueList_close0_instantiation() { @@ -32520,37 +32530,37 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_3() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_4() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_4() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxAlternateValue_close0_instantiation() { @@ -32586,18 +32596,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214713_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_191979_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32608,6 +32618,17 @@ pub mod root { root::nsTArray<*mut root::nsCSSSelector> ) )); } #[test] + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) )); + } + #[test] fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -32619,6 +32640,17 @@ pub mod root { root::RefPtr ) )); } #[test] + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] fn __bindgen_test_layout_RefPtr_open0_nsStyleImageRequest_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -32707,7 +32739,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation_1() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32718,7 +32750,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_1() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_2() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32786,7 +32818,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation_1() { + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation_2() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32797,7 +32829,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_2() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_3() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32964,29 +32996,18 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216526_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_193764_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33041,15 +33062,15 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAttrChildContentList_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_RefPtr_open0_nsChildContentList_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::RefPtr ) )); } #[test] fn __bindgen_test_layout_UniquePtr_open0_LinkedList_open1_nsRange_close1_DefaultDelete_open1_LinkedList_open2_nsRange_close2_close1_close0_instantiation() { @@ -33151,7 +33172,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_222123__bindgen_ty_id_222130_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_199351__bindgen_ty_id_199358_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33294,65 +33315,6 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char_close1_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_nsTString_open0_char_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char_close1_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_nsTString_open0_char_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIPrincipal_close1_close0_instantiation_1() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -33375,6 +33337,83 @@ pub mod root { root::nsCOMPtr ) )); } #[test] + fn __bindgen_test_layout_nsTArray_open0_uint64_t_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_nsCString_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_nsCString_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIPrincipal_close1_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_uint64_t_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIRunnable_close1_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -33546,15 +33585,15 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224685_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_201990_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation() { @@ -33614,15 +33653,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224990_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_202295_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation_1() { @@ -33649,15 +33688,52 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsIDocument_SelectorCache_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_UniquePtr_open0_nsIDocument_SelectorCache_DefaultDelete_open1_nsIDocument_SelectorCache_close1_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsAutoPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::mozilla::UniquePtr ) + )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsAutoPtr ) )); + root::mozilla::UniquePtr ) + )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_open0_nsIDocument_SelectorCache_close0_instantiation() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_open0_nsIDocument_SelectorCache_DefaultDelete_open1_nsIDocument_SelectorCache_close1_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) + )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) + )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_open0_nsIDocument_SelectorCache_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation() { @@ -33726,16 +33802,16 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_225541_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_202855_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); - assert_eq!(::std::mem::align_of::>() + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); } #[test] @@ -33937,26 +34013,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIWeakReference_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , + fn __bindgen_test_layout_nsTArray_open0_nsWeakPtr_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocumentEncoder_close0_instantiation() { @@ -34071,7 +34136,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIPrincipal_close1_close0_instantiation_2() { + fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIPrincipal_close1_close0_instantiation_3() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34082,7 +34147,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_2() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_3() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34093,6 +34158,17 @@ pub mod root { root::nsCOMPtr ) )); } #[test] + fn __bindgen_test_layout_nsTArray_open0_uint64_t_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsINode_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( @@ -34161,7 +34237,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225970_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_203294_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34205,7 +34281,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_3() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_4() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34227,28 +34303,15 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char_close1_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsCString_close0_instantiation_3() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_nsTString_open0_char_close0_instantiation_4() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_ServoStyleSheet_close1_close0_instantiation() { @@ -34277,7 +34340,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226384_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_203714_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34400,29 +34463,18 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227343_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_204693_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34453,13 +34505,17 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsInterfaceHashtable_open1_nsISupportsHashKey_nsIXPConnectWrappedJS_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) + fn __bindgen_test_layout_nsAutoPtr_open0_nsBindingManager_WrapperHashtable_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsAutoPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - u64 ) )); + root::nsAutoPtr ) + )); } #[test] fn __bindgen_test_layout_nsAutoPtr_open0_nsRefPtrHashtable_open1_nsURIHashKey_nsXBLDocumentInfo_close1_close0_instantiation() { @@ -34489,7 +34545,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_3() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_4() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34511,7 +34567,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227653_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_205014_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34522,7 +34578,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227658_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_205019_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34533,7 +34589,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_4() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_5() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34579,7 +34635,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_228135_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_205500_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34746,7 +34802,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_5() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_6() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34768,7 +34824,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_6() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_7() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34878,29 +34934,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_7() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_4() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_5() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34911,7 +34945,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_5() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_6() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34944,53 +34978,29 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char_close1_close0_instantiation_4() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsCString_close0_instantiation_4() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char_close0_instantiation_5() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTString<::std::os::raw::c_char> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_Element_close0_instantiation() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsDOMAttributeMap_Element_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35205,7 +35215,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_6() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_7() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35216,7 +35226,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35227,7 +35237,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_230823_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_208178_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35306,7 +35316,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236867_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214306_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35396,7 +35406,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239176_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216713_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35407,28 +35417,17 @@ pub mod root { root::nsTArray<*mut root::nsISupports> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_3() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_4() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_10() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( @@ -35561,28 +35560,17 @@ pub mod root { root::nsStyleAutoArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_4() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_4() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_5() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_SheetLoadData_close1_close0_instantiation() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -35688,7 +35676,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241338_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_218867_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35736,28 +35724,17 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_5() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_5() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_6() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_10() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35804,7 +35781,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243710_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_221107_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35837,28 +35814,17 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_6() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_6() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_7() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_UniquePtr_open0_URLParams_DefaultDelete_open1_URLParams_close1_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35883,28 +35849,17 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_7() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_7() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_8() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_URLParams_Param_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35916,7 +35871,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_open0_const_char_XREAppData_NSFreePolicy_close0_instantiation() { + fn __bindgen_test_layout_UniquePtr_open0_const_char_FreePolicy_open1_const_char_close1_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35927,6 +35882,17 @@ pub mod root { root::mozilla::UniquePtr<::std::os::raw::c_char> ) )); } #[test] + fn __bindgen_test_layout_FreePolicy_open0_const_char_close0_instantiation() { + assert_eq!(::std::mem::size_of::() + , 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::detail::FreePolicy ) )); + assert_eq!(::std::mem::align_of::() + , 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::detail::FreePolicy ) )); + } + #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIEventTarget_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( @@ -35971,15 +35937,15 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_ImageURL_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_RefPtr_open0_imgRequestProxy_ImageURL_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::RefPtr ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation() { @@ -36059,28 +36025,17 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_8() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_8() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_9() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_nsCSSValueGradientStop_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36114,7 +36069,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_7() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_8() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36125,72 +36080,39 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_9() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_9() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_10() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_10() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_10() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_11() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_11() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_11() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_12() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_nsStyleGradientStop_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36358,18 +36280,18 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_5() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nscolor_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_pair_open1_nsTString_open2_char16_t_close2_nsTString_open2_char16_t_close2_close1_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0_pair_open1_nsString_nsString_close1_close0_instantiation() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -36384,44 +36306,18 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_pair_open0_nsTString_open1_char16_t_close1_nsTString_open1_char16_t_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_pair_open0_nsString_nsString_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> - ) )); - assert_eq!(::std::mem::align_of::>() + root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> - ) )); + root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_13() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_14() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTArray_open1_nsTString_open2_char16_t_close2_close1_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0_nsTArray_open1_nsString_close1_close0_instantiation() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36432,28 +36328,17 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_12() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_12() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_15() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_nsStyleCoord_close0_instantiation_1() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36476,50 +36361,28 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_13() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_13() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_16() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_14() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_14() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_17() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_11() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36680,7 +36543,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246058_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223421_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36818,7 +36681,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_8() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_9() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36851,7 +36714,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249947_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227416_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36862,7 +36725,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249952_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227421_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36950,7 +36813,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_250065_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_227538_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36961,6 +36824,17 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] + fn __bindgen_test_layout_RefPtr_open0_HTMLSlotElement_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] fn __bindgen_test_layout_RefPtr_open0_nsXBLBinding_close0_instantiation_1() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -37211,7 +37085,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251791_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229278_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37233,7 +37107,29 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251949_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0_uintptr_t_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_uintptr_t_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229434_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37244,7 +37140,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251954_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229439_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37277,7 +37173,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_6() { + fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37288,28 +37184,17 @@ pub mod root { root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsTString_open1_char16_t_close1_close0_instantiation_15() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsString_close0_instantiation_15() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTString_open0_char16_t_close0_instantiation_18() { - assert_eq!(::std::mem::size_of::<::nsstring::nsStringRepr>() , 16usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - assert_eq!(::std::mem::align_of::<::nsstring::nsStringRepr>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - ::nsstring::nsStringRepr ) )); - } - #[test] fn __bindgen_test_layout_UniquePtr_open0_nsStyleGridTemplate_DefaultDelete_open1_nsStyleGridTemplate_close1_close0_instantiation_2() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -37398,18 +37283,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_254403_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231910_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37420,7 +37305,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_254409_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231916_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! (