From 10560ae0439f3ee719e135c705cc7844d6c8c89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 12 May 2017 15:51:46 +0200 Subject: [PATCH 1/9] Bug 1364412: Allow pseudo-element selectors to store state. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: CzAwg2uxqO2 Signed-off-by: Emilio Cobos Álvarez --- components/selectors/parser.rs | 24 +++--- components/style/gecko/selector_parser.rs | 92 +++++++++++++++++++++-- components/style/servo/selector_parser.rs | 19 ++++- components/style/stylist.rs | 4 +- 4 files changed, 117 insertions(+), 22 deletions(-) diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs index 606fd6f479d..7c0f53ab0a6 100644 --- a/components/selectors/parser.rs +++ b/components/selectors/parser.rs @@ -61,7 +61,7 @@ macro_rules! with_all_bounds { type NonTSPseudoClass: $($CommonBounds)* + Sized + ToCss + SelectorMethods; /// pseudo-elements - type PseudoElement: $($CommonBounds)* + Sized + ToCss; + type PseudoElementSelector: $($CommonBounds)* + Sized + ToCss; } } } @@ -98,8 +98,8 @@ pub trait Parser { Err(()) } - fn parse_pseudo_element(&self, _name: Cow) - -> Result<::PseudoElement, ()> { + fn parse_pseudo_element(&self, _name: Cow, _input: &mut CssParser) + -> Result<::PseudoElementSelector, ()> { Err(()) } @@ -179,7 +179,7 @@ impl SelectorInner { #[derive(PartialEq, Eq, Hash, Clone)] pub struct Selector { pub inner: SelectorInner, - pub pseudo_element: Option, + pub pseudo_element: Option, pub specificity: u32, } @@ -816,7 +816,7 @@ impl From for u32 { } fn specificity(complex_selector: &ComplexSelector, - pseudo_element: Option<&Impl::PseudoElement>) + pseudo_element: Option<&Impl::PseudoElementSelector>) -> u32 where Impl: SelectorImpl { let mut specificity = complex_selector_specificity(complex_selector); @@ -916,7 +916,7 @@ type ParseVec = SmallVec<[Component; 8]>; fn parse_complex_selector_and_pseudo_element( parser: &P, input: &mut CssParser) - -> Result<(ComplexSelector, Option), ()> + -> Result<(ComplexSelector, Option), ()> where P: Parser, Impl: SelectorImpl { let mut sequence = ParseVec::new(); @@ -1014,7 +1014,7 @@ fn parse_type_selector(parser: &P, input: &mut CssParser, sequence: &mu #[derive(Debug)] enum SimpleSelectorParseResult { SimpleSelector(Component), - PseudoElement(Impl::PseudoElement), + PseudoElement(Impl::PseudoElementSelector), } /// * `Err(())`: Invalid selector, abort @@ -1210,7 +1210,7 @@ fn parse_compound_selector( input: &mut CssParser, mut sequence: &mut ParseVec, inside_negation: bool) - -> Result, ()> + -> Result, ()> where P: Parser, Impl: SelectorImpl { // Consume any leading whitespace. @@ -1335,7 +1335,7 @@ fn parse_one_simple_selector(parser: &P, name.eq_ignore_ascii_case("after") || name.eq_ignore_ascii_case("first-line") || name.eq_ignore_ascii_case("first-letter") { - let pseudo_element = P::parse_pseudo_element(parser, name)?; + let pseudo_element = P::parse_pseudo_element(parser, name, input)?; Ok(Some(SimpleSelectorParseResult::PseudoElement(pseudo_element))) } else { let pseudo_class = parse_simple_pseudo_class(parser, name)?; @@ -1351,7 +1351,7 @@ fn parse_one_simple_selector(parser: &P, Ok(Token::Colon) => { match input.next_including_whitespace() { Ok(Token::Ident(name)) => { - let pseudo = P::parse_pseudo_element(parser, name)?; + let pseudo = P::parse_pseudo_element(parser, name, input)?; Ok(Some(SimpleSelectorParseResult::PseudoElement(pseudo))) } _ => Err(()) @@ -1455,7 +1455,7 @@ pub mod tests { type BorrowedLocalName = DummyAtom; type BorrowedNamespaceUrl = DummyAtom; type NonTSPseudoClass = PseudoClass; - type PseudoElement = PseudoElement; + type PseudoElementSelector = PseudoElement; } #[derive(Default, Debug, Hash, Clone, PartialEq, Eq)] @@ -1505,7 +1505,7 @@ pub mod tests { } } - fn parse_pseudo_element(&self, name: Cow) + fn parse_pseudo_element(&self, name: Cow, input: &mut CssParser) -> Result { match_ignore_ascii_case! { &name, "before" => Ok(PseudoElement::Before), diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index 6badfd145b6..ca35d1dc35e 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -5,6 +5,7 @@ //! Gecko-specific bits for selector-parsing. use cssparser::{Parser, ToCss}; +use element_state::{IN_ACTIVE_STATE, IN_FOCUS_STATE, IN_HOVER_STATE}; use element_state::ElementState; use gecko_bindings::structs::CSSPseudoClassType; use gecko_bindings::structs::nsIAtom; @@ -325,6 +326,15 @@ impl NonTSPseudoClass { apply_non_ts_list!(pseudo_class_check_internal) } + /// https://drafts.csswg.org/selectors-4/#useraction-pseudos + /// + /// We intentionally skip the link-related ones. + fn is_safe_user_action_state(&self) -> bool { + matches!(*self, NonTSPseudoClass::Hover | + NonTSPseudoClass::Active | + NonTSPseudoClass::Focus) + } + /// Get the state flag associated with a pseudo-class, if any. pub fn state_flag(&self) -> ElementState { macro_rules! flag { @@ -375,6 +385,53 @@ impl NonTSPseudoClass { #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct SelectorImpl; +/// Some subset of pseudo-elements in Gecko are sensitive to some state +/// selectors. +/// +/// We store the sensitive states in this struct in order to properly handle +/// these. +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub struct PseudoElementSelector { + pseudo: PseudoElement, + state: ElementState, +} + +impl PseudoElementSelector { + /// Returns the pseudo-element this selector represents. + pub fn pseudo_element(&self) -> &PseudoElement { + &self.pseudo + } +} + +impl ToCss for PseudoElementSelector { + fn to_css(&self, dest: &mut W) -> fmt::Result + where W: fmt::Write, + { + if cfg!(debug_assertions) { + let mut state = self.state; + state.remove(IN_HOVER_STATE | IN_ACTIVE_STATE | IN_FOCUS_STATE); + assert_eq!(state, ElementState::empty(), + "Unhandled pseudo-element state selector?"); + } + + self.pseudo.to_css(dest)?; + + if self.state.contains(IN_HOVER_STATE) { + dest.write_str(":hover")? + } + + if self.state.contains(IN_ACTIVE_STATE) { + dest.write_str(":active")? + } + + if self.state.contains(IN_FOCUS_STATE) { + dest.write_str(":focus")? + } + + Ok(()) + } +} + impl ::selectors::SelectorImpl for SelectorImpl { type AttrValue = Atom; type Identifier = Atom; @@ -385,7 +442,7 @@ impl ::selectors::SelectorImpl for SelectorImpl { type BorrowedNamespaceUrl = WeakNamespace; type BorrowedLocalName = WeakAtom; - type PseudoElement = PseudoElement; + type PseudoElementSelector = PseudoElementSelector; type NonTSPseudoClass = NonTSPseudoClass; } @@ -447,11 +504,34 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> { } } - fn parse_pseudo_element(&self, name: Cow) -> Result { - match PseudoElement::from_slice(&name, self.in_user_agent_stylesheet()) { - Some(pseudo) => Ok(pseudo), - None => Err(()), - } + fn parse_pseudo_element(&self, name: Cow, input: &mut Parser) -> Result { + let pseudo = + match PseudoElement::from_slice(&name, self.in_user_agent_stylesheet()) { + Some(pseudo) => pseudo, + None => return Err(()), + }; + + let state = input.try(|input| { + let mut state = ElementState::empty(); + + while !input.is_exhausted() { + input.expect_colon()?; + let ident = input.expect_ident()?; + let pseudo_class = self.parse_non_ts_pseudo_class(ident)?; + + if !pseudo_class.is_safe_user_action_state() { + return Err(()) + } + state.insert(pseudo_class.state_flag()); + } + + Ok(state) + }); + + Ok(PseudoElementSelector { + pseudo: pseudo, + state: state.unwrap_or(ElementState::empty()), + }) } fn default_namespace(&self) -> Option { diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs index d81e14235a2..e801738866c 100644 --- a/components/style/servo/selector_parser.rs +++ b/components/style/servo/selector_parser.rs @@ -78,6 +78,18 @@ impl ToCss for PseudoElement { pub const EAGER_PSEUDO_COUNT: usize = 3; impl PseudoElement { + /// The pseudo-element, used for compatibility with Gecko's + /// `PseudoElementSelector`. + pub fn pseudo_element(&self) -> &Self { + self + } + + /// The pseudo-element selector's state, used for compatibility with Gecko's + /// `PseudoElementSelector`. + pub fn state(&self) -> ElementState { + ElementState::empty() + } + /// Gets the canonical index of this eagerly-cascaded pseudo-element. #[inline] pub fn eager_index(&self) -> usize { @@ -252,7 +264,7 @@ impl NonTSPseudoClass { pub struct SelectorImpl; impl ::selectors::SelectorImpl for SelectorImpl { - type PseudoElement = PseudoElement; + type PseudoElementSelector = PseudoElement; type NonTSPseudoClass = NonTSPseudoClass; type AttrValue = String; @@ -311,7 +323,10 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> { Ok(pseudo_class) } - fn parse_pseudo_element(&self, name: Cow) -> Result { + fn parse_pseudo_element(&self, + name: Cow, + _input: &mut CssParser) + -> Result { use self::PseudoElement::*; let pseudo_element = match_ignore_ascii_case! { &name, "before" => Before, diff --git a/components/style/stylist.rs b/components/style/stylist.rs index b929777bd2f..0cfb9e9a04d 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -449,9 +449,9 @@ impl Stylist { rule: &Arc>, stylesheet: &Stylesheet) { - let map = if let Some(ref pseudo) = selector.pseudo_element { + let map = if let Some(ref pseudo_selector) = selector.pseudo_element { self.pseudos_map - .entry(pseudo.clone()) + .entry(pseudo_selector.pseudo_element().clone()) .or_insert_with(PerPseudoElementSelectorMap::new) .borrow_for_origin(&stylesheet.origin) } else { From dd38740ecec9f6962d6b284ecc6411189baa0779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 12 May 2017 17:02:07 +0200 Subject: [PATCH 2/9] Bug 1364412: Store full selectors in the Rule object. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: EKLKxNCghLD Signed-off-by: Emilio Cobos Álvarez --- components/style/stylist.rs | 31 +++++++++++++------------------ tests/unit/style/stylist.rs | 15 ++++++--------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 0cfb9e9a04d..6d3b88086f7 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -458,10 +458,9 @@ impl Stylist { self.element_map.borrow_for_origin(&stylesheet.origin) }; - map.insert(Rule::new(selector.inner.clone(), + map.insert(Rule::new(selector.clone(), rule.clone(), - self.rules_source_order, - selector.specificity)); + self.rules_source_order)); } #[inline] @@ -1321,7 +1320,7 @@ impl SelectorMap { let mut rules_list = vec![]; for rule in self.other.iter() { - if rule.selector.complex.iter_raw().next().is_none() { + if rule.selector.inner.complex.iter_raw().next().is_none() { rules_list.push(rule.to_applicable_declaration_block(cascade_level)); } } @@ -1371,8 +1370,11 @@ impl SelectorMap { F: FnMut(&E, ElementSelectorFlags), { for rule in rules.iter() { - if matches_selector(&rule.selector, element, parent_bf, - relations, flags_setter) { + if matches_selector(&rule.selector.inner, + element, + parent_bf, + relations, + flags_setter) { matching_rules.push( rule.to_applicable_declaration_block(cascade_level)); } @@ -1579,29 +1581,24 @@ pub struct Rule { /// pointer-chasing when gathering applicable declarations, which /// can ruin performance when there are a lot of rules. #[cfg_attr(feature = "servo", ignore_heap_size_of = "Arc")] - pub selector: SelectorInner, + pub selector: Selector, /// The actual style rule. #[cfg_attr(feature = "servo", ignore_heap_size_of = "Arc")] pub style_rule: Arc>, /// The source order this style rule appears in. pub source_order: usize, - /// The specificity of the rule this selector represents. - /// - /// Note: The top two bits of this are unused, and could be used to store - /// flags. - specificity: u32, } impl Borrow> for Rule { fn borrow(&self) -> &SelectorInner { - &self.selector + &self.selector.inner } } impl Rule { /// Returns the specificity of the rule. pub fn specificity(&self) -> u32 { - self.specificity + self.selector.specificity } fn to_applicable_declaration_block(&self, level: CascadeLevel) -> ApplicableDeclarationBlock { @@ -1614,17 +1611,15 @@ impl Rule { } /// Creates a new Rule. - pub fn new(selector: SelectorInner, + pub fn new(selector: Selector, style_rule: Arc>, - source_order: usize, - specificity: u32) + source_order: usize) -> Self { Rule { selector: selector, style_rule: style_rule, source_order: source_order, - specificity: specificity, } } } diff --git a/tests/unit/style/stylist.rs b/tests/unit/style/stylist.rs index e50ff98845e..073c003b0bb 100644 --- a/tests/unit/style/stylist.rs +++ b/tests/unit/style/stylist.rs @@ -42,10 +42,7 @@ fn get_mock_rules(css_selectors: &[&str]) -> (Vec>, SharedRwLock) { let guard = shared_lock.read(); let rule = locked.read_with(&guard); rule.selectors.0.iter().map(|s| { - Rule::new(s.inner.clone(), - locked.clone(), - i, - s.specificity) + Rule::new(s.clone(), locked.clone(), i) }).collect() }).collect(), shared_lock) } @@ -175,22 +172,22 @@ fn test_rule_ordering_same_specificity() { #[test] fn test_get_id_name() { let (rules_list, _) = get_mock_rules(&[".intro", "#top"]); - assert_eq!(stylist::get_id_name(&rules_list[0][0].selector), None); - assert_eq!(stylist::get_id_name(&rules_list[1][0].selector), Some(Atom::from("top"))); + assert_eq!(stylist::get_id_name(&rules_list[0][0].selector.inner), None); + assert_eq!(stylist::get_id_name(&rules_list[1][0].selector.inner), Some(Atom::from("top"))); } #[test] fn test_get_class_name() { let (rules_list, _) = get_mock_rules(&[".intro.foo", "#top"]); - assert_eq!(stylist::get_class_name(&rules_list[0][0].selector), Some(Atom::from("foo"))); - assert_eq!(stylist::get_class_name(&rules_list[1][0].selector), None); + assert_eq!(stylist::get_class_name(&rules_list[0][0].selector.inner), Some(Atom::from("foo"))); + assert_eq!(stylist::get_class_name(&rules_list[1][0].selector.inner), None); } #[test] fn test_get_local_name() { let (rules_list, _) = get_mock_rules(&["img.foo", "#top", "IMG", "ImG"]); let check = |i: usize, names: Option<(&str, &str)>| { - assert!(stylist::get_local_name(&rules_list[i][0].selector) + assert!(stylist::get_local_name(&rules_list[i][0].selector.inner) == names.map(|(name, lower_name)| LocalNameSelector { name: LocalName::from(name), lower_name: LocalName::from(lower_name) })) From 84f5a906680784bee2cb1e12da9861ad089b4df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 12 May 2017 17:35:28 +0200 Subject: [PATCH 3/9] Bug 1364412: Use the pseudo selector to reject state selectors. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: 73dnp6nZpdU Signed-off-by: Emilio Cobos Álvarez --- .../script_layout_interface/wrapper_traits.rs | 2 + components/style/gecko/selector_parser.rs | 5 ++ components/style/matching.rs | 10 +++- components/style/stylist.rs | 57 +++++++++++++++---- ports/geckolib/glue.rs | 12 +++- 5 files changed, 73 insertions(+), 13 deletions(-) diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs index 9683d049775..9219f1e4b09 100644 --- a/components/script_layout_interface/wrapper_traits.rs +++ b/components/script_layout_interface/wrapper_traits.rs @@ -20,6 +20,7 @@ use style::context::SharedStyleContext; use style::data::ElementData; use style::dom::{LayoutIterator, NodeInfo, PresentationalHintsSynthesizer, TNode}; use style::dom::OpaqueNode; +use style::element_state::ElementState; use style::font_metrics::ServoMetricsProvider; use style::properties::{CascadeFlags, ServoComputedValues}; use style::selector_parser::{PseudoElement, PseudoElementCascadeType, SelectorImpl}; @@ -434,6 +435,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug + &context.guards, unsafe { &self.unsafe_get() }, &style_pseudo, + ElementState::empty(), data.styles().primary.values(), &ServoMetricsProvider); data.styles_mut().cached_pseudos diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index ca35d1dc35e..459305672e1 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -401,6 +401,11 @@ impl PseudoElementSelector { pub fn pseudo_element(&self) -> &PseudoElement { &self.pseudo } + + /// Returns the pseudo-element selector state. + pub fn state(&self) -> ElementState { + self.state + } } impl ToCss for PseudoElementSelector { diff --git a/components/style/matching.rs b/components/style/matching.rs index c18f66cc7ab..47562dbb335 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -15,6 +15,7 @@ use cascade_info::CascadeInfo; use context::{CurrentElementInfo, SelectorFlagsMap, SharedStyleContext, StyleContext}; use data::{ComputedStyle, ElementData, ElementStyles, RestyleData}; use dom::{AnimationRules, SendElement, TElement, TNode}; +use element_state::ElementState; use font_metrics::FontMetricsProvider; use properties::{CascadeFlags, ComputedValues, SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP, cascade}; use properties::longhands::display::computed_value as display; @@ -1015,13 +1016,18 @@ pub trait MatchMethods : TElement { None => *self, }; + let pseudo_and_state = match implemented_pseudo { + Some(ref pseudo) => Some((pseudo, self.get_state())), + None => None, + }; + // Compute the primary rule node. *relations = stylist.push_applicable_declarations(&selector_matching_target, Some(bloom), style_attribute, smil_override, animation_rules, - implemented_pseudo.as_ref(), + pseudo_and_state, &mut applicable_declarations, &mut set_selector_flags); @@ -1076,7 +1082,7 @@ pub trait MatchMethods : TElement { None, None, AnimationRules(None, None), - Some(&pseudo), + Some((&pseudo, ElementState::empty())), &mut applicable_declarations, &mut set_selector_flags); diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 6d3b88086f7..434acde02d0 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -602,15 +602,17 @@ impl Stylist { guards: &StylesheetGuards, element: &E, pseudo: &PseudoElement, + pseudo_state: ElementState, parent: &Arc, font_metrics: &FontMetricsProvider) -> Option where E: TElement, { - let rule_node = match self.lazy_pseudo_rules(guards, element, pseudo) { - Some(rule_node) => rule_node, - None => return None - }; + let rule_node = + match self.lazy_pseudo_rules(guards, element, pseudo, pseudo_state) { + Some(rule_node) => rule_node, + None => return None + }; // Read the comment on `precomputed_values_for_pseudo` to see why it's // difficult to assert that display: contents nodes never arrive here @@ -638,7 +640,8 @@ impl Stylist { pub fn lazy_pseudo_rules(&self, guards: &StylesheetGuards, element: &E, - pseudo: &PseudoElement) + pseudo: &PseudoElement, + pseudo_state: ElementState) -> Option where E: TElement { @@ -678,7 +681,7 @@ impl Stylist { None, None, AnimationRules(None, None), - Some(pseudo), + Some((pseudo, pseudo_state)), &mut declarations, &mut set_selector_flags); if declarations.is_empty() { @@ -807,7 +810,7 @@ impl Stylist { style_attribute: Option<&Arc>>, smil_override: Option<&Arc>>, animation_rules: AnimationRules, - pseudo_element: Option<&PseudoElement>, + pseudo_element: Option<(&PseudoElement, ElementState)>, applicable_declarations: &mut V, flags_setter: &mut F) -> StyleRelations @@ -821,18 +824,21 @@ impl Stylist { debug_assert!(cfg!(feature = "gecko") || style_attribute.is_none() || pseudo_element.is_none(), "Style attributes do not apply to pseudo-elements"); - debug_assert!(pseudo_element.as_ref().map_or(true, |p| !p.is_precomputed())); + debug_assert!(pseudo_element.as_ref().map_or(true, |p| !p.0.is_precomputed())); let map = match pseudo_element { - Some(ref pseudo) => self.pseudos_map.get(pseudo).unwrap(), + Some((ref pseudo, _)) => self.pseudos_map.get(pseudo).unwrap(), None => &self.element_map, }; let mut relations = StyleRelations::empty(); - debug!("Determining if style is shareable: pseudo: {}", pseudo_element.is_some()); + debug!("Determining if style is shareable: pseudo: {}", + pseudo_element.is_some()); + // Step 1: Normal user-agent rules. map.user_agent.get_all_matching_rules(element, + pseudo_element, parent_bf, applicable_declarations, &mut relations, @@ -859,6 +865,7 @@ impl Stylist { if element.matches_user_and_author_rules() { // Step 3: User and author normal rules. map.user.get_all_matching_rules(element, + pseudo_element, parent_bf, applicable_declarations, &mut relations, @@ -866,6 +873,7 @@ impl Stylist { CascadeLevel::UserNormal); debug!("user normal: {:?}", relations); map.author.get_all_matching_rules(element, + pseudo_element, parent_bf, applicable_declarations, &mut relations, @@ -1249,6 +1257,7 @@ impl SelectorMap { /// Sort the Rules at the end to maintain cascading order. pub fn get_all_matching_rules(&self, element: &E, + pseudo_element: Option<(&PseudoElement, ElementState)>, parent_bf: Option<&BloomFilter>, matching_rules_list: &mut V, relations: &mut StyleRelations, @@ -1266,6 +1275,7 @@ impl SelectorMap { let init_len = matching_rules_list.len(); if let Some(id) = element.get_id() { SelectorMap::get_matching_rules_from_hash(element, + pseudo_element, parent_bf, &self.id_hash, &id, @@ -1277,6 +1287,7 @@ impl SelectorMap { element.each_class(|class| { SelectorMap::get_matching_rules_from_hash(element, + pseudo_element, parent_bf, &self.class_hash, class, @@ -1287,6 +1298,7 @@ impl SelectorMap { }); SelectorMap::get_matching_rules_from_hash(element, + pseudo_element, parent_bf, &self.local_name_hash, element.get_local_name(), @@ -1296,6 +1308,7 @@ impl SelectorMap { cascade_level); SelectorMap::get_matching_rules(element, + pseudo_element, parent_bf, &self.other, matching_rules_list, @@ -1333,6 +1346,7 @@ impl SelectorMap { fn get_matching_rules_from_hash( element: &E, + pseudo_element: Option<(&PseudoElement, ElementState)>, parent_bf: Option<&BloomFilter>, hash: &FnvHashMap>, key: &BorrowedStr, @@ -1348,6 +1362,7 @@ impl SelectorMap { { if let Some(rules) = hash.get(key) { SelectorMap::get_matching_rules(element, + pseudo_element, parent_bf, rules, matching_rules, @@ -1359,6 +1374,7 @@ impl SelectorMap { /// Adds rules in `rules` that match `element` to the `matching_rules` list. fn get_matching_rules(element: &E, + pseudo_element: Option<(&PseudoElement, ElementState)>, parent_bf: Option<&BloomFilter>, rules: &[Rule], matching_rules: &mut V, @@ -1370,6 +1386,27 @@ impl SelectorMap { F: FnMut(&E, ElementSelectorFlags), { for rule in rules.iter() { + debug_assert_eq!(rule.selector.pseudo_element.is_some(), + pseudo_element.is_some(), + "Testing pseudo-elements against the wrong map"); + + if let Some((pseudo, pseudo_state)) = pseudo_element { + let pseudo_selector = + rule.selector.pseudo_element.as_ref().unwrap(); + + debug_assert_eq!(pseudo_selector.pseudo_element(), pseudo, + "Testing pseudo-element against the wrong entry"); + + let state = pseudo_selector.state(); + + // NB: We only allow a subset of the flags here, so using + // contains for them is fine, (and it's necessary, to handle + // multiple state flags properly). + if !state.is_empty() && !pseudo_state.contains(state) { + continue; + } + } + if matches_selector(&rule.selector.inner, element, parent_bf, diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 2d439ccef59..1d1c5f9c404 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -990,6 +990,8 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: .into_strong() } +// FIXME(emilio): Don't use pseudo_tag here, and pass the pseudo-element +// directly. #[no_mangle] pub extern "C" fn Servo_ResolveRuleNode(element: RawGeckoElementBorrowed, pseudo_tag: *mut nsIAtom, @@ -1045,6 +1047,8 @@ pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, let guard = global_style_data.shared_lock.read(); match get_pseudo_style(&guard, element, pseudo_tag, data.styles(), doc_data) { Some(values) => values.into_strong(), + // FIXME(emilio): This looks pretty wrong! Shouldn't it be at least an + // empty style inheriting from the element? None if !is_probe => data.styles().primary.values().clone().into_strong(), None => Strong::null(), } @@ -1081,7 +1085,12 @@ fn get_pseudo_rule_node(guard: &SharedRwLockReadGuard, PseudoElementCascadeType::Lazy => { let d = doc_data.borrow_mut(); let guards = StylesheetGuards::same(guard); - d.stylist.lazy_pseudo_rules(&guards, &element, &pseudo) + + // FIXME(emilio): We should get the pseudo state here! + d.stylist.lazy_pseudo_rules(&guards, + &element, + &pseudo, + ElementState::empty()) }, } } @@ -1105,6 +1114,7 @@ fn get_pseudo_style(guard: &SharedRwLockReadGuard, d.stylist.lazily_compute_pseudo_element_style(&guards, &element, &pseudo, + ElementState::empty(), base, &metrics) .map(|s| s.values().clone()) From 737c7f1f6347ec5a68d59a791de43d8897014227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 12 May 2017 17:51:32 +0200 Subject: [PATCH 4/9] Bug 1364412: Simplify Servo_HasAuthorSpecifiedRules looking at the pseudo style. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: HpV92ttZGJz Signed-off-by: Emilio Cobos Álvarez --- components/style/rule_tree/mod.rs | 3 +- ports/geckolib/glue.rs | 78 +++++-------------------------- 2 files changed, 14 insertions(+), 67 deletions(-) diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index 8c5c5166077..ead9797ca14 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -1071,10 +1071,11 @@ impl StrongRuleNode { if !have_explicit_ua_inherit { break } // Continue to the parent element and search for the inherited properties. - element = match element.parent_element() { + element = match element.inheritance_parent() { Some(parent) => parent, None => break }; + let parent_data = element.mutate_data().unwrap(); let parent_rule_node = parent_data.styles().primary.rules.clone(); element_rule_node = Cow::Owned(parent_rule_node); diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 1d1c5f9c404..439f4d82bb1 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -33,7 +33,6 @@ use style::gecko_bindings::bindings::{RawServoMediaList, RawServoMediaListBorrow use style::gecko_bindings::bindings::{RawServoMediaRule, RawServoMediaRuleBorrowed}; use style::gecko_bindings::bindings::{RawServoNamespaceRule, RawServoNamespaceRuleBorrowed}; use style::gecko_bindings::bindings::{RawServoPageRule, RawServoPageRuleBorrowed}; -use style::gecko_bindings::bindings::{RawServoRuleNodeBorrowed, RawServoRuleNodeStrong}; use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned}; use style::gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed}; use style::gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong}; @@ -84,7 +83,7 @@ use style::properties::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP; use style::properties::animated_properties::{Animatable, AnimationValue, TransitionProperty}; use style::properties::parse_one_declaration; use style::restyle_hints::{self, RestyleHint}; -use style::rule_tree::{StrongRuleNode, StyleSource}; +use style::rule_tree::StyleSource; use style::selector_parser::PseudoElementCascadeType; use style::sequential; use style::shared_lock::{SharedRwLock, SharedRwLockReadGuard, StylesheetGuards, ToCssWithGuard, Locked}; @@ -990,42 +989,10 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: .into_strong() } -// FIXME(emilio): Don't use pseudo_tag here, and pass the pseudo-element -// directly. -#[no_mangle] -pub extern "C" fn Servo_ResolveRuleNode(element: RawGeckoElementBorrowed, - pseudo_tag: *mut nsIAtom, - raw_data: RawServoStyleSetBorrowed) - -> RawServoRuleNodeStrong -{ - let element = GeckoElement(element); - let doc_data = PerDocumentStyleData::from_ffi(raw_data); - let guard = (*GLOBAL_STYLE_DATA).shared_lock.read(); - - let data = element.mutate_data().unwrap(); - let styles = match data.get_styles() { - Some(styles) => styles, - None => { - warn!("Calling Servo_ResolveRuleNode on unstyled element"); - return Strong::null() - } - }; - - let maybe_rules = if pseudo_tag.is_null() { - Some(styles.primary.rules.clone()) - } else { - get_pseudo_rule_node(&guard, element, pseudo_tag, styles, doc_data) - }; - - match maybe_rules { - Some(rule_node) => rule_node.into_strong(), - None => Strong::null(), - } -} - #[no_mangle] pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, - pseudo_tag: *mut nsIAtom, is_probe: bool, + pseudo_tag: *mut nsIAtom, + is_probe: bool, raw_data: RawServoStyleSetBorrowed) -> ServoComputedValuesStrong { @@ -1055,44 +1022,23 @@ pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, } #[no_mangle] -pub extern "C" fn Servo_HasAuthorSpecifiedRules(rule_node: RawServoRuleNodeBorrowed, - element: RawGeckoElementBorrowed, +pub extern "C" fn Servo_HasAuthorSpecifiedRules(element: RawGeckoElementBorrowed, rule_type_mask: u32, author_colors_allowed: bool) -> bool { let element = GeckoElement(element); + + let data = element.borrow_data().unwrap(); + let primary_style = &data.styles().primary; + let guard = (*GLOBAL_STYLE_DATA).shared_lock.read(); let guards = StylesheetGuards::same(&guard); - StrongRuleNode::from_ffi(&rule_node).has_author_specified_rules(element, - &guards, - rule_type_mask, - author_colors_allowed) -} - -fn get_pseudo_rule_node(guard: &SharedRwLockReadGuard, - element: GeckoElement, - pseudo_tag: *mut nsIAtom, - styles: &ElementStyles, - doc_data: &PerDocumentStyleData) - -> Option -{ - let pseudo = PseudoElement::from_atom_unchecked(Atom::from(pseudo_tag), false); - match pseudo.cascade_type() { - PseudoElementCascadeType::Eager => styles.pseudos.get(&pseudo).map(|s| s.rules.clone()), - PseudoElementCascadeType::Precomputed => unreachable!("No anonymous boxes"), - PseudoElementCascadeType::Lazy => { - let d = doc_data.borrow_mut(); - let guards = StylesheetGuards::same(guard); - - // FIXME(emilio): We should get the pseudo state here! - d.stylist.lazy_pseudo_rules(&guards, - &element, - &pseudo, - ElementState::empty()) - }, - } + primary_style.rules.has_author_specified_rules(element, + &guards, + rule_type_mask, + author_colors_allowed) } fn get_pseudo_style(guard: &SharedRwLockReadGuard, From de680b06fe8e2a74062781491e84f8d1479cad51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 12 May 2017 19:11:31 +0200 Subject: [PATCH 5/9] Bug 1364412: Track pseudo-element's state dependencies too. r=heycam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: 8zOE7TyW1xi Signed-off-by: Emilio Cobos Álvarez --- components/style/stylist.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 434acde02d0..5f64588d186 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -495,6 +495,9 @@ impl Stylist { #[inline] fn note_attribute_and_state_dependencies(&mut self, selector: &Selector) { + if let Some(ref pseudo_selector) = selector.pseudo_element { + self.state_dependencies.insert(pseudo_selector.state()); + } selector.visit(&mut AttributeAndStateDependencyVisitor(self)); } From 0bc185f1c2948ae92352e98bb35662f0cd3ff544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 15 May 2017 22:23:55 +0200 Subject: [PATCH 6/9] Bug 1364412: Properly handle state restyle hints for pseudo-elements. r=bholley --- components/style/data.rs | 7 + components/style/restyle_hints.rs | 247 ++++++++++++++++++++++++------ components/style/traversal.rs | 3 +- tests/unit/style/restyle_hints.rs | 3 - 4 files changed, 207 insertions(+), 53 deletions(-) diff --git a/components/style/data.rs b/components/style/data.rs index 0a1e42d6dd7..af3d57e0a72 100644 --- a/components/style/data.rs +++ b/components/style/data.rs @@ -384,6 +384,13 @@ impl ElementData { None => RestyleHint::empty(), }; + debug!("compute_final_hint: {:?}, has_snapshot: {}, handled_snapshot: {}, \ + pseudo: {:?}", + element, + element.has_snapshot(), + element.handled_snapshot(), + element.implemented_pseudo_element()); + if element.has_snapshot() && !element.handled_snapshot() { hint |= context.stylist.compute_restyle_hint(&element, context.snapshot_map); unsafe { element.set_handled_snapshot() } diff --git a/components/style/restyle_hints.rs b/components/style/restyle_hints.rs index 8a2bd9c3af6..54d92151dbd 100644 --- a/components/style/restyle_hints.rs +++ b/components/style/restyle_hints.rs @@ -9,11 +9,12 @@ use Atom; use dom::TElement; use element_state::*; +use fnv::FnvHashMap; #[cfg(feature = "gecko")] use gecko_bindings::structs::nsRestyleHint; #[cfg(feature = "servo")] use heapsize::HeapSizeOf; -use selector_parser::{AttrValue, NonTSPseudoClass, SelectorImpl, Snapshot, SnapshotMap}; +use selector_parser::{AttrValue, NonTSPseudoClass, PseudoElement, SelectorImpl, Snapshot, SnapshotMap}; use selectors::{Element, MatchAttr}; use selectors::matching::{ElementSelectorFlags, StyleRelations}; use selectors::matching::matches_selector; @@ -228,6 +229,18 @@ impl<'a, E> ElementWrapper<'a, E> snapshot } + + fn state_changes(&self) -> ElementState { + let snapshot = match self.snapshot() { + Some(s) => s, + None => return ElementState::empty(), + }; + + match snapshot.state() { + Some(state) => state ^ self.element.get_state(), + None => ElementState::empty(), + } + } } impl<'a, E> MatchAttr for ElementWrapper<'a, E> @@ -564,6 +577,38 @@ impl Borrow> for Dependency { } } +/// A similar version of the above, but for pseudo-elements, which only care +/// about the full selector, and need it in order to properly track +/// pseudo-element selector state. +/// +/// NOTE(emilio): We could add a `hint` and `sensitivities` field to the +/// `PseudoElementDependency` and stop posting `RESTYLE_DESCENDANTS`s hints if +/// we visited all the pseudo-elements of an element unconditionally as part of +/// the traversal. +/// +/// That would allow us to stop posting `RESTYLE_DESCENDANTS` hints for dumb +/// selectors, and storing pseudo dependencies in the element dependency map. +/// +/// That would allow us to avoid restyling the element itself when a selector +/// has only changed a pseudo-element's style, too. +/// +/// There's no good way to do that right now though, and I think for the +/// foreseeable future we may just want to optimize that `RESTYLE_DESCENDANTS` +/// to become a `RESTYLE_PSEUDO_ELEMENTS` or something like that, in order to at +/// least not restyle the whole subtree. +#[derive(Clone, Debug)] +#[cfg_attr(feature = "servo", derive(HeapSizeOf))] +struct PseudoElementDependency { + #[cfg_attr(feature = "servo", ignore_heap_size_of = "defined in selectors")] + selector: Selector, +} + +impl Borrow> for PseudoElementDependency { + fn borrow(&self) -> &SelectorInner { + &self.selector.inner + } +} + /// The following visitor visits all the simple selectors for a given complex /// selector, taking care of :not and :any combinators, collecting whether any /// of them is sensitive to attribute or state changes. @@ -588,13 +633,19 @@ impl SelectorVisitor for SensitivitiesVisitor { /// SelectorMap and the bloom filter. #[derive(Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] -pub struct DependencySet(pub SelectorMap); +pub struct DependencySet { + /// A map used for pseudo-element's dependencies. + /// + /// Note that pseudo-elements are somewhat special, because some of them in + /// Gecko track state, and also because they don't do selector-matching as + /// normal, but against their parent element. + pseudo_dependencies: FnvHashMap>, + + /// This is for all other normal element's selectors/selector parts. + dependencies: SelectorMap, +} impl DependencySet { - fn add_dependency(&mut self, dep: Dependency) { - self.0.insert(dep); - } - /// Adds a selector to this `DependencySet`. pub fn note_selector(&mut self, selector: &Selector) { let mut combinator = None; @@ -617,31 +668,43 @@ impl DependencySet { index += 1; // Account for the simple selector. } + + let pseudo_selector_is_state_dependent = + sequence_start == 0 && + selector.pseudo_element.as_ref().map_or(false, |pseudo_selector| { + !pseudo_selector.state().is_empty() + }); + + if pseudo_selector_is_state_dependent { + let pseudo_selector = selector.pseudo_element.as_ref().unwrap(); + self.pseudo_dependencies + .entry(pseudo_selector.pseudo_element().clone()) + .or_insert_with(SelectorMap::new) + .insert(PseudoElementDependency { + selector: selector.clone(), + }); + } + // If we found a sensitivity, add an entry in the dependency set. if !visitor.sensitivities.is_empty() { let mut hint = combinator_to_restyle_hint(combinator); - let dep_selector; - if sequence_start == 0 { - if selector.pseudo_element.is_some() { - // TODO(emilio): use more fancy restyle hints to avoid - // restyling the whole subtree when pseudos change. - // - // We currently need is_pseudo_element to handle eager - // pseudos (so the style the parent stores doesn't - // become stale), and restyle_descendants to handle all - // of them (::before and ::after, because we find them - // in the subtree, and other lazy pseudos for the same - // reason). - hint |= RESTYLE_SELF | RESTYLE_DESCENDANTS; - } - // Reuse the bloom hashes if this is the base selector. - dep_selector = selector.inner.clone(); - } else { - dep_selector = SelectorInner::new(selector.inner.complex.slice_from(sequence_start)); + if sequence_start == 0 && selector.pseudo_element.is_some() { + // FIXME(emilio): Be more granular about this. See the + // comment in `PseudoElementDependency` about how could this + // be modified in order to be more efficient and restyle + // less. + hint |= RESTYLE_DESCENDANTS; } - self.add_dependency(Dependency { + let dep_selector = if sequence_start == 0 { + // Reuse the bloom hashes if this is the base selector. + selector.inner.clone() + } else { + SelectorInner::new(selector.inner.complex.slice_from(sequence_start)) + }; + + self.dependencies.insert(Dependency { sensitivities: visitor.sensitivities, hint: hint, selector: dep_selector, @@ -659,40 +722,98 @@ impl DependencySet { /// Create an empty `DependencySet`. pub fn new() -> Self { - DependencySet(SelectorMap::new()) + DependencySet { + dependencies: SelectorMap::new(), + pseudo_dependencies: FnvHashMap::default(), + } } /// Return the total number of dependencies that this set contains. pub fn len(&self) -> usize { - self.0.len() + self.dependencies.len() + + self.pseudo_dependencies.values().fold(0, |acc, val| acc + val.len()) } /// Clear this dependency set. pub fn clear(&mut self) { - self.0 = SelectorMap::new(); + self.dependencies = SelectorMap::new(); + self.pseudo_dependencies.clear() } - /// Compute a restyle hint given an element and a snapshot, per the rules - /// explained in the rest of the documentation. - pub fn compute_hint(&self, - el: &E, - snapshots: &SnapshotMap) - -> RestyleHint - where E: TElement + Clone, + fn compute_pseudo_hint( + &self, + pseudo: &E, + pseudo_element: PseudoElement, + snapshots: &SnapshotMap) + -> RestyleHint + where E: TElement, + { + debug!("compute_pseudo_hint: {:?}, {:?}", pseudo, pseudo_element); + debug_assert!(pseudo.has_snapshot()); + + let map = match self.pseudo_dependencies.get(&pseudo_element) { + Some(map) => map, + None => return RestyleHint::empty(), + }; + + // Only pseudo-element's state is relevant. + let pseudo_state_changes = + ElementWrapper::new(*pseudo, snapshots).state_changes(); + + debug!("pseudo_state_changes: {:?}", pseudo_state_changes); + if pseudo_state_changes.is_empty() { + return RestyleHint::empty(); + } + + let selector_matching_target = + pseudo.closest_non_native_anonymous_ancestor().unwrap(); + + // Note that we rely on that, if the originating element changes, it'll + // post a restyle hint that would make us redo selector matching, so we + // don't need to care about that. + // + // If that ever changes, we'd need to share more code with + // `compute_element_hint`. + let mut hint = RestyleHint::empty(); + map.lookup(selector_matching_target, &mut |dep| { + // If the selector didn't match before, it either doesn't match now + // either (or it doesn't matter because our parent posted a restyle + // for us above). + if !matches_selector(&dep.selector.inner, &selector_matching_target, + None, &mut StyleRelations::empty(), + &mut |_, _| {}) { + return true; + } + + let pseudo_selector = dep.selector.pseudo_element.as_ref().unwrap(); + debug_assert!(!pseudo_selector.state().is_empty()); + + if pseudo_selector.state().intersects(pseudo_state_changes) { + hint = RESTYLE_SELF; + return false; + } + + true + }); + + hint + } + + fn compute_element_hint( + &self, + el: &E, + snapshots: &SnapshotMap) + -> RestyleHint + where E: TElement, { debug_assert!(el.has_snapshot(), "Shouldn't be here!"); - let snapshot_el = ElementWrapper::new(el.clone(), snapshots); + let snapshot_el = ElementWrapper::new(el.clone(), snapshots); let snapshot = snapshot_el.snapshot().expect("has_snapshot lied so badly"); - let current_state = el.get_state(); - let state_changes = - snapshot.state() - .map_or_else(ElementState::empty, - |old_state| current_state ^ old_state); + let state_changes = snapshot_el.state_changes(); let attrs_changed = snapshot.has_attrs(); - if state_changes.is_empty() && !attrs_changed { return RestyleHint::empty(); } @@ -704,18 +825,30 @@ impl DependencySet { // that we get all the possible applicable selectors from the rulehash. let mut additional_id = None; let mut additional_classes = SmallVec::<[Atom; 8]>::new(); - if snapshot.has_attrs() { + if attrs_changed { let id = snapshot.id_attr(); if id.is_some() && id != el.get_id() { additional_id = id; } - snapshot.each_class(|c| if !el.has_class(c) { additional_classes.push(c.clone()) }); + snapshot.each_class(|c| { + if !el.has_class(c) { + additional_classes.push(c.clone()) + } + }); } - self.0.lookup_with_additional(*el, additional_id, &additional_classes, &mut |dep| { - if !dep.sensitivities.sensitive_to(attrs_changed, state_changes) || - hint.contains(dep.hint) { + self.dependencies + .lookup_with_additional(*el, additional_id, &additional_classes, &mut |dep| { + trace!("scanning dependency: {:?}", dep); + if !dep.sensitivities.sensitive_to(attrs_changed, + state_changes) { + trace!(" > non-sensitive"); + return true; + } + + if hint.contains(dep.hint) { + trace!(" > hint was already there"); return true; } @@ -738,9 +871,25 @@ impl DependencySet { }); debug!("Calculated restyle hint: {:?} for {:?}. (State={:?}, {} Deps)", - hint, el, current_state, self.len()); - trace!("Deps: {:?}", self); + hint, el, el.get_state(), self.len()); hint } + + + /// Compute a restyle hint given an element and a snapshot, per the rules + /// explained in the rest of the documentation. + pub fn compute_hint(&self, + el: &E, + snapshots: &SnapshotMap) + -> RestyleHint + where E: TElement + Clone, + { + debug!("DependencySet::compute_hint({:?})", el); + if let Some(pseudo) = el.implemented_pseudo_element() { + return self.compute_pseudo_hint(el, pseudo, snapshots); + } + + self.compute_element_hint(el, snapshots) + } } diff --git a/components/style/traversal.rs b/components/style/traversal.rs index 44816c7a985..65f63cefb41 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -787,10 +787,11 @@ fn preprocess_children(traversal: &D, let later_siblings = child_data.compute_final_hint(child, traversal.shared_context()); - trace!(" > {:?} -> {:?} + {:?}, later_siblings: {:?}", + trace!(" > {:?} -> {:?} + {:?}, pseudo: {:?}, later_siblings: {:?}", child, child_data.get_restyle().map(|r| &r.hint), propagated_hint, + child.implemented_pseudo_element(), later_siblings); // If the child doesn't have pre-existing RestyleData and we don't have diff --git a/tests/unit/style/restyle_hints.rs b/tests/unit/style/restyle_hints.rs index 96f2d21877c..b2e2cf3e999 100644 --- a/tests/unit/style/restyle_hints.rs +++ b/tests/unit/style/restyle_hints.rs @@ -24,7 +24,4 @@ fn smoke_restyle_hints() { let selector = (selectors.0).first().unwrap(); dependencies.note_selector(selector); assert_eq!(dependencies.len(), 1); - let dep = &dependencies.0.other[0]; - assert!(!dep.sensitivities.states.is_empty()); - assert!(dep.hint.contains(RESTYLE_LATER_SIBLINGS)); } From 5820e3ecac16a62ff39186df018eb1c10d2a1f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 15 May 2017 22:24:37 +0200 Subject: [PATCH 7/9] Bug 1364412: Convert pseudo-elements to an enum. r=hiro,xidorn --- components/style/binding_tools/.gitignore | 2 - components/style/binding_tools/README.md | 7 - .../style/binding_tools/setup_bindgen.sh | 30 - components/style/build_gecko.rs | 3 +- components/style/gecko/generated/bindings.rs | 23 +- .../generated/pseudo_element_definition.rs | 1252 +++++++++++++++++ .../gecko/generated/pseudo_element_helper.rs | 280 ---- .../style/gecko/generated/structs_debug.rs | 799 +++++------ .../style/gecko/generated/structs_release.rs | 812 +++++------ components/style/gecko/mod.rs | 1 + components/style/gecko/pseudo_element.rs | 71 + .../gecko/pseudo_element_definition.mako.rs | 128 ++ .../{binding_tools => gecko}/regen_atoms.py | 70 +- components/style/gecko/selector_parser.rs | 214 +-- components/style/gecko/wrapper.rs | 13 +- ports/geckolib/glue.rs | 35 +- tests/unit/stylo/sanity_checks.rs | 25 - 17 files changed, 2260 insertions(+), 1505 deletions(-) delete mode 100644 components/style/binding_tools/.gitignore delete mode 100644 components/style/binding_tools/README.md delete mode 100755 components/style/binding_tools/setup_bindgen.sh create mode 100644 components/style/gecko/generated/pseudo_element_definition.rs delete mode 100644 components/style/gecko/generated/pseudo_element_helper.rs create mode 100644 components/style/gecko/pseudo_element.rs create mode 100644 components/style/gecko/pseudo_element_definition.mako.rs rename components/style/{binding_tools => gecko}/regen_atoms.py (79%) diff --git a/components/style/binding_tools/.gitignore b/components/style/binding_tools/.gitignore deleted file mode 100644 index ba50cb6cd5d..00000000000 --- a/components/style/binding_tools/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -llvm/ -rust-bindgen/ diff --git a/components/style/binding_tools/README.md b/components/style/binding_tools/README.md deleted file mode 100644 index e1465143e32..00000000000 --- a/components/style/binding_tools/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Geckolib tools - -This directory contains simple tools for generating the Rust bindings for [stylo](https://public.etherpad-mozilla.org/p/stylo). - -## `setup_bindgen.sh` - -This clones Servo's version of bindgen, and uses `llvm-3.8` library to build it. It will then be used to generate the Rust bindings. diff --git a/components/style/binding_tools/setup_bindgen.sh b/components/style/binding_tools/setup_bindgen.sh deleted file mode 100755 index 4447b2ccda3..00000000000 --- a/components/style/binding_tools/setup_bindgen.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -set -o errexit -set -o nounset -set -o pipefail - -# Run in the tools directory. -cd "$(dirname ${0})" - -# Setup and build bindgen. -if [[ "$(uname)" == "Linux" ]]; then - export LIBCLANG_PATH=/usr/lib/llvm-3.8/lib -else - export LIBCLANG_PATH="$(brew --prefix llvm38)/lib/llvm-3.8/lib" -fi - -# Make sure we have llvm-3.8. -if [[ ! -x "$(command -v clang-3.8)" ]]; then - echo "llvm-3.8 is required." \ - "Mac users should |brew install llvm38|," \ - "Linux users can find it in clang-3.8." - exit 1 -fi - -export LD_LIBRARY_PATH="${LIBCLANG_PATH}" -export DYLD_LIBRARY_PATH="${LIBCLANG_PATH}" diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 8c4b852290a..462c1545739 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -672,6 +672,7 @@ mod bindings { "RawGeckoURLExtraData", "RefPtr", "CSSPseudoClassType", + "CSSPseudoElementType", "TraversalRestyleBehavior", "TraversalRootBehavior", "ComputedTimingFunction_BeforeFlag", @@ -842,7 +843,7 @@ mod bindings { } fn generate_atoms() { - let script = Path::new(file!()).parent().unwrap().join("binding_tools").join("regen_atoms.py"); + let script = Path::new(file!()).parent().unwrap().join("gecko").join("regen_atoms.py"); println!("cargo:rerun-if-changed={}", script.display()); let status = Command::new(&*PYTHON) .arg(&script) diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 62e1797dcb5..ed00d8cd94f 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -26,6 +26,7 @@ use gecko_bindings::structs::RawGeckoServoStyleRuleList; use gecko_bindings::structs::RawGeckoURLExtraData; use gecko_bindings::structs::RefPtr; use gecko_bindings::structs::CSSPseudoClassType; +use gecko_bindings::structs::CSSPseudoElementType; use gecko_bindings::structs::TraversalRestyleBehavior; use gecko_bindings::structs::TraversalRootBehavior; use gecko_bindings::structs::ComputedTimingFunction_BeforeFlag; @@ -905,7 +906,7 @@ extern "C" { } extern "C" { pub fn Gecko_GetImplementedPseudo(element: RawGeckoElementBorrowed) - -> *mut nsIAtom; + -> CSSPseudoElementType; } extern "C" { pub fn Gecko_CalcStyleDifference(oldstyle: *mut nsStyleContext, @@ -2217,7 +2218,7 @@ extern "C" { extern "C" { pub fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: ServoComputedValuesBorrowedOrNull, - pseudoTag: *mut nsIAtom, + pseudo_tag: *mut nsIAtom, skip_display_fixup: bool, set: RawServoStyleSetBorrowed) @@ -2257,25 +2258,19 @@ extern "C" { } extern "C" { pub fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, - pseudo_tag: *mut nsIAtom, is_probe: bool, + pseudo_type: CSSPseudoElementType, + is_probe: bool, set: RawServoStyleSetBorrowed) -> ServoComputedValuesStrong; } extern "C" { - pub fn Servo_ResolveRuleNode(element: RawGeckoElementBorrowed, - pseudo_tag: *mut nsIAtom, - set: RawServoStyleSetBorrowed) - -> RawServoRuleNodeStrong; -} -extern "C" { - pub fn Servo_HasAuthorSpecifiedRules(rule_node: RawServoRuleNodeBorrowed, - element: RawGeckoElementBorrowed, + pub fn Servo_HasAuthorSpecifiedRules(element: RawGeckoElementBorrowed, rule_type_mask: u32, author_colors_allowed: bool) -> bool; } extern "C" { pub fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed, - pseudo_tag: *mut nsIAtom, + pseudo_type: CSSPseudoElementType, snapshots: *const ServoElementSnapshotTable, set: RawServoStyleSetBorrowed) @@ -2299,8 +2294,8 @@ extern "C" { RawGeckoElementBorrowed, snapshots: *const ServoElementSnapshotTable, - pseudo_tag: - *mut nsIAtom) + pseudo_type: + CSSPseudoElementType) -> ServoComputedValuesStrong; } extern "C" { diff --git a/components/style/gecko/generated/pseudo_element_definition.rs b/components/style/gecko/generated/pseudo_element_definition.rs new file mode 100644 index 00000000000..c733aa08f8b --- /dev/null +++ b/components/style/gecko/generated/pseudo_element_definition.rs @@ -0,0 +1,1252 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/// Gecko's pseudo-element definition. +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub enum PseudoElement { + /// :after + After, + /// :before + Before, + /// :backdrop + Backdrop, + /// :cue + Cue, + /// :first-letter + FirstLetter, + /// :first-line + FirstLine, + /// :-moz-selection + MozSelection, + /// :-moz-focus-inner + MozFocusInner, + /// :-moz-focus-outer + MozFocusOuter, + /// :-moz-list-bullet + MozListBullet, + /// :-moz-list-number + MozListNumber, + /// :-moz-math-anonymous + MozMathAnonymous, + /// :-moz-number-wrapper + MozNumberWrapper, + /// :-moz-number-text + MozNumberText, + /// :-moz-number-spin-box + MozNumberSpinBox, + /// :-moz-number-spin-up + MozNumberSpinUp, + /// :-moz-number-spin-down + MozNumberSpinDown, + /// :-moz-progress-bar + MozProgressBar, + /// :-moz-range-track + MozRangeTrack, + /// :-moz-range-progress + MozRangeProgress, + /// :-moz-range-thumb + MozRangeThumb, + /// :-moz-meter-bar + MozMeterBar, + /// :-moz-placeholder + MozPlaceholder, + /// :placeholder + Placeholder, + /// :-moz-color-swatch + MozColorSwatch, + /// :-moz-text + MozText, + /// :-moz-oof-placeholder + OofPlaceholder, + /// :-moz-first-letter-continuation + FirstLetterContinuation, + /// :-moz-block-inside-inline-wrapper + MozBlockInsideInlineWrapper, + /// :-moz-mathml-anonymous-block + MozMathMLAnonymousBlock, + /// :-moz-xul-anonymous-block + MozXULAnonymousBlock, + /// :-moz-hframeset-border + HorizontalFramesetBorder, + /// :-moz-vframeset-border + VerticalFramesetBorder, + /// :-moz-line-frame + MozLineFrame, + /// :-moz-button-content + ButtonContent, + /// :-moz-cell-content + CellContent, + /// :-moz-dropdown-list + DropDownList, + /// :-moz-fieldset-content + FieldsetContent, + /// :-moz-frameset-blank + FramesetBlank, + /// :-moz-display-comboboxcontrol-frame + MozDisplayComboboxControlFrame, + /// :-moz-html-canvas-content + HtmlCanvasContent, + /// :-moz-inline-table + InlineTable, + /// :-moz-table + Table, + /// :-moz-table-cell + TableCell, + /// :-moz-table-column-group + TableColGroup, + /// :-moz-table-column + TableCol, + /// :-moz-table-wrapper + TableWrapper, + /// :-moz-table-row-group + TableRowGroup, + /// :-moz-table-row + TableRow, + /// :-moz-canvas + Canvas, + /// :-moz-pagebreak + PageBreak, + /// :-moz-page + Page, + /// :-moz-pagecontent + PageContent, + /// :-moz-page-sequence + PageSequence, + /// :-moz-scrolled-content + ScrolledContent, + /// :-moz-scrolled-canvas + ScrolledCanvas, + /// :-moz-scrolled-page-sequence + ScrolledPageSequence, + /// :-moz-column-content + ColumnContent, + /// :-moz-viewport + Viewport, + /// :-moz-viewport-scroll + ViewportScroll, + /// :-moz-anonymous-flex-item + AnonymousFlexItem, + /// :-moz-anonymous-grid-item + AnonymousGridItem, + /// :-moz-ruby + Ruby, + /// :-moz-ruby-base + RubyBase, + /// :-moz-ruby-base-container + RubyBaseContainer, + /// :-moz-ruby-text + RubyText, + /// :-moz-ruby-text-container + RubyTextContainer, + /// :-moz-tree-column + Moztreecolumn, + /// :-moz-tree-row + Moztreerow, + /// :-moz-tree-separator + Moztreeseparator, + /// :-moz-tree-cell + Moztreecell, + /// :-moz-tree-indentation + Moztreeindentation, + /// :-moz-tree-line + Moztreeline, + /// :-moz-tree-twisty + Moztreetwisty, + /// :-moz-tree-image + Moztreeimage, + /// :-moz-tree-cell-text + Moztreecelltext, + /// :-moz-tree-checkbox + Moztreecheckbox, + /// :-moz-tree-progressmeter + Moztreeprogressmeter, + /// :-moz-tree-drop-feedback + Moztreedropfeedback, + /// :-moz-svg-marker-anon-child + MozSVGMarkerAnonChild, + /// :-moz-svg-outer-svg-anon-child + MozSVGOuterSVGAnonChild, + /// :-moz-svg-foreign-content + MozSVGForeignContent, + /// :-moz-svg-text + MozSVGText, +} + + + +/// The number of eager pseudo-elements. +pub const EAGER_PSEUDO_COUNT: usize = 2; + +/// The list of eager pseudos. +pub const EAGER_PSEUDOS: [PseudoElement; EAGER_PSEUDO_COUNT] = [ + PseudoElement::Before, + PseudoElement::After, +]; + +impl PseudoElement { + /// Executes a closure with each pseudo-element as an argument. + pub fn each(mut fun: F) + where F: FnMut(Self), + { + fun(PseudoElement::After); + fun(PseudoElement::Before); + fun(PseudoElement::Backdrop); + fun(PseudoElement::Cue); + fun(PseudoElement::FirstLetter); + fun(PseudoElement::FirstLine); + fun(PseudoElement::MozSelection); + fun(PseudoElement::MozFocusInner); + fun(PseudoElement::MozFocusOuter); + fun(PseudoElement::MozListBullet); + fun(PseudoElement::MozListNumber); + fun(PseudoElement::MozMathAnonymous); + fun(PseudoElement::MozNumberWrapper); + fun(PseudoElement::MozNumberText); + fun(PseudoElement::MozNumberSpinBox); + fun(PseudoElement::MozNumberSpinUp); + fun(PseudoElement::MozNumberSpinDown); + fun(PseudoElement::MozProgressBar); + fun(PseudoElement::MozRangeTrack); + fun(PseudoElement::MozRangeProgress); + fun(PseudoElement::MozRangeThumb); + fun(PseudoElement::MozMeterBar); + fun(PseudoElement::MozPlaceholder); + fun(PseudoElement::Placeholder); + fun(PseudoElement::MozColorSwatch); + fun(PseudoElement::MozText); + fun(PseudoElement::OofPlaceholder); + fun(PseudoElement::FirstLetterContinuation); + fun(PseudoElement::MozBlockInsideInlineWrapper); + fun(PseudoElement::MozMathMLAnonymousBlock); + fun(PseudoElement::MozXULAnonymousBlock); + fun(PseudoElement::HorizontalFramesetBorder); + fun(PseudoElement::VerticalFramesetBorder); + fun(PseudoElement::MozLineFrame); + fun(PseudoElement::ButtonContent); + fun(PseudoElement::CellContent); + fun(PseudoElement::DropDownList); + fun(PseudoElement::FieldsetContent); + fun(PseudoElement::FramesetBlank); + fun(PseudoElement::MozDisplayComboboxControlFrame); + fun(PseudoElement::HtmlCanvasContent); + fun(PseudoElement::InlineTable); + fun(PseudoElement::Table); + fun(PseudoElement::TableCell); + fun(PseudoElement::TableColGroup); + fun(PseudoElement::TableCol); + fun(PseudoElement::TableWrapper); + fun(PseudoElement::TableRowGroup); + fun(PseudoElement::TableRow); + fun(PseudoElement::Canvas); + fun(PseudoElement::PageBreak); + fun(PseudoElement::Page); + fun(PseudoElement::PageContent); + fun(PseudoElement::PageSequence); + fun(PseudoElement::ScrolledContent); + fun(PseudoElement::ScrolledCanvas); + fun(PseudoElement::ScrolledPageSequence); + fun(PseudoElement::ColumnContent); + fun(PseudoElement::Viewport); + fun(PseudoElement::ViewportScroll); + fun(PseudoElement::AnonymousFlexItem); + fun(PseudoElement::AnonymousGridItem); + fun(PseudoElement::Ruby); + fun(PseudoElement::RubyBase); + fun(PseudoElement::RubyBaseContainer); + fun(PseudoElement::RubyText); + fun(PseudoElement::RubyTextContainer); + fun(PseudoElement::Moztreecolumn); + fun(PseudoElement::Moztreerow); + fun(PseudoElement::Moztreeseparator); + fun(PseudoElement::Moztreecell); + fun(PseudoElement::Moztreeindentation); + fun(PseudoElement::Moztreeline); + fun(PseudoElement::Moztreetwisty); + fun(PseudoElement::Moztreeimage); + fun(PseudoElement::Moztreecelltext); + fun(PseudoElement::Moztreecheckbox); + fun(PseudoElement::Moztreeprogressmeter); + fun(PseudoElement::Moztreedropfeedback); + fun(PseudoElement::MozSVGMarkerAnonChild); + fun(PseudoElement::MozSVGOuterSVGAnonChild); + fun(PseudoElement::MozSVGForeignContent); + fun(PseudoElement::MozSVGText); + } + + /// Get the pseudo-element as an atom. + #[inline] + pub fn atom(&self) -> Atom { + match *self { + PseudoElement::After => atom!(":after"), + PseudoElement::Before => atom!(":before"), + PseudoElement::Backdrop => atom!(":backdrop"), + PseudoElement::Cue => atom!(":cue"), + PseudoElement::FirstLetter => atom!(":first-letter"), + PseudoElement::FirstLine => atom!(":first-line"), + PseudoElement::MozSelection => atom!(":-moz-selection"), + PseudoElement::MozFocusInner => atom!(":-moz-focus-inner"), + PseudoElement::MozFocusOuter => atom!(":-moz-focus-outer"), + PseudoElement::MozListBullet => atom!(":-moz-list-bullet"), + PseudoElement::MozListNumber => atom!(":-moz-list-number"), + PseudoElement::MozMathAnonymous => atom!(":-moz-math-anonymous"), + PseudoElement::MozNumberWrapper => atom!(":-moz-number-wrapper"), + PseudoElement::MozNumberText => atom!(":-moz-number-text"), + PseudoElement::MozNumberSpinBox => atom!(":-moz-number-spin-box"), + PseudoElement::MozNumberSpinUp => atom!(":-moz-number-spin-up"), + PseudoElement::MozNumberSpinDown => atom!(":-moz-number-spin-down"), + PseudoElement::MozProgressBar => atom!(":-moz-progress-bar"), + PseudoElement::MozRangeTrack => atom!(":-moz-range-track"), + PseudoElement::MozRangeProgress => atom!(":-moz-range-progress"), + PseudoElement::MozRangeThumb => atom!(":-moz-range-thumb"), + PseudoElement::MozMeterBar => atom!(":-moz-meter-bar"), + PseudoElement::MozPlaceholder => atom!(":-moz-placeholder"), + PseudoElement::Placeholder => atom!(":placeholder"), + PseudoElement::MozColorSwatch => atom!(":-moz-color-swatch"), + PseudoElement::MozText => atom!(":-moz-text"), + PseudoElement::OofPlaceholder => atom!(":-moz-oof-placeholder"), + PseudoElement::FirstLetterContinuation => atom!(":-moz-first-letter-continuation"), + PseudoElement::MozBlockInsideInlineWrapper => atom!(":-moz-block-inside-inline-wrapper"), + PseudoElement::MozMathMLAnonymousBlock => atom!(":-moz-mathml-anonymous-block"), + PseudoElement::MozXULAnonymousBlock => atom!(":-moz-xul-anonymous-block"), + PseudoElement::HorizontalFramesetBorder => atom!(":-moz-hframeset-border"), + PseudoElement::VerticalFramesetBorder => atom!(":-moz-vframeset-border"), + PseudoElement::MozLineFrame => atom!(":-moz-line-frame"), + PseudoElement::ButtonContent => atom!(":-moz-button-content"), + PseudoElement::CellContent => atom!(":-moz-cell-content"), + PseudoElement::DropDownList => atom!(":-moz-dropdown-list"), + PseudoElement::FieldsetContent => atom!(":-moz-fieldset-content"), + PseudoElement::FramesetBlank => atom!(":-moz-frameset-blank"), + PseudoElement::MozDisplayComboboxControlFrame => atom!(":-moz-display-comboboxcontrol-frame"), + PseudoElement::HtmlCanvasContent => atom!(":-moz-html-canvas-content"), + PseudoElement::InlineTable => atom!(":-moz-inline-table"), + PseudoElement::Table => atom!(":-moz-table"), + PseudoElement::TableCell => atom!(":-moz-table-cell"), + PseudoElement::TableColGroup => atom!(":-moz-table-column-group"), + PseudoElement::TableCol => atom!(":-moz-table-column"), + PseudoElement::TableWrapper => atom!(":-moz-table-wrapper"), + PseudoElement::TableRowGroup => atom!(":-moz-table-row-group"), + PseudoElement::TableRow => atom!(":-moz-table-row"), + PseudoElement::Canvas => atom!(":-moz-canvas"), + PseudoElement::PageBreak => atom!(":-moz-pagebreak"), + PseudoElement::Page => atom!(":-moz-page"), + PseudoElement::PageContent => atom!(":-moz-pagecontent"), + PseudoElement::PageSequence => atom!(":-moz-page-sequence"), + PseudoElement::ScrolledContent => atom!(":-moz-scrolled-content"), + PseudoElement::ScrolledCanvas => atom!(":-moz-scrolled-canvas"), + PseudoElement::ScrolledPageSequence => atom!(":-moz-scrolled-page-sequence"), + PseudoElement::ColumnContent => atom!(":-moz-column-content"), + PseudoElement::Viewport => atom!(":-moz-viewport"), + PseudoElement::ViewportScroll => atom!(":-moz-viewport-scroll"), + PseudoElement::AnonymousFlexItem => atom!(":-moz-anonymous-flex-item"), + PseudoElement::AnonymousGridItem => atom!(":-moz-anonymous-grid-item"), + PseudoElement::Ruby => atom!(":-moz-ruby"), + PseudoElement::RubyBase => atom!(":-moz-ruby-base"), + PseudoElement::RubyBaseContainer => atom!(":-moz-ruby-base-container"), + PseudoElement::RubyText => atom!(":-moz-ruby-text"), + PseudoElement::RubyTextContainer => atom!(":-moz-ruby-text-container"), + PseudoElement::Moztreecolumn => atom!(":-moz-tree-column"), + PseudoElement::Moztreerow => atom!(":-moz-tree-row"), + PseudoElement::Moztreeseparator => atom!(":-moz-tree-separator"), + PseudoElement::Moztreecell => atom!(":-moz-tree-cell"), + PseudoElement::Moztreeindentation => atom!(":-moz-tree-indentation"), + PseudoElement::Moztreeline => atom!(":-moz-tree-line"), + PseudoElement::Moztreetwisty => atom!(":-moz-tree-twisty"), + PseudoElement::Moztreeimage => atom!(":-moz-tree-image"), + PseudoElement::Moztreecelltext => atom!(":-moz-tree-cell-text"), + PseudoElement::Moztreecheckbox => atom!(":-moz-tree-checkbox"), + PseudoElement::Moztreeprogressmeter => atom!(":-moz-tree-progressmeter"), + PseudoElement::Moztreedropfeedback => atom!(":-moz-tree-drop-feedback"), + PseudoElement::MozSVGMarkerAnonChild => atom!(":-moz-svg-marker-anon-child"), + PseudoElement::MozSVGOuterSVGAnonChild => atom!(":-moz-svg-outer-svg-anon-child"), + PseudoElement::MozSVGForeignContent => atom!(":-moz-svg-foreign-content"), + PseudoElement::MozSVGText => atom!(":-moz-svg-text"), + } + } + + /// Whether this pseudo-element is an anonymous box. + #[inline] + fn is_anon_box(&self) -> bool { + match *self { + PseudoElement::After => false, + PseudoElement::Before => false, + PseudoElement::Backdrop => false, + PseudoElement::Cue => false, + PseudoElement::FirstLetter => false, + PseudoElement::FirstLine => false, + PseudoElement::MozSelection => false, + PseudoElement::MozFocusInner => false, + PseudoElement::MozFocusOuter => false, + PseudoElement::MozListBullet => false, + PseudoElement::MozListNumber => false, + PseudoElement::MozMathAnonymous => false, + PseudoElement::MozNumberWrapper => false, + PseudoElement::MozNumberText => false, + PseudoElement::MozNumberSpinBox => false, + PseudoElement::MozNumberSpinUp => false, + PseudoElement::MozNumberSpinDown => false, + PseudoElement::MozProgressBar => false, + PseudoElement::MozRangeTrack => false, + PseudoElement::MozRangeProgress => false, + PseudoElement::MozRangeThumb => false, + PseudoElement::MozMeterBar => false, + PseudoElement::MozPlaceholder => false, + PseudoElement::Placeholder => false, + PseudoElement::MozColorSwatch => false, + PseudoElement::MozText => true, + PseudoElement::OofPlaceholder => true, + PseudoElement::FirstLetterContinuation => true, + PseudoElement::MozBlockInsideInlineWrapper => true, + PseudoElement::MozMathMLAnonymousBlock => true, + PseudoElement::MozXULAnonymousBlock => true, + PseudoElement::HorizontalFramesetBorder => true, + PseudoElement::VerticalFramesetBorder => true, + PseudoElement::MozLineFrame => true, + PseudoElement::ButtonContent => true, + PseudoElement::CellContent => true, + PseudoElement::DropDownList => true, + PseudoElement::FieldsetContent => true, + PseudoElement::FramesetBlank => true, + PseudoElement::MozDisplayComboboxControlFrame => true, + PseudoElement::HtmlCanvasContent => true, + PseudoElement::InlineTable => true, + PseudoElement::Table => true, + PseudoElement::TableCell => true, + PseudoElement::TableColGroup => true, + PseudoElement::TableCol => true, + PseudoElement::TableWrapper => true, + PseudoElement::TableRowGroup => true, + PseudoElement::TableRow => true, + PseudoElement::Canvas => true, + PseudoElement::PageBreak => true, + PseudoElement::Page => true, + PseudoElement::PageContent => true, + PseudoElement::PageSequence => true, + PseudoElement::ScrolledContent => true, + PseudoElement::ScrolledCanvas => true, + PseudoElement::ScrolledPageSequence => true, + PseudoElement::ColumnContent => true, + PseudoElement::Viewport => true, + PseudoElement::ViewportScroll => true, + PseudoElement::AnonymousFlexItem => true, + PseudoElement::AnonymousGridItem => true, + PseudoElement::Ruby => true, + PseudoElement::RubyBase => true, + PseudoElement::RubyBaseContainer => true, + PseudoElement::RubyText => true, + PseudoElement::RubyTextContainer => true, + PseudoElement::Moztreecolumn => true, + PseudoElement::Moztreerow => true, + PseudoElement::Moztreeseparator => true, + PseudoElement::Moztreecell => true, + PseudoElement::Moztreeindentation => true, + PseudoElement::Moztreeline => true, + PseudoElement::Moztreetwisty => true, + PseudoElement::Moztreeimage => true, + PseudoElement::Moztreecelltext => true, + PseudoElement::Moztreecheckbox => true, + PseudoElement::Moztreeprogressmeter => true, + PseudoElement::Moztreedropfeedback => true, + PseudoElement::MozSVGMarkerAnonChild => true, + PseudoElement::MozSVGOuterSVGAnonChild => true, + PseudoElement::MozSVGForeignContent => true, + PseudoElement::MozSVGText => true, + } + } + + /// Whether this pseudo-element is eagerly-cascaded. + #[inline] + pub fn is_eager(&self) -> bool { + matches!(*self, + PseudoElement::Before | PseudoElement::After) + } + + /// Whether this pseudo-element is precomputed. + #[inline] + pub fn is_precomputed(&self) -> bool { + self.is_anon_box() + } + + /// Construct a pseudo-element from a `CSSPseudoElementType`. + #[inline] + pub fn from_pseudo_type(type_: CSSPseudoElementType) -> Option { + match type_ { + CSSPseudoElementType::after => { + Some(PseudoElement::After) + }, + CSSPseudoElementType::before => { + Some(PseudoElement::Before) + }, + CSSPseudoElementType::backdrop => { + Some(PseudoElement::Backdrop) + }, + CSSPseudoElementType::cue => { + Some(PseudoElement::Cue) + }, + CSSPseudoElementType::firstLetter => { + Some(PseudoElement::FirstLetter) + }, + CSSPseudoElementType::firstLine => { + Some(PseudoElement::FirstLine) + }, + CSSPseudoElementType::mozSelection => { + Some(PseudoElement::MozSelection) + }, + CSSPseudoElementType::mozFocusInner => { + Some(PseudoElement::MozFocusInner) + }, + CSSPseudoElementType::mozFocusOuter => { + Some(PseudoElement::MozFocusOuter) + }, + CSSPseudoElementType::mozListBullet => { + Some(PseudoElement::MozListBullet) + }, + CSSPseudoElementType::mozListNumber => { + Some(PseudoElement::MozListNumber) + }, + CSSPseudoElementType::mozMathAnonymous => { + Some(PseudoElement::MozMathAnonymous) + }, + CSSPseudoElementType::mozNumberWrapper => { + Some(PseudoElement::MozNumberWrapper) + }, + CSSPseudoElementType::mozNumberText => { + Some(PseudoElement::MozNumberText) + }, + CSSPseudoElementType::mozNumberSpinBox => { + Some(PseudoElement::MozNumberSpinBox) + }, + CSSPseudoElementType::mozNumberSpinUp => { + Some(PseudoElement::MozNumberSpinUp) + }, + CSSPseudoElementType::mozNumberSpinDown => { + Some(PseudoElement::MozNumberSpinDown) + }, + CSSPseudoElementType::mozProgressBar => { + Some(PseudoElement::MozProgressBar) + }, + CSSPseudoElementType::mozRangeTrack => { + Some(PseudoElement::MozRangeTrack) + }, + CSSPseudoElementType::mozRangeProgress => { + Some(PseudoElement::MozRangeProgress) + }, + CSSPseudoElementType::mozRangeThumb => { + Some(PseudoElement::MozRangeThumb) + }, + CSSPseudoElementType::mozMeterBar => { + Some(PseudoElement::MozMeterBar) + }, + CSSPseudoElementType::mozPlaceholder => { + Some(PseudoElement::MozPlaceholder) + }, + CSSPseudoElementType::placeholder => { + Some(PseudoElement::Placeholder) + }, + CSSPseudoElementType::mozColorSwatch => { + Some(PseudoElement::MozColorSwatch) + }, + _ => None, + } + } + + /// Construct a pseudo-element from an anonymous box `Atom`. + #[inline] + pub fn from_anon_box_atom(atom: &Atom) -> Option { + if atom == &atom!(":-moz-text") { + return Some(PseudoElement::MozText); + } + if atom == &atom!(":-moz-oof-placeholder") { + return Some(PseudoElement::OofPlaceholder); + } + if atom == &atom!(":-moz-first-letter-continuation") { + return Some(PseudoElement::FirstLetterContinuation); + } + if atom == &atom!(":-moz-block-inside-inline-wrapper") { + return Some(PseudoElement::MozBlockInsideInlineWrapper); + } + if atom == &atom!(":-moz-mathml-anonymous-block") { + return Some(PseudoElement::MozMathMLAnonymousBlock); + } + if atom == &atom!(":-moz-xul-anonymous-block") { + return Some(PseudoElement::MozXULAnonymousBlock); + } + if atom == &atom!(":-moz-hframeset-border") { + return Some(PseudoElement::HorizontalFramesetBorder); + } + if atom == &atom!(":-moz-vframeset-border") { + return Some(PseudoElement::VerticalFramesetBorder); + } + if atom == &atom!(":-moz-line-frame") { + return Some(PseudoElement::MozLineFrame); + } + if atom == &atom!(":-moz-button-content") { + return Some(PseudoElement::ButtonContent); + } + if atom == &atom!(":-moz-cell-content") { + return Some(PseudoElement::CellContent); + } + if atom == &atom!(":-moz-dropdown-list") { + return Some(PseudoElement::DropDownList); + } + if atom == &atom!(":-moz-fieldset-content") { + return Some(PseudoElement::FieldsetContent); + } + if atom == &atom!(":-moz-frameset-blank") { + return Some(PseudoElement::FramesetBlank); + } + if atom == &atom!(":-moz-display-comboboxcontrol-frame") { + return Some(PseudoElement::MozDisplayComboboxControlFrame); + } + if atom == &atom!(":-moz-html-canvas-content") { + return Some(PseudoElement::HtmlCanvasContent); + } + if atom == &atom!(":-moz-inline-table") { + return Some(PseudoElement::InlineTable); + } + if atom == &atom!(":-moz-table") { + return Some(PseudoElement::Table); + } + if atom == &atom!(":-moz-table-cell") { + return Some(PseudoElement::TableCell); + } + if atom == &atom!(":-moz-table-column-group") { + return Some(PseudoElement::TableColGroup); + } + if atom == &atom!(":-moz-table-column") { + return Some(PseudoElement::TableCol); + } + if atom == &atom!(":-moz-table-wrapper") { + return Some(PseudoElement::TableWrapper); + } + if atom == &atom!(":-moz-table-row-group") { + return Some(PseudoElement::TableRowGroup); + } + if atom == &atom!(":-moz-table-row") { + return Some(PseudoElement::TableRow); + } + if atom == &atom!(":-moz-canvas") { + return Some(PseudoElement::Canvas); + } + if atom == &atom!(":-moz-pagebreak") { + return Some(PseudoElement::PageBreak); + } + if atom == &atom!(":-moz-page") { + return Some(PseudoElement::Page); + } + if atom == &atom!(":-moz-pagecontent") { + return Some(PseudoElement::PageContent); + } + if atom == &atom!(":-moz-page-sequence") { + return Some(PseudoElement::PageSequence); + } + if atom == &atom!(":-moz-scrolled-content") { + return Some(PseudoElement::ScrolledContent); + } + if atom == &atom!(":-moz-scrolled-canvas") { + return Some(PseudoElement::ScrolledCanvas); + } + if atom == &atom!(":-moz-scrolled-page-sequence") { + return Some(PseudoElement::ScrolledPageSequence); + } + if atom == &atom!(":-moz-column-content") { + return Some(PseudoElement::ColumnContent); + } + if atom == &atom!(":-moz-viewport") { + return Some(PseudoElement::Viewport); + } + if atom == &atom!(":-moz-viewport-scroll") { + return Some(PseudoElement::ViewportScroll); + } + if atom == &atom!(":-moz-anonymous-flex-item") { + return Some(PseudoElement::AnonymousFlexItem); + } + if atom == &atom!(":-moz-anonymous-grid-item") { + return Some(PseudoElement::AnonymousGridItem); + } + if atom == &atom!(":-moz-ruby") { + return Some(PseudoElement::Ruby); + } + if atom == &atom!(":-moz-ruby-base") { + return Some(PseudoElement::RubyBase); + } + if atom == &atom!(":-moz-ruby-base-container") { + return Some(PseudoElement::RubyBaseContainer); + } + if atom == &atom!(":-moz-ruby-text") { + return Some(PseudoElement::RubyText); + } + if atom == &atom!(":-moz-ruby-text-container") { + return Some(PseudoElement::RubyTextContainer); + } + if atom == &atom!(":-moz-tree-column") { + return Some(PseudoElement::Moztreecolumn); + } + if atom == &atom!(":-moz-tree-row") { + return Some(PseudoElement::Moztreerow); + } + if atom == &atom!(":-moz-tree-separator") { + return Some(PseudoElement::Moztreeseparator); + } + if atom == &atom!(":-moz-tree-cell") { + return Some(PseudoElement::Moztreecell); + } + if atom == &atom!(":-moz-tree-indentation") { + return Some(PseudoElement::Moztreeindentation); + } + if atom == &atom!(":-moz-tree-line") { + return Some(PseudoElement::Moztreeline); + } + if atom == &atom!(":-moz-tree-twisty") { + return Some(PseudoElement::Moztreetwisty); + } + if atom == &atom!(":-moz-tree-image") { + return Some(PseudoElement::Moztreeimage); + } + if atom == &atom!(":-moz-tree-cell-text") { + return Some(PseudoElement::Moztreecelltext); + } + if atom == &atom!(":-moz-tree-checkbox") { + return Some(PseudoElement::Moztreecheckbox); + } + if atom == &atom!(":-moz-tree-progressmeter") { + return Some(PseudoElement::Moztreeprogressmeter); + } + if atom == &atom!(":-moz-tree-drop-feedback") { + return Some(PseudoElement::Moztreedropfeedback); + } + if atom == &atom!(":-moz-svg-marker-anon-child") { + return Some(PseudoElement::MozSVGMarkerAnonChild); + } + if atom == &atom!(":-moz-svg-outer-svg-anon-child") { + return Some(PseudoElement::MozSVGOuterSVGAnonChild); + } + if atom == &atom!(":-moz-svg-foreign-content") { + return Some(PseudoElement::MozSVGForeignContent); + } + if atom == &atom!(":-moz-svg-text") { + return Some(PseudoElement::MozSVGText); + } + None + } + + /// Constructs an atom from a string of text, and whether we're in a + /// user-agent stylesheet. + /// + /// If we're not in a user-agent stylesheet, we will never parse anonymous + /// box pseudo-elements. + /// + /// Returns `None` if the pseudo-element is not recognised. + #[inline] + pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option { + use std::ascii::AsciiExt; + + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("after") { + return Some(PseudoElement::After) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("before") { + return Some(PseudoElement::Before) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("backdrop") { + return Some(PseudoElement::Backdrop) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("cue") { + return Some(PseudoElement::Cue) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("first-letter") { + return Some(PseudoElement::FirstLetter) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("first-line") { + return Some(PseudoElement::FirstLine) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-selection") { + return Some(PseudoElement::MozSelection) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-focus-inner") { + return Some(PseudoElement::MozFocusInner) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-focus-outer") { + return Some(PseudoElement::MozFocusOuter) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-list-bullet") { + return Some(PseudoElement::MozListBullet) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-list-number") { + return Some(PseudoElement::MozListNumber) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-math-anonymous") { + return Some(PseudoElement::MozMathAnonymous) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-number-wrapper") { + return Some(PseudoElement::MozNumberWrapper) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-number-text") { + return Some(PseudoElement::MozNumberText) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-number-spin-box") { + return Some(PseudoElement::MozNumberSpinBox) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-number-spin-up") { + return Some(PseudoElement::MozNumberSpinUp) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-number-spin-down") { + return Some(PseudoElement::MozNumberSpinDown) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-progress-bar") { + return Some(PseudoElement::MozProgressBar) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-range-track") { + return Some(PseudoElement::MozRangeTrack) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-range-progress") { + return Some(PseudoElement::MozRangeProgress) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-range-thumb") { + return Some(PseudoElement::MozRangeThumb) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-meter-bar") { + return Some(PseudoElement::MozMeterBar) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-placeholder") { + return Some(PseudoElement::MozPlaceholder) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("placeholder") { + return Some(PseudoElement::Placeholder) + } + } + if !false || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-color-swatch") { + return Some(PseudoElement::MozColorSwatch) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-text") { + return Some(PseudoElement::MozText) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-oof-placeholder") { + return Some(PseudoElement::OofPlaceholder) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-first-letter-continuation") { + return Some(PseudoElement::FirstLetterContinuation) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-block-inside-inline-wrapper") { + return Some(PseudoElement::MozBlockInsideInlineWrapper) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-mathml-anonymous-block") { + return Some(PseudoElement::MozMathMLAnonymousBlock) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-xul-anonymous-block") { + return Some(PseudoElement::MozXULAnonymousBlock) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-hframeset-border") { + return Some(PseudoElement::HorizontalFramesetBorder) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-vframeset-border") { + return Some(PseudoElement::VerticalFramesetBorder) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-line-frame") { + return Some(PseudoElement::MozLineFrame) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-button-content") { + return Some(PseudoElement::ButtonContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-cell-content") { + return Some(PseudoElement::CellContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-dropdown-list") { + return Some(PseudoElement::DropDownList) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-fieldset-content") { + return Some(PseudoElement::FieldsetContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-frameset-blank") { + return Some(PseudoElement::FramesetBlank) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-display-comboboxcontrol-frame") { + return Some(PseudoElement::MozDisplayComboboxControlFrame) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-html-canvas-content") { + return Some(PseudoElement::HtmlCanvasContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-inline-table") { + return Some(PseudoElement::InlineTable) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-table") { + return Some(PseudoElement::Table) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-table-cell") { + return Some(PseudoElement::TableCell) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-table-column-group") { + return Some(PseudoElement::TableColGroup) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-table-column") { + return Some(PseudoElement::TableCol) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-table-wrapper") { + return Some(PseudoElement::TableWrapper) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-table-row-group") { + return Some(PseudoElement::TableRowGroup) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-table-row") { + return Some(PseudoElement::TableRow) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-canvas") { + return Some(PseudoElement::Canvas) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-pagebreak") { + return Some(PseudoElement::PageBreak) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-page") { + return Some(PseudoElement::Page) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-pagecontent") { + return Some(PseudoElement::PageContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-page-sequence") { + return Some(PseudoElement::PageSequence) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-scrolled-content") { + return Some(PseudoElement::ScrolledContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-scrolled-canvas") { + return Some(PseudoElement::ScrolledCanvas) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-scrolled-page-sequence") { + return Some(PseudoElement::ScrolledPageSequence) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-column-content") { + return Some(PseudoElement::ColumnContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-viewport") { + return Some(PseudoElement::Viewport) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-viewport-scroll") { + return Some(PseudoElement::ViewportScroll) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-anonymous-flex-item") { + return Some(PseudoElement::AnonymousFlexItem) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-anonymous-grid-item") { + return Some(PseudoElement::AnonymousGridItem) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-ruby") { + return Some(PseudoElement::Ruby) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-ruby-base") { + return Some(PseudoElement::RubyBase) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-ruby-base-container") { + return Some(PseudoElement::RubyBaseContainer) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-ruby-text") { + return Some(PseudoElement::RubyText) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-ruby-text-container") { + return Some(PseudoElement::RubyTextContainer) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-column") { + return Some(PseudoElement::Moztreecolumn) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-row") { + return Some(PseudoElement::Moztreerow) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-separator") { + return Some(PseudoElement::Moztreeseparator) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-cell") { + return Some(PseudoElement::Moztreecell) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-indentation") { + return Some(PseudoElement::Moztreeindentation) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-line") { + return Some(PseudoElement::Moztreeline) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-twisty") { + return Some(PseudoElement::Moztreetwisty) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-image") { + return Some(PseudoElement::Moztreeimage) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-cell-text") { + return Some(PseudoElement::Moztreecelltext) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-checkbox") { + return Some(PseudoElement::Moztreecheckbox) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-progressmeter") { + return Some(PseudoElement::Moztreeprogressmeter) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-tree-drop-feedback") { + return Some(PseudoElement::Moztreedropfeedback) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-svg-marker-anon-child") { + return Some(PseudoElement::MozSVGMarkerAnonChild) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-svg-outer-svg-anon-child") { + return Some(PseudoElement::MozSVGOuterSVGAnonChild) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-svg-foreign-content") { + return Some(PseudoElement::MozSVGForeignContent) + } + } + if !true || in_ua_stylesheet { + if s.eq_ignore_ascii_case("-moz-svg-text") { + return Some(PseudoElement::MozSVGText) + } + } + + None + } + + /// Returns the pseudo-element's definition as a string, with only one colon + /// before it. + pub fn as_str(&self) -> &'static str { + match *self { + PseudoElement::After => ":after", + PseudoElement::Before => ":before", + PseudoElement::Backdrop => ":backdrop", + PseudoElement::Cue => ":cue", + PseudoElement::FirstLetter => ":first-letter", + PseudoElement::FirstLine => ":first-line", + PseudoElement::MozSelection => ":-moz-selection", + PseudoElement::MozFocusInner => ":-moz-focus-inner", + PseudoElement::MozFocusOuter => ":-moz-focus-outer", + PseudoElement::MozListBullet => ":-moz-list-bullet", + PseudoElement::MozListNumber => ":-moz-list-number", + PseudoElement::MozMathAnonymous => ":-moz-math-anonymous", + PseudoElement::MozNumberWrapper => ":-moz-number-wrapper", + PseudoElement::MozNumberText => ":-moz-number-text", + PseudoElement::MozNumberSpinBox => ":-moz-number-spin-box", + PseudoElement::MozNumberSpinUp => ":-moz-number-spin-up", + PseudoElement::MozNumberSpinDown => ":-moz-number-spin-down", + PseudoElement::MozProgressBar => ":-moz-progress-bar", + PseudoElement::MozRangeTrack => ":-moz-range-track", + PseudoElement::MozRangeProgress => ":-moz-range-progress", + PseudoElement::MozRangeThumb => ":-moz-range-thumb", + PseudoElement::MozMeterBar => ":-moz-meter-bar", + PseudoElement::MozPlaceholder => ":-moz-placeholder", + PseudoElement::Placeholder => ":placeholder", + PseudoElement::MozColorSwatch => ":-moz-color-swatch", + PseudoElement::MozText => ":-moz-text", + PseudoElement::OofPlaceholder => ":-moz-oof-placeholder", + PseudoElement::FirstLetterContinuation => ":-moz-first-letter-continuation", + PseudoElement::MozBlockInsideInlineWrapper => ":-moz-block-inside-inline-wrapper", + PseudoElement::MozMathMLAnonymousBlock => ":-moz-mathml-anonymous-block", + PseudoElement::MozXULAnonymousBlock => ":-moz-xul-anonymous-block", + PseudoElement::HorizontalFramesetBorder => ":-moz-hframeset-border", + PseudoElement::VerticalFramesetBorder => ":-moz-vframeset-border", + PseudoElement::MozLineFrame => ":-moz-line-frame", + PseudoElement::ButtonContent => ":-moz-button-content", + PseudoElement::CellContent => ":-moz-cell-content", + PseudoElement::DropDownList => ":-moz-dropdown-list", + PseudoElement::FieldsetContent => ":-moz-fieldset-content", + PseudoElement::FramesetBlank => ":-moz-frameset-blank", + PseudoElement::MozDisplayComboboxControlFrame => ":-moz-display-comboboxcontrol-frame", + PseudoElement::HtmlCanvasContent => ":-moz-html-canvas-content", + PseudoElement::InlineTable => ":-moz-inline-table", + PseudoElement::Table => ":-moz-table", + PseudoElement::TableCell => ":-moz-table-cell", + PseudoElement::TableColGroup => ":-moz-table-column-group", + PseudoElement::TableCol => ":-moz-table-column", + PseudoElement::TableWrapper => ":-moz-table-wrapper", + PseudoElement::TableRowGroup => ":-moz-table-row-group", + PseudoElement::TableRow => ":-moz-table-row", + PseudoElement::Canvas => ":-moz-canvas", + PseudoElement::PageBreak => ":-moz-pagebreak", + PseudoElement::Page => ":-moz-page", + PseudoElement::PageContent => ":-moz-pagecontent", + PseudoElement::PageSequence => ":-moz-page-sequence", + PseudoElement::ScrolledContent => ":-moz-scrolled-content", + PseudoElement::ScrolledCanvas => ":-moz-scrolled-canvas", + PseudoElement::ScrolledPageSequence => ":-moz-scrolled-page-sequence", + PseudoElement::ColumnContent => ":-moz-column-content", + PseudoElement::Viewport => ":-moz-viewport", + PseudoElement::ViewportScroll => ":-moz-viewport-scroll", + PseudoElement::AnonymousFlexItem => ":-moz-anonymous-flex-item", + PseudoElement::AnonymousGridItem => ":-moz-anonymous-grid-item", + PseudoElement::Ruby => ":-moz-ruby", + PseudoElement::RubyBase => ":-moz-ruby-base", + PseudoElement::RubyBaseContainer => ":-moz-ruby-base-container", + PseudoElement::RubyText => ":-moz-ruby-text", + PseudoElement::RubyTextContainer => ":-moz-ruby-text-container", + PseudoElement::Moztreecolumn => ":-moz-tree-column", + PseudoElement::Moztreerow => ":-moz-tree-row", + PseudoElement::Moztreeseparator => ":-moz-tree-separator", + PseudoElement::Moztreecell => ":-moz-tree-cell", + PseudoElement::Moztreeindentation => ":-moz-tree-indentation", + PseudoElement::Moztreeline => ":-moz-tree-line", + PseudoElement::Moztreetwisty => ":-moz-tree-twisty", + PseudoElement::Moztreeimage => ":-moz-tree-image", + PseudoElement::Moztreecelltext => ":-moz-tree-cell-text", + PseudoElement::Moztreecheckbox => ":-moz-tree-checkbox", + PseudoElement::Moztreeprogressmeter => ":-moz-tree-progressmeter", + PseudoElement::Moztreedropfeedback => ":-moz-tree-drop-feedback", + PseudoElement::MozSVGMarkerAnonChild => ":-moz-svg-marker-anon-child", + PseudoElement::MozSVGOuterSVGAnonChild => ":-moz-svg-outer-svg-anon-child", + PseudoElement::MozSVGForeignContent => ":-moz-svg-foreign-content", + PseudoElement::MozSVGText => ":-moz-svg-text", + } + } +} diff --git a/components/style/gecko/generated/pseudo_element_helper.rs b/components/style/gecko/generated/pseudo_element_helper.rs deleted file mode 100644 index e9d61b03bd8..00000000000 --- a/components/style/gecko/generated/pseudo_element_helper.rs +++ /dev/null @@ -1,280 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/* Autogenerated file created by components/style/binding_tools/regen_atoms.py, DO NOT EDIT DIRECTLY */ - -/* - * This file contains a helper macro invocation to aid Gecko's style system - * pseudo-element integration. - * - * This file is NOT INTENDED to be compiled as a standalone module. - * - * Also, it guarantees the property that normal pseudo-elements are processed - * before anonymous boxes. - * - * Expected usage is as follows: - * - * ``` - * fn have_to_use_pseudo_elements() { - * macro_rules! pseudo_element { - * ($pseudo_str_with_colon:expr, $pseudo_atom:expr, $is_anon_box:true) => {{ - * // Stuff stuff stuff. - * }} - * } - * include!("path/to/helper.rs") - * } - * ``` - * - */ -{ - pseudo_element!(":after", - atom!(":after"), - false); - pseudo_element!(":before", - atom!(":before"), - false); - pseudo_element!(":backdrop", - atom!(":backdrop"), - false); - pseudo_element!(":cue", - atom!(":cue"), - false); - pseudo_element!(":first-letter", - atom!(":first-letter"), - false); - pseudo_element!(":first-line", - atom!(":first-line"), - false); - pseudo_element!(":-moz-selection", - atom!(":-moz-selection"), - false); - pseudo_element!(":-moz-focus-inner", - atom!(":-moz-focus-inner"), - false); - pseudo_element!(":-moz-focus-outer", - atom!(":-moz-focus-outer"), - false); - pseudo_element!(":-moz-list-bullet", - atom!(":-moz-list-bullet"), - false); - pseudo_element!(":-moz-list-number", - atom!(":-moz-list-number"), - false); - pseudo_element!(":-moz-math-anonymous", - atom!(":-moz-math-anonymous"), - false); - pseudo_element!(":-moz-number-wrapper", - atom!(":-moz-number-wrapper"), - false); - pseudo_element!(":-moz-number-text", - atom!(":-moz-number-text"), - false); - pseudo_element!(":-moz-number-spin-box", - atom!(":-moz-number-spin-box"), - false); - pseudo_element!(":-moz-number-spin-up", - atom!(":-moz-number-spin-up"), - false); - pseudo_element!(":-moz-number-spin-down", - atom!(":-moz-number-spin-down"), - false); - pseudo_element!(":-moz-progress-bar", - atom!(":-moz-progress-bar"), - false); - pseudo_element!(":-moz-range-track", - atom!(":-moz-range-track"), - false); - pseudo_element!(":-moz-range-progress", - atom!(":-moz-range-progress"), - false); - pseudo_element!(":-moz-range-thumb", - atom!(":-moz-range-thumb"), - false); - pseudo_element!(":-moz-meter-bar", - atom!(":-moz-meter-bar"), - false); - pseudo_element!(":-moz-placeholder", - atom!(":-moz-placeholder"), - false); - pseudo_element!(":placeholder", - atom!(":placeholder"), - false); - pseudo_element!(":-moz-color-swatch", - atom!(":-moz-color-swatch"), - false); - pseudo_element!(":-moz-text", - atom!(":-moz-text"), - true); - pseudo_element!(":-moz-oof-placeholder", - atom!(":-moz-oof-placeholder"), - true); - pseudo_element!(":-moz-first-letter-continuation", - atom!(":-moz-first-letter-continuation"), - true); - pseudo_element!(":-moz-block-inside-inline-wrapper", - atom!(":-moz-block-inside-inline-wrapper"), - true); - pseudo_element!(":-moz-mathml-anonymous-block", - atom!(":-moz-mathml-anonymous-block"), - true); - pseudo_element!(":-moz-xul-anonymous-block", - atom!(":-moz-xul-anonymous-block"), - true); - pseudo_element!(":-moz-hframeset-border", - atom!(":-moz-hframeset-border"), - true); - pseudo_element!(":-moz-vframeset-border", - atom!(":-moz-vframeset-border"), - true); - pseudo_element!(":-moz-line-frame", - atom!(":-moz-line-frame"), - true); - pseudo_element!(":-moz-button-content", - atom!(":-moz-button-content"), - true); - pseudo_element!(":-moz-cell-content", - atom!(":-moz-cell-content"), - true); - pseudo_element!(":-moz-dropdown-list", - atom!(":-moz-dropdown-list"), - true); - pseudo_element!(":-moz-fieldset-content", - atom!(":-moz-fieldset-content"), - true); - pseudo_element!(":-moz-frameset-blank", - atom!(":-moz-frameset-blank"), - true); - pseudo_element!(":-moz-display-comboboxcontrol-frame", - atom!(":-moz-display-comboboxcontrol-frame"), - true); - pseudo_element!(":-moz-html-canvas-content", - atom!(":-moz-html-canvas-content"), - true); - pseudo_element!(":-moz-inline-table", - atom!(":-moz-inline-table"), - true); - pseudo_element!(":-moz-table", - atom!(":-moz-table"), - true); - pseudo_element!(":-moz-table-cell", - atom!(":-moz-table-cell"), - true); - pseudo_element!(":-moz-table-column-group", - atom!(":-moz-table-column-group"), - true); - pseudo_element!(":-moz-table-column", - atom!(":-moz-table-column"), - true); - pseudo_element!(":-moz-table-wrapper", - atom!(":-moz-table-wrapper"), - true); - pseudo_element!(":-moz-table-row-group", - atom!(":-moz-table-row-group"), - true); - pseudo_element!(":-moz-table-row", - atom!(":-moz-table-row"), - true); - pseudo_element!(":-moz-canvas", - atom!(":-moz-canvas"), - true); - pseudo_element!(":-moz-pagebreak", - atom!(":-moz-pagebreak"), - true); - pseudo_element!(":-moz-page", - atom!(":-moz-page"), - true); - pseudo_element!(":-moz-pagecontent", - atom!(":-moz-pagecontent"), - true); - pseudo_element!(":-moz-page-sequence", - atom!(":-moz-page-sequence"), - true); - pseudo_element!(":-moz-scrolled-content", - atom!(":-moz-scrolled-content"), - true); - pseudo_element!(":-moz-scrolled-canvas", - atom!(":-moz-scrolled-canvas"), - true); - pseudo_element!(":-moz-scrolled-page-sequence", - atom!(":-moz-scrolled-page-sequence"), - true); - pseudo_element!(":-moz-column-content", - atom!(":-moz-column-content"), - true); - pseudo_element!(":-moz-viewport", - atom!(":-moz-viewport"), - true); - pseudo_element!(":-moz-viewport-scroll", - atom!(":-moz-viewport-scroll"), - true); - pseudo_element!(":-moz-anonymous-flex-item", - atom!(":-moz-anonymous-flex-item"), - true); - pseudo_element!(":-moz-anonymous-grid-item", - atom!(":-moz-anonymous-grid-item"), - true); - pseudo_element!(":-moz-ruby", - atom!(":-moz-ruby"), - true); - pseudo_element!(":-moz-ruby-base", - atom!(":-moz-ruby-base"), - true); - pseudo_element!(":-moz-ruby-base-container", - atom!(":-moz-ruby-base-container"), - true); - pseudo_element!(":-moz-ruby-text", - atom!(":-moz-ruby-text"), - true); - pseudo_element!(":-moz-ruby-text-container", - atom!(":-moz-ruby-text-container"), - true); - pseudo_element!(":-moz-tree-column", - atom!(":-moz-tree-column"), - true); - pseudo_element!(":-moz-tree-row", - atom!(":-moz-tree-row"), - true); - pseudo_element!(":-moz-tree-separator", - atom!(":-moz-tree-separator"), - true); - pseudo_element!(":-moz-tree-cell", - atom!(":-moz-tree-cell"), - true); - pseudo_element!(":-moz-tree-indentation", - atom!(":-moz-tree-indentation"), - true); - pseudo_element!(":-moz-tree-line", - atom!(":-moz-tree-line"), - true); - pseudo_element!(":-moz-tree-twisty", - atom!(":-moz-tree-twisty"), - true); - pseudo_element!(":-moz-tree-image", - atom!(":-moz-tree-image"), - true); - pseudo_element!(":-moz-tree-cell-text", - atom!(":-moz-tree-cell-text"), - true); - pseudo_element!(":-moz-tree-checkbox", - atom!(":-moz-tree-checkbox"), - true); - pseudo_element!(":-moz-tree-progressmeter", - atom!(":-moz-tree-progressmeter"), - true); - pseudo_element!(":-moz-tree-drop-feedback", - atom!(":-moz-tree-drop-feedback"), - true); - pseudo_element!(":-moz-svg-marker-anon-child", - atom!(":-moz-svg-marker-anon-child"), - true); - pseudo_element!(":-moz-svg-outer-svg-anon-child", - atom!(":-moz-svg-outer-svg-anon-child"), - true); - pseudo_element!(":-moz-svg-foreign-content", - atom!(":-moz-svg-foreign-content"), - true); - pseudo_element!(":-moz-svg-text", - atom!(":-moz-svg-text"), - true); -} diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index dd2114a1f06..3141fa27c16 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -974,6 +974,7 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; + pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -1168,6 +1169,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 { @@ -1197,10 +1200,17 @@ pub mod root { pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct __iterator_traits { + pub _address: u8, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct reverse_iterator<_Iterator> { pub current: _Iterator, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, @@ -1218,7 +1228,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_89651() { + fn __bindgen_test_layout_atomic_instantiation_61468() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1227,7 +1237,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_89659() { + fn __bindgen_test_layout_atomic_instantiation_61476() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -1288,8 +1298,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1379,9 +1390,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -1456,11 +1467,6 @@ pub mod root { impl Clone for nsCStringRepr { fn clone(&self) -> Self { *self } } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct AllocPolicyBasedFreePolicy { - pub _address: u8, - } /** * LinkedList supports refcounted elements using this adapter class. Clients * using LinkedList> will get a data structure that holds a strong @@ -1896,7 +1902,7 @@ pub mod root { pub struct ImageValue { pub _base: root::mozilla::css::URLValueData, pub mRequests: [u64; 6usize], - pub mInitialized: bool, + pub mLoadedImage: bool, } #[test] fn bindgen_test_layout_ImageValue() { @@ -1912,10 +1918,10 @@ pub mod root { "Alignment of field: " , stringify ! ( ImageValue ) , "::" , stringify ! ( mRequests ) )); assert_eq! (unsafe { - & ( * ( 0 as * const ImageValue ) ) . mInitialized + & ( * ( 0 as * const ImageValue ) ) . mLoadedImage as * const _ as usize } , 104usize , concat ! ( "Alignment of field: " , stringify ! ( ImageValue - ) , "::" , stringify ! ( mInitialized ) )); + ) , "::" , stringify ! ( mLoadedImage ) )); } #[repr(C)] #[derive(Debug)] @@ -6883,7 +6889,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_141274() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_118151() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -8022,7 +8028,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct ImageCacheKey { - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mBlobSerial: [u64; 2usize], pub mOriginAttributes: root::mozilla::OriginAttributes, pub mControlledDocument: *mut ::std::os::raw::c_void, @@ -9096,8 +9102,10 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } + pub type ComputedKeyframeValues = + root::nsTArray; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_178529() { + fn __bindgen_test_layout_DefaultDelete_instantiation_155856() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11412,22 +11420,6 @@ pub mod root { "Alignment of " , stringify ! ( nsCString ) )); } #[repr(C)] - #[derive(Debug)] - pub struct nsDependentCSubstring { - pub _base: root::nsACString, - } - pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring; - #[test] - fn bindgen_test_layout_nsDependentCSubstring() { - assert_eq!(::std::mem::size_of::() , 16usize , - concat ! ( - "Size of: " , stringify ! ( nsDependentCSubstring ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsDependentCSubstring ) - )); - } - #[repr(C)] pub struct nsCStringComparator__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] @@ -11552,7 +11544,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_55035() { + fn __bindgen_test_layout_nsCharTraits_instantiation_51312() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11563,7 +11555,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_55039() { + fn __bindgen_test_layout_nsCharTraits_instantiation_51316() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12483,26 +12475,6 @@ pub mod root { pub type MutableHandleValue = root::JS::MutableHandle; pub type RootedObject = [u64; 3usize]; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct DeletePolicy { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct FreePolicy { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_FreePolicy() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! - ( "Size of: " , stringify ! ( FreePolicy ) )); - assert_eq! (::std::mem::align_of::() , 1usize , concat - ! ( "Alignment of " , stringify ! ( FreePolicy ) )); - } - impl Clone for FreePolicy { - fn clone(&self) -> Self { *self } - } /** * A GC pointer, tagged with the trace kind. * @@ -12810,6 +12782,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -12971,6 +12948,96 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /** + * Describes a single error or warning that occurs in the execution of script. + */ + #[repr(C)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + pub flags: ::std::os::raw::c_uint, + pub exnType: i16, + pub _bitfield_1: u8, + pub __bindgen_padding_0: u8, + } + #[test] + fn bindgen_test_layout_JSErrorReport() { + assert_eq!(::std::mem::size_of::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebuf_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as + * const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebufLength_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( tokenOffset_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . notes as * const + _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( notes ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . flags as * const + _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( flags ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . exnType as * + const _ as usize } , 68usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( exnType ) )); + } + impl JSErrorReport { + #[inline] + pub fn isMuted(&self) -> bool { + let mask = 1usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 0usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mask = 2usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 1usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -13036,7 +13103,7 @@ pub mod root { } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_92866() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_64757() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -13784,7 +13851,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() { @@ -13889,7 +13956,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; @@ -13999,7 +14066,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] @@ -16399,7 +16466,7 @@ pub mod root { */ 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, @@ -19686,7 +19753,7 @@ pub mod root { pub _base_1: root::nsWrapperCache, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, - pub mContent: root::nsCOMPtr, + pub mContent: root::nsCOMPtr, /** * Cache of Attrs. */ @@ -20719,57 +20786,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = - _bindgen_ty_84::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_84 { + pub enum _bindgen_ty_77 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -25922,7 +25989,7 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -27154,7 +27221,7 @@ pub mod root { pub _mOwningThread: root::nsAutoOwningThread, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -27181,8 +27248,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -28612,7 +28679,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_174521() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_151848() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30711,7 +30778,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -31074,48 +31141,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_86 + 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_86::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_86 = - _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_86 = - _bindgen_ty_86::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_HAS_SCROLLGRAB; + 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_86 { + pub enum _bindgen_ty_79 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -31836,7 +31903,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_202097() { + fn __bindgen_test_layout_IntegralConstant_instantiation_179636() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31845,7 +31912,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_202101() { + fn __bindgen_test_layout_IntegralConstant_instantiation_179640() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31854,69 +31921,59 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_202928() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_202932() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_203005() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_180472() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_203009() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_180475() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - } - #[test] - fn __bindgen_test_layout__bindgen_ty_id_208835_instantiation_208832() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_208868_instantiation_208865() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + fn __bindgen_test_layout_nsReadingIterator_instantiation_180547() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209136() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_180550() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_184957() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31927,7 +31984,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_210095() { + fn __bindgen_test_layout_Handle_instantiation_185808() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31938,7 +31995,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_210111() { + fn __bindgen_test_layout_Handle_instantiation_185824() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31949,7 +32006,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_210121() { + fn __bindgen_test_layout_MutableHandle_instantiation_185834() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31960,7 +32017,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_210137() { + fn __bindgen_test_layout_MutableHandle_instantiation_185850() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31971,7 +32028,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_210140() { + fn __bindgen_test_layout_Rooted_instantiation_185853() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31982,18 +32039,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_210477() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_212527() { + fn __bindgen_test_layout_nsTArray_instantiation_188400() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32004,7 +32050,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_212531() { + fn __bindgen_test_layout_nsTArray_instantiation_188404() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32015,18 +32061,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_212544() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_188417() { + 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_TenuredHeap_instantiation_213669() { + fn __bindgen_test_layout_TenuredHeap_instantiation_189579() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32037,7 +32083,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_213759() { + fn __bindgen_test_layout_Heap_instantiation_189669() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32048,7 +32094,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_213874() { + fn __bindgen_test_layout_Heap_instantiation_189784() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32059,7 +32105,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_213881() { + fn __bindgen_test_layout_TErrorResult_instantiation_189791() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32070,7 +32116,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_213897() { + fn __bindgen_test_layout_TErrorResult_instantiation_189807() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32081,7 +32127,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_213902() { + fn __bindgen_test_layout_already_AddRefed_instantiation_189812() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32092,7 +32138,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_213954() { + fn __bindgen_test_layout_already_AddRefed_instantiation_189864() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32103,7 +32149,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_214437() { + fn __bindgen_test_layout_RefPtr_instantiation_190347() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32114,7 +32160,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214783() { + fn __bindgen_test_layout_already_AddRefed_instantiation_190693() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32125,7 +32171,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_215028() { + fn __bindgen_test_layout_already_AddRefed_instantiation_190938() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32136,7 +32182,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_215175() { + fn __bindgen_test_layout_already_AddRefed_instantiation_191085() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32147,18 +32193,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_219294() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_219292() { + fn __bindgen_test_layout_UniquePtr_instantiation_195189() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32169,7 +32204,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_219327() { + fn __bindgen_test_layout_iterator_instantiation_195221() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32180,7 +32215,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_219895() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_195790() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32191,7 +32226,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_221493() { + fn __bindgen_test_layout_nsTArray_instantiation_197378() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32204,7 +32239,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_221769() { + fn __bindgen_test_layout_LinkedList_instantiation_197651() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32215,7 +32250,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_221785() { + fn __bindgen_test_layout_RefPtr_instantiation_197667() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32226,7 +32261,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_221784() { + fn __bindgen_test_layout_nsTArray_instantiation_197666() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32239,7 +32274,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_221814() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_197696() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32250,7 +32285,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_221813() { + fn __bindgen_test_layout_nsTArray_instantiation_197695() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32261,7 +32296,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_221859() { + fn __bindgen_test_layout_already_AddRefed_instantiation_197741() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32272,7 +32307,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_222024() { + fn __bindgen_test_layout_already_AddRefed_instantiation_197906() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32283,7 +32318,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_222351() { + fn __bindgen_test_layout_already_AddRefed_instantiation_198233() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32294,7 +32329,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_222444() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_198326() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32305,29 +32340,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_222481() { - 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_DefaultDelete_instantiation_222739() { - 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_instantiation_222737() { + fn __bindgen_test_layout_UniquePtr_instantiation_198617() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32338,7 +32351,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_223287() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_199164() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32351,7 +32364,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_223286() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_199163() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32362,7 +32375,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_223403() { + fn __bindgen_test_layout_nsTArray_instantiation_199279() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32373,7 +32386,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_223454() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_199330() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32382,7 +32395,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_223634() { + fn __bindgen_test_layout_nsTArray_instantiation_199510() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32393,18 +32406,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_223750() { - 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_nsTArray_instantiation_223915() { + fn __bindgen_test_layout_nsTArray_instantiation_199788() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32415,7 +32417,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_224702() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_200575() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32426,7 +32428,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_224794() { + fn __bindgen_test_layout_already_AddRefed_instantiation_200667() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32437,7 +32439,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_224975() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_200848() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32448,7 +32450,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_225498() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_201371() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32459,7 +32461,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_225506() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_201379() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32470,7 +32472,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_225621() { + fn __bindgen_test_layout_OwningNonNull_instantiation_201494() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32481,7 +32483,18 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_226700() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_201621() { + 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_PointTyped_instantiation_202573() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32492,7 +32505,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_226705() { + fn __bindgen_test_layout_IntPointTyped_instantiation_202576() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32503,7 +32516,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_226708() { + fn __bindgen_test_layout_SizeTyped_instantiation_202579() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32514,7 +32527,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_226716() { + fn __bindgen_test_layout_RectTyped_instantiation_202585() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32525,7 +32538,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_226748() { + fn __bindgen_test_layout_IntPointTyped_instantiation_202609() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32536,7 +32549,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_226756() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_202615() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32547,7 +32560,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_226764() { + fn __bindgen_test_layout_IntRectTyped_instantiation_202621() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32558,7 +32571,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_226931() { + fn __bindgen_test_layout_MarginTyped_instantiation_202750() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32569,7 +32582,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_226966() { + fn __bindgen_test_layout_RectTyped_instantiation_202777() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32580,7 +32593,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_226971() { + fn __bindgen_test_layout_IntRectTyped_instantiation_202780() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32591,7 +32604,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_227017() { + fn __bindgen_test_layout_ScaleFactor_instantiation_202816() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32600,7 +32613,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_227117() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_202916() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32611,7 +32624,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_227125() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_202924() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32622,7 +32635,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_227169() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_202968() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32633,7 +32646,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_227799() { + fn __bindgen_test_layout_nsTArray_instantiation_203598() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32646,7 +32659,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_227815() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_203614() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32657,7 +32670,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_231089() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_206877() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32668,7 +32681,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_231725() { + fn __bindgen_test_layout_already_AddRefed_instantiation_207510() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32679,18 +32692,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_231816() { - 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_nsRefPtrHashtable_instantiation_231820() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_207602() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32701,7 +32703,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_233009() { + fn __bindgen_test_layout_already_AddRefed_instantiation_208791() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32712,7 +32714,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_233295() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_209137() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32723,7 +32725,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_234885() { + fn __bindgen_test_layout_nsTArray_instantiation_210717() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32734,7 +32736,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_234897() { + fn __bindgen_test_layout_RefPtr_instantiation_210729() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32747,7 +32749,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_234896() { + fn __bindgen_test_layout_nsTArray_instantiation_210728() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32760,7 +32762,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_234930() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_210762() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32771,7 +32773,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_235027() { + fn __bindgen_test_layout_UniquePtr_instantiation_210859() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32782,7 +32784,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_236809() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_212630() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32793,7 +32795,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_236848() { + fn __bindgen_test_layout_OwningNonNull_instantiation_212669() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32806,7 +32808,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_236869() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212690() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32817,7 +32819,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_236900() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212721() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32828,18 +32830,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_237445() { - 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_already_AddRefed_instantiation_237459() { + fn __bindgen_test_layout_already_AddRefed_instantiation_213277() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32850,7 +32841,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_237463() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_213281() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32861,7 +32852,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_237537() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_213355() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32872,18 +32863,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_237824() { - 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_instantiation_237822() { + fn __bindgen_test_layout_UniquePtr_instantiation_213640() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32894,18 +32874,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_237830() { - 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_instantiation_237828() { + fn __bindgen_test_layout_UniquePtr_instantiation_213643() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32916,7 +32885,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_238173() { + fn __bindgen_test_layout_Maybe_instantiation_213985() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32927,7 +32896,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_238340() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_214151() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32936,7 +32905,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_238491() { + fn __bindgen_test_layout_Maybe_instantiation_214304() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32947,7 +32916,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_238506() { + fn __bindgen_test_layout_already_AddRefed_instantiation_214319() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32958,18 +32927,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_238514() { - 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_instantiation_238512() { + fn __bindgen_test_layout_UniquePtr_instantiation_214325() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32980,18 +32938,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_238553() { - 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_pair_instantiation_238704() { + fn __bindgen_test_layout_pair_instantiation_214511() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33002,7 +32949,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_238703() { + fn __bindgen_test_layout_nsTArray_instantiation_214510() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -33017,7 +32964,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_239705() { + fn __bindgen_test_layout_RefPtr_instantiation_215512() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33028,7 +32975,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_243697() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_219500() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33039,7 +32986,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_244289() { + fn __bindgen_test_layout_nsTArray_instantiation_220092() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33052,7 +32999,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_244471() { + fn __bindgen_test_layout_Maybe_instantiation_220272() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33063,7 +33010,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_244646() { + fn __bindgen_test_layout_RefPtr_instantiation_220447() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33074,7 +33021,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_244890() { + fn __bindgen_test_layout_Sequence_instantiation_220691() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -33083,7 +33030,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_245189() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_220990() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33094,7 +33041,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_245188() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_220989() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33105,7 +33052,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_246324() { + fn __bindgen_test_layout_nsTArray_instantiation_222132() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33116,7 +33063,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_246362() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_222170() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko/generated/structs_release.rs b/components/style/gecko/generated/structs_release.rs index 6c30b5bcdce..b1aa9e383de 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -974,6 +974,7 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; + pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -1168,6 +1169,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 { @@ -1197,10 +1200,17 @@ pub mod root { pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct __iterator_traits { + pub _address: u8, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct reverse_iterator<_Iterator> { pub current: _Iterator, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, @@ -1218,7 +1228,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_88535() { + fn __bindgen_test_layout_atomic_instantiation_60317() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1227,7 +1237,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_88543() { + fn __bindgen_test_layout_atomic_instantiation_60325() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -1282,8 +1292,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1373,9 +1384,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -1819,10 +1830,11 @@ pub mod root { pub struct ImageValue { pub _base: root::mozilla::css::URLValueData, pub mRequests: [u64; 5usize], + pub mLoadedImage: bool, } #[test] fn bindgen_test_layout_ImageValue() { - assert_eq!(::std::mem::size_of::() , 96usize , + assert_eq!(::std::mem::size_of::() , 104usize , concat ! ( "Size of: " , stringify ! ( ImageValue ) )); assert_eq! (::std::mem::align_of::() , 8usize , @@ -1833,6 +1845,11 @@ pub mod root { * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( ImageValue ) , "::" , stringify ! ( mRequests ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const ImageValue ) ) . mLoadedImage + as * const _ as usize } , 96usize , concat ! ( + "Alignment of field: " , stringify ! ( ImageValue + ) , "::" , stringify ! ( mLoadedImage ) )); } #[repr(C)] #[derive(Debug)] @@ -6337,24 +6354,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct MallocAllocPolicy { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_MallocAllocPolicy() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of: " , stringify ! ( MallocAllocPolicy ) )); - assert_eq! (::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of " , stringify ! ( MallocAllocPolicy ) - )); - } - impl Clone for MallocAllocPolicy { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct ErrorResult { pub _bindgen_opaque_blob: [u64; 2usize], } @@ -6748,7 +6747,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_138166() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_114814() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -7777,7 +7776,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct ImageCacheKey { - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mBlobSerial: [u64; 2usize], pub mOriginAttributes: root::mozilla::OriginAttributes, pub mControlledDocument: *mut ::std::os::raw::c_void, @@ -8851,8 +8850,10 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } + pub type ComputedKeyframeValues = + root::nsTArray; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_175037() { + fn __bindgen_test_layout_DefaultDelete_instantiation_152177() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -10945,22 +10946,6 @@ pub mod root { "Alignment of " , stringify ! ( nsCString ) )); } #[repr(C)] - #[derive(Debug)] - pub struct nsDependentCSubstring { - pub _base: root::nsACString, - } - pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring; - #[test] - fn bindgen_test_layout_nsDependentCSubstring() { - assert_eq!(::std::mem::size_of::() , 16usize , - concat ! ( - "Size of: " , stringify ! ( nsDependentCSubstring ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsDependentCSubstring ) - )); - } - #[repr(C)] pub struct nsCStringComparator__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] @@ -11085,7 +11070,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_53827() { + fn __bindgen_test_layout_nsCharTraits_instantiation_50051() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11096,7 +11081,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_53831() { + fn __bindgen_test_layout_nsCharTraits_instantiation_50055() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12004,26 +11989,6 @@ pub mod root { pub type MutableHandleValue = root::JS::MutableHandle; pub type RootedObject = [u64; 3usize]; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct DeletePolicy { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct FreePolicy { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_FreePolicy() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! - ( "Size of: " , stringify ! ( FreePolicy ) )); - assert_eq! (::std::mem::align_of::() , 1usize , concat - ! ( "Alignment of " , stringify ! ( FreePolicy ) )); - } - impl Clone for FreePolicy { - fn clone(&self) -> Self { *self } - } /** * A GC pointer, tagged with the trace kind. * @@ -12331,6 +12296,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -12484,6 +12454,96 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /** + * Describes a single error or warning that occurs in the execution of script. + */ + #[repr(C)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + pub flags: ::std::os::raw::c_uint, + pub exnType: i16, + pub _bitfield_1: u8, + pub __bindgen_padding_0: u8, + } + #[test] + fn bindgen_test_layout_JSErrorReport() { + assert_eq!(::std::mem::size_of::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebuf_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as + * const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebufLength_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( tokenOffset_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . notes as * const + _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( notes ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . flags as * const + _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( flags ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . exnType as * + const _ as usize } , 68usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( exnType ) )); + } + impl JSErrorReport { + #[inline] + pub fn isMuted(&self) -> bool { + let mask = 1usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 0usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mask = 2usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 1usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -12733,7 +12793,7 @@ pub mod root { } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_91623() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_63481() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -13449,7 +13509,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() { @@ -13554,7 +13614,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; @@ -13657,7 +13717,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] @@ -16030,7 +16090,7 @@ pub mod root { */ 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, @@ -20297,57 +20357,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_82 { + pub enum _bindgen_ty_72 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -25498,7 +25558,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 mLoadFlags: root::nsLoadFlags, @@ -26638,7 +26698,7 @@ pub mod root { pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -26665,8 +26725,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -28096,7 +28156,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_171029() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_148169() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30195,7 +30255,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -30558,48 +30618,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_84 + root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_74 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_84 { + pub enum _bindgen_ty_74 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -31320,7 +31380,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_198488() { + fn __bindgen_test_layout_IntegralConstant_instantiation_175838() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31329,7 +31389,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_198492() { + fn __bindgen_test_layout_IntegralConstant_instantiation_175842() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31338,69 +31398,59 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_199316() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_199320() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_199393() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_176671() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_199397() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_176674() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - } - #[test] - fn __bindgen_test_layout__bindgen_ty_id_205166_instantiation_205163() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_205199_instantiation_205196() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + fn __bindgen_test_layout_nsReadingIterator_instantiation_176746() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_205467() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_176749() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_181103() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31411,7 +31461,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_206419() { + fn __bindgen_test_layout_Handle_instantiation_181947() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31422,7 +31472,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_206435() { + fn __bindgen_test_layout_Handle_instantiation_181963() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31433,7 +31483,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_206445() { + fn __bindgen_test_layout_MutableHandle_instantiation_181973() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31444,7 +31494,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_206461() { + fn __bindgen_test_layout_MutableHandle_instantiation_181989() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31455,7 +31505,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_206464() { + fn __bindgen_test_layout_Rooted_instantiation_181992() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31466,18 +31516,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_206801() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_208804() { + fn __bindgen_test_layout_nsTArray_instantiation_184495() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31488,7 +31527,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_208808() { + fn __bindgen_test_layout_nsTArray_instantiation_184499() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31499,18 +31538,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_208821() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_184512() { + 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_TenuredHeap_instantiation_209688() { + fn __bindgen_test_layout_TenuredHeap_instantiation_185365() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31521,7 +31560,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_209778() { + fn __bindgen_test_layout_Heap_instantiation_185455() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31532,7 +31571,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_209888() { + fn __bindgen_test_layout_TErrorResult_instantiation_185565() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31543,7 +31582,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_209904() { + fn __bindgen_test_layout_TErrorResult_instantiation_185581() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31554,7 +31593,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_209909() { + fn __bindgen_test_layout_already_AddRefed_instantiation_185586() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31565,7 +31604,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_209961() { + fn __bindgen_test_layout_already_AddRefed_instantiation_185638() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31576,7 +31615,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_210435() { + fn __bindgen_test_layout_RefPtr_instantiation_186112() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31587,7 +31626,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_210781() { + fn __bindgen_test_layout_already_AddRefed_instantiation_186458() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31598,7 +31637,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_211024() { + fn __bindgen_test_layout_already_AddRefed_instantiation_186701() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31609,7 +31648,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_211171() { + fn __bindgen_test_layout_already_AddRefed_instantiation_186848() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31620,18 +31659,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_215266() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_215264() { + fn __bindgen_test_layout_UniquePtr_instantiation_190928() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31642,7 +31670,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_215299() { + fn __bindgen_test_layout_iterator_instantiation_190960() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31653,7 +31681,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_215865() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_191527() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31664,7 +31692,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_217123() { + fn __bindgen_test_layout_Heap_instantiation_192775() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31675,7 +31703,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_217465() { + fn __bindgen_test_layout_nsTArray_instantiation_193117() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31688,7 +31716,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_217741() { + fn __bindgen_test_layout_LinkedList_instantiation_193390() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31699,7 +31727,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_217757() { + fn __bindgen_test_layout_RefPtr_instantiation_193406() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31710,7 +31738,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_217756() { + fn __bindgen_test_layout_nsTArray_instantiation_193405() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31723,7 +31751,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_217786() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_193435() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31734,7 +31762,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_217785() { + fn __bindgen_test_layout_nsTArray_instantiation_193434() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31745,7 +31773,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_217831() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193480() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31756,7 +31784,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_217996() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193645() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31767,7 +31795,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_218323() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193972() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31778,7 +31806,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_218416() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_194065() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31789,29 +31817,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_218453() { - 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_DefaultDelete_instantiation_218709() { - 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_instantiation_218707() { + fn __bindgen_test_layout_UniquePtr_instantiation_194354() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31822,7 +31828,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_219247() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_194891() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31835,7 +31841,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_219246() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_194890() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31846,7 +31852,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_219363() { + fn __bindgen_test_layout_nsTArray_instantiation_195006() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31857,7 +31863,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_219410() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_195053() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -31866,7 +31872,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_219587() { + fn __bindgen_test_layout_nsTArray_instantiation_195230() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31877,18 +31883,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_219703() { - 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_nsTArray_instantiation_219865() { + fn __bindgen_test_layout_nsTArray_instantiation_195505() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31899,7 +31894,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_220652() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_196292() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31910,7 +31905,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_220744() { + fn __bindgen_test_layout_already_AddRefed_instantiation_196384() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31921,7 +31916,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_220925() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_196565() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31932,7 +31927,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_221442() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_197082() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31943,7 +31938,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_221557() { + fn __bindgen_test_layout_OwningNonNull_instantiation_197197() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31954,7 +31949,18 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_221842() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_197324() { + 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_nsPtrHashKey_instantiation_197484() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31965,7 +31971,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_222633() { + fn __bindgen_test_layout_PointTyped_instantiation_198273() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31976,7 +31982,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_222638() { + fn __bindgen_test_layout_IntPointTyped_instantiation_198276() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31987,7 +31993,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_222641() { + fn __bindgen_test_layout_SizeTyped_instantiation_198279() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31998,7 +32004,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_222649() { + fn __bindgen_test_layout_RectTyped_instantiation_198285() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32009,7 +32015,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_222681() { + fn __bindgen_test_layout_IntPointTyped_instantiation_198309() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32020,7 +32026,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_222689() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_198315() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32031,7 +32037,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_222697() { + fn __bindgen_test_layout_IntRectTyped_instantiation_198321() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32042,7 +32048,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_222864() { + fn __bindgen_test_layout_MarginTyped_instantiation_198450() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32053,7 +32059,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_222899() { + fn __bindgen_test_layout_RectTyped_instantiation_198477() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32064,7 +32070,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_222904() { + fn __bindgen_test_layout_IntRectTyped_instantiation_198480() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32075,7 +32081,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_222950() { + fn __bindgen_test_layout_ScaleFactor_instantiation_198516() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32084,7 +32090,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_223050() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198616() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32095,7 +32101,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_223058() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198624() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32106,7 +32112,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_223102() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198668() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32117,7 +32123,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_223732() { + fn __bindgen_test_layout_nsTArray_instantiation_199298() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32130,7 +32136,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_223748() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_199314() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32141,7 +32147,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_227020() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_202572() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32152,7 +32158,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_227650() { + fn __bindgen_test_layout_already_AddRefed_instantiation_203199() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32163,18 +32169,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_227741() { - 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_nsRefPtrHashtable_instantiation_227745() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_203291() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32185,7 +32180,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_228934() { + fn __bindgen_test_layout_already_AddRefed_instantiation_204480() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32196,7 +32191,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_229220() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_204826() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32207,7 +32202,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_230810() { + fn __bindgen_test_layout_nsTArray_instantiation_206406() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32218,7 +32213,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_230822() { + fn __bindgen_test_layout_RefPtr_instantiation_206418() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32231,7 +32226,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_230821() { + fn __bindgen_test_layout_nsTArray_instantiation_206417() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32244,7 +32239,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_230855() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_206451() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32255,7 +32250,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_230952() { + fn __bindgen_test_layout_UniquePtr_instantiation_206548() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32266,7 +32261,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_232714() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_208299() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32277,7 +32272,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_232753() { + fn __bindgen_test_layout_OwningNonNull_instantiation_208338() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32290,7 +32285,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_232774() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208359() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32301,7 +32296,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_232805() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208390() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32312,18 +32307,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_233350() { - 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_already_AddRefed_instantiation_233364() { + fn __bindgen_test_layout_already_AddRefed_instantiation_208946() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32334,7 +32318,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_233368() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_208950() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32345,7 +32329,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_233442() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_209024() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32356,18 +32340,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_233729() { - 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_instantiation_233727() { + fn __bindgen_test_layout_UniquePtr_instantiation_209309() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32378,18 +32351,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_233735() { - 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_instantiation_233733() { + fn __bindgen_test_layout_UniquePtr_instantiation_209312() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32400,7 +32362,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_234005() { + fn __bindgen_test_layout_Maybe_instantiation_209581() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32411,7 +32373,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_234172() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_209747() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32420,7 +32382,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_234320() { + fn __bindgen_test_layout_Maybe_instantiation_209897() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32431,7 +32393,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_234335() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209912() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32442,18 +32404,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_234343() { - 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_instantiation_234341() { + fn __bindgen_test_layout_UniquePtr_instantiation_209918() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32464,18 +32415,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_234382() { - 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_pair_instantiation_234533() { + fn __bindgen_test_layout_pair_instantiation_210104() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32486,7 +32426,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_234532() { + fn __bindgen_test_layout_nsTArray_instantiation_210103() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -32501,7 +32441,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_235534() { + fn __bindgen_test_layout_RefPtr_instantiation_211105() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32512,7 +32452,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_239526() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_215093() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32523,7 +32463,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_240118() { + fn __bindgen_test_layout_nsTArray_instantiation_215685() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32536,7 +32476,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_240294() { + fn __bindgen_test_layout_Maybe_instantiation_215859() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32547,7 +32487,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_240469() { + fn __bindgen_test_layout_RefPtr_instantiation_216034() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32558,7 +32498,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_240713() { + fn __bindgen_test_layout_Sequence_instantiation_216278() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32567,7 +32507,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_241012() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_216577() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32578,7 +32518,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_241011() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_216576() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32589,7 +32529,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_242145() { + fn __bindgen_test_layout_nsTArray_instantiation_217717() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32600,7 +32540,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_242181() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_217753() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko/mod.rs b/components/style/gecko/mod.rs index 92582823527..cfdf45d43b8 100644 --- a/components/style/gecko/mod.rs +++ b/components/style/gecko/mod.rs @@ -12,6 +12,7 @@ pub mod conversions; pub mod data; pub mod global_style_data; pub mod media_queries; +pub mod pseudo_element; pub mod restyle_damage; pub mod rules; pub mod selector_parser; diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs new file mode 100644 index 00000000000..f5793499108 --- /dev/null +++ b/components/style/gecko/pseudo_element.rs @@ -0,0 +1,71 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//! Gecko's definition of a pseudo-element. +//! +//! Note that a few autogenerated bits of this live in +//! `pseudo_element_definition.mako.rs`. If you touch that file, you probably +//! need to update the checked-in files for Servo. + +use cssparser::ToCss; +use gecko_bindings::structs::CSSPseudoElementType; +use selector_parser::PseudoElementCascadeType; +use std::fmt; +use string_cache::Atom; + +include!(concat!(env!("OUT_DIR"), "/gecko/pseudo_element_definition.rs")); + +impl PseudoElement { + /// Returns the kind of cascade type that a given pseudo is going to use. + /// + /// In Gecko we only compute ::before and ::after eagerly. We save the rules + /// for anonymous boxes separately, so we resolve them as precomputed + /// pseudos. + /// + /// We resolve the others lazily, see `Servo_ResolvePseudoStyle`. + pub fn cascade_type(&self) -> PseudoElementCascadeType { + if self.is_eager() { + debug_assert!(!self.is_anon_box()); + return PseudoElementCascadeType::Eager + } + + if self.is_anon_box() { + return PseudoElementCascadeType::Precomputed + } + + PseudoElementCascadeType::Lazy + } + + /// Gets the canonical index of this eagerly-cascaded pseudo-element. + #[inline] + pub fn eager_index(&self) -> usize { + EAGER_PSEUDOS.iter().position(|p| p == self) + .expect("Not an eager pseudo") + } + + /// Creates a pseudo-element from an eager index. + #[inline] + pub fn from_eager_index(i: usize) -> Self { + EAGER_PSEUDOS[i].clone() + } + + /// Whether this pseudo-element is ::before or ::after. + #[inline] + pub fn is_before_or_after(&self) -> bool { + matches!(*self, PseudoElement::Before | PseudoElement::After) + } + + /// Whether this pseudo-element is lazily-cascaded. + #[inline] + pub fn is_lazy(&self) -> bool { + !self.is_eager() && !self.is_precomputed() + } +} + +impl ToCss for PseudoElement { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + dest.write_char(':')?; + dest.write_str(self.as_str()) + } +} diff --git a/components/style/gecko/pseudo_element_definition.mako.rs b/components/style/gecko/pseudo_element_definition.mako.rs new file mode 100644 index 00000000000..0872ed9a9a2 --- /dev/null +++ b/components/style/gecko/pseudo_element_definition.mako.rs @@ -0,0 +1,128 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/// Gecko's pseudo-element definition. +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub enum PseudoElement { + % for pseudo in PSEUDOS: + /// ${pseudo.value} + ${pseudo.capitalized()}, + % endfor +} + +<% EAGER_PSEUDOS = ["Before", "After"] %> + +/// The number of eager pseudo-elements. +pub const EAGER_PSEUDO_COUNT: usize = ${len(EAGER_PSEUDOS)}; + +/// The list of eager pseudos. +pub const EAGER_PSEUDOS: [PseudoElement; EAGER_PSEUDO_COUNT] = [ + % for eager_pseudo_name in EAGER_PSEUDOS: + PseudoElement::${eager_pseudo_name}, + % endfor +]; + +impl PseudoElement { + /// Executes a closure with each pseudo-element as an argument. + pub fn each(mut fun: F) + where F: FnMut(Self), + { + % for pseudo in PSEUDOS: + fun(PseudoElement::${pseudo.capitalized()}); + % endfor + } + + /// Get the pseudo-element as an atom. + #[inline] + pub fn atom(&self) -> Atom { + match *self { + % for pseudo in PSEUDOS: + PseudoElement::${pseudo.capitalized()} => atom!("${pseudo.value}"), + % endfor + } + } + + /// Whether this pseudo-element is an anonymous box. + #[inline] + fn is_anon_box(&self) -> bool { + match *self { + % for pseudo in PSEUDOS: + PseudoElement::${pseudo.capitalized()} => ${str(pseudo.is_anon_box()).lower()}, + % endfor + } + } + + /// Whether this pseudo-element is eagerly-cascaded. + #[inline] + pub fn is_eager(&self) -> bool { + matches!(*self, + ${" | ".join(map(lambda name: "PseudoElement::{}".format(name), EAGER_PSEUDOS))}) + } + + /// Whether this pseudo-element is precomputed. + #[inline] + pub fn is_precomputed(&self) -> bool { + self.is_anon_box() + } + + /// Construct a pseudo-element from a `CSSPseudoElementType`. + #[inline] + pub fn from_pseudo_type(type_: CSSPseudoElementType) -> Option { + match type_ { + % for pseudo in PSEUDOS: + % if not pseudo.is_anon_box(): + CSSPseudoElementType::${pseudo.original_ident} => { + Some(PseudoElement::${pseudo.capitalized()}) + }, + % endif + % endfor + _ => None, + } + } + + /// Construct a pseudo-element from an anonymous box `Atom`. + #[inline] + pub fn from_anon_box_atom(atom: &Atom) -> Option { + % for pseudo in PSEUDOS: + % if pseudo.is_anon_box(): + if atom == &atom!("${pseudo.value}") { + return Some(PseudoElement::${pseudo.capitalized()}); + } + % endif + % endfor + None + } + + /// Constructs an atom from a string of text, and whether we're in a + /// user-agent stylesheet. + /// + /// If we're not in a user-agent stylesheet, we will never parse anonymous + /// box pseudo-elements. + /// + /// Returns `None` if the pseudo-element is not recognised. + #[inline] + pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option { + use std::ascii::AsciiExt; + + % for pseudo in PSEUDOS: + if !${str(pseudo.is_anon_box()).lower()} || in_ua_stylesheet { + if s.eq_ignore_ascii_case("${pseudo.value[1:]}") { + return Some(PseudoElement::${pseudo.capitalized()}) + } + } + % endfor + + None + } + + /// Returns the pseudo-element's definition as a string, with only one colon + /// before it. + pub fn as_str(&self) -> &'static str { + match *self { + % for pseudo in PSEUDOS: + PseudoElement::${pseudo.capitalized()} => "${pseudo.value}", + % endfor + } + } +} diff --git a/components/style/binding_tools/regen_atoms.py b/components/style/gecko/regen_atoms.py similarity index 79% rename from components/style/binding_tools/regen_atoms.py rename to components/style/gecko/regen_atoms.py index 05acee47a7d..810729c2d2a 100755 --- a/components/style/binding_tools/regen_atoms.py +++ b/components/style/gecko/regen_atoms.py @@ -10,6 +10,10 @@ import sys from io import BytesIO +GECKO_DIR = os.path.dirname(__file__.replace('\\', '/')) +sys.path.insert(0, os.path.join(os.path.dirname(GECKO_DIR), "properties")) + +import build PRELUDE = """ /* This Source Code Form is subject to the terms of the Mozilla Public @@ -74,7 +78,7 @@ def map_atom(ident): class Atom: def __init__(self, source, ident, value): self.ident = "{}_{}".format(source.CLASS, ident) - self._original_ident = ident + self.original_ident = ident self.value = value self.source = source @@ -82,17 +86,23 @@ class Atom: return self.source.CLASS def gnu_symbol(self): - return gnu_symbolify(self.source, self._original_ident) + return gnu_symbolify(self.source, self.original_ident) def msvc32_symbol(self): - return msvc32_symbolify(self.source, self._original_ident) + return msvc32_symbolify(self.source, self.original_ident) def msvc64_symbol(self): - return msvc64_symbolify(self.source, self._original_ident) + return msvc64_symbolify(self.source, self.original_ident) def type(self): return self.source.TYPE + def capitalized(self): + return self.original_ident[0].upper() + self.original_ident[1:] + + def is_anon_box(self): + return self.type() == "nsICSSAnonBoxPseudo" + def collect_atoms(objdir): atoms = [] @@ -211,56 +221,24 @@ def write_atom_macro(atoms, file_name): f.write(MACRO.format('\n'.join(macro_rules))) -PSEUDO_ELEMENT_HEADER = """ -/* - * This file contains a helper macro invocation to aid Gecko's style system - * pseudo-element integration. - * - * This file is NOT INTENDED to be compiled as a standalone module. - * - * Also, it guarantees the property that normal pseudo-elements are processed - * before anonymous boxes. - * - * Expected usage is as follows: - * - * ``` - * fn have_to_use_pseudo_elements() { - * macro_rules! pseudo_element { - * ($pseudo_str_with_colon:expr, $pseudo_atom:expr, $is_anon_box:true) => {{ - * // Stuff stuff stuff. - * }} - * } - * include!("path/to/helper.rs") - * } - * ``` - * - */ -""" +def write_pseudo_elements(atoms, target_filename): + pseudos = [] + for atom in atoms: + if atom.type() == "nsICSSPseudoElement" or atom.type() == "nsICSSAnonBoxPseudo": + pseudos.append(atom) -PSEUDO_ELEMENT_MACRO_INVOCATION = """ - pseudo_element!(\"{}\", - atom!(\"{}\"), - {}); -"""[1:] + pseudo_definition_template = os.path.join(GECKO_DIR, "pseudo_element_definition.mako.rs") + print("cargo:rerun-if-changed={}".format(pseudo_definition_template)) + contents = build.render(pseudo_definition_template, PSEUDOS=pseudos) - -def write_pseudo_element_helper(atoms, target_filename): with FileAvoidWrite(target_filename) as f: - f.write(PRELUDE) - f.write(PSEUDO_ELEMENT_HEADER) - f.write("{\n") - for atom in atoms: - if atom.type() == "nsICSSPseudoElement": - f.write(PSEUDO_ELEMENT_MACRO_INVOCATION.format(atom.value, atom.value, "false")) - elif atom.type() == "nsICSSAnonBoxPseudo": - f.write(PSEUDO_ELEMENT_MACRO_INVOCATION.format(atom.value, atom.value, "true")) - f.write("}\n") + f.write(contents) def generate_atoms(dist, out): atoms = collect_atoms(dist) write_atom_macro(atoms, os.path.join(out, "atom_macro.rs")) - write_pseudo_element_helper(atoms, os.path.join(out, "pseudo_element_helper.rs")) + write_pseudo_elements(atoms, os.path.join(out, "pseudo_element_definition.rs")) if __name__ == "__main__": diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index 459305672e1..9c67c06d60a 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -8,213 +8,16 @@ use cssparser::{Parser, ToCss}; use element_state::{IN_ACTIVE_STATE, IN_FOCUS_STATE, IN_HOVER_STATE}; use element_state::ElementState; use gecko_bindings::structs::CSSPseudoClassType; -use gecko_bindings::structs::nsIAtom; use selector_parser::{SelectorParser, PseudoElementCascadeType}; use selectors::parser::{ComplexSelector, SelectorMethods}; use selectors::visitor::SelectorVisitor; use std::borrow::Cow; use std::fmt; -use std::ptr; use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace}; +pub use gecko::pseudo_element::{PseudoElement, EAGER_PSEUDOS, EAGER_PSEUDO_COUNT}; pub use gecko::snapshot::SnapshotMap; -/// A representation of a CSS pseudo-element. -/// -/// In Gecko, we represent pseudo-elements as plain `Atom`s. -/// -/// The boolean field represents whether this element is an anonymous box. This -/// is just for convenience, instead of recomputing it. -/// -/// Also, note that the `Atom` member is always a static atom, so if space is a -/// concern, we can use the raw pointer and use the lower bit to represent it -/// without space overhead. -/// -/// FIXME(emilio): we know all these atoms are static. Patches are starting to -/// pile up, but a further potential optimisation is generating bindings without -/// `-no-gen-bitfield-methods` (that was removed to compile on stable, but it no -/// longer depends on it), and using the raw *mut nsIAtom (properly asserting -/// we're a static atom). -/// -/// This should allow us to avoid random FFI overhead when cloning/dropping -/// pseudos. -/// -/// Also, we can further optimize PartialEq and hash comparing/hashing only the -/// atoms. -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub struct PseudoElement(Atom, bool); - -/// List of eager pseudos. Keep this in sync with the count below. -macro_rules! each_eager_pseudo { - ($macro_name:ident, $atom_macro:ident) => { - $macro_name!($atom_macro!(":after"), 0); - $macro_name!($atom_macro!(":before"), 1); - } -} - -/// The number of eager pseudo-elements (just ::before and ::after). -pub const EAGER_PSEUDO_COUNT: usize = 2; - - -impl PseudoElement { - /// Returns the kind of cascade type that a given pseudo is going to use. - /// - /// In Gecko we only compute ::before and ::after eagerly. We save the rules - /// for anonymous boxes separately, so we resolve them as precomputed - /// pseudos. - /// - /// We resolve the others lazily, see `Servo_ResolvePseudoStyle`. - pub fn cascade_type(&self) -> PseudoElementCascadeType { - if self.is_eager() { - debug_assert!(!self.is_anon_box()); - return PseudoElementCascadeType::Eager - } - - if self.is_anon_box() { - return PseudoElementCascadeType::Precomputed - } - - PseudoElementCascadeType::Lazy - } - - /// Gets the canonical index of this eagerly-cascaded pseudo-element. - #[inline] - pub fn eager_index(&self) -> usize { - macro_rules! case { - ($atom:expr, $idx:expr) => { if *self.as_atom() == $atom { return $idx; } } - } - each_eager_pseudo!(case, atom); - panic!("Not eager") - } - - /// Creates a pseudo-element from an eager index. - #[inline] - pub fn from_eager_index(i: usize) -> Self { - macro_rules! case { - ($atom:expr, $idx:expr) => { if i == $idx { return PseudoElement($atom, false); } } - } - each_eager_pseudo!(case, atom); - panic!("Not eager") - } - - /// Get the pseudo-element as an atom. - #[inline] - pub fn as_atom(&self) -> &Atom { - &self.0 - } - - /// Whether this pseudo-element is an anonymous box. - #[inline] - fn is_anon_box(&self) -> bool { - self.1 - } - - /// Whether this pseudo-element is ::before or ::after. - #[inline] - pub fn is_before_or_after(&self) -> bool { - *self.as_atom() == atom!(":before") || - *self.as_atom() == atom!(":after") - } - - /// Whether this pseudo-element is eagerly-cascaded. - #[inline] - pub fn is_eager(&self) -> bool { - macro_rules! case { - ($atom:expr, $idx:expr) => { if *self.as_atom() == $atom { return true; } } - } - each_eager_pseudo!(case, atom); - return false; - } - - /// Whether this pseudo-element is lazily-cascaded. - #[inline] - pub fn is_lazy(&self) -> bool { - !self.is_eager() && !self.is_precomputed() - } - - /// Whether this pseudo-element is precomputed. - #[inline] - pub fn is_precomputed(&self) -> bool { - self.is_anon_box() - } - - /// Construct a pseudo-element from an `Atom`, receiving whether it is also - /// an anonymous box, and don't check it on release builds. - /// - /// On debug builds we assert it's the result we expect. - #[inline] - pub fn from_atom_unchecked(atom: Atom, is_anon_box: bool) -> Self { - if cfg!(debug_assertions) { - // Do the check on debug regardless. - match Self::from_atom(&*atom, true) { - Some(pseudo) => { - assert_eq!(pseudo.is_anon_box(), is_anon_box); - return pseudo; - } - None => panic!("Unknown pseudo: {:?}", atom), - } - } - - PseudoElement(atom, is_anon_box) - } - - #[inline] - fn from_atom(atom: &WeakAtom, _in_ua: bool) -> Option { - macro_rules! pseudo_element { - ($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => {{ - if atom == &*$atom { - return Some(PseudoElement($atom, $is_anon_box)); - } - }} - } - - include!(concat!(env!("OUT_DIR"), "/gecko/pseudo_element_helper.rs")); - - None - } - - /// Constructs an atom from a string of text, and whether we're in a - /// user-agent stylesheet. - /// - /// If we're not in a user-agent stylesheet, we will never parse anonymous - /// box pseudo-elements. - /// - /// Returns `None` if the pseudo-element is not recognised. - #[inline] - fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option { - use std::ascii::AsciiExt; - macro_rules! pseudo_element { - ($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => {{ - if !$is_anon_box || in_ua_stylesheet { - if s.eq_ignore_ascii_case(&$pseudo_str_with_colon[1..]) { - return Some(PseudoElement($atom, $is_anon_box)) - } - } - }} - } - - include!(concat!(env!("OUT_DIR"), "/gecko/pseudo_element_helper.rs")); - - None - } - - /// Returns null or nsIAtom pointer corresponding to a given PseudoElement. - #[inline] - pub fn ns_atom_or_null_from_opt(pseudo: Option<&PseudoElement>) -> *mut nsIAtom { - pseudo.map(|p| p.as_atom().as_ptr()).unwrap_or(ptr::null_mut()) - } -} - -impl ToCss for PseudoElement { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - // FIXME: why does the atom contain one colon? Pseudo-element has two - debug_assert!(self.0.as_slice().starts_with(&[b':' as u16]) && - !self.0.as_slice().starts_with(&[b':' as u16, b':' as u16])); - try!(dest.write_char(':')); - write!(dest, "{}", self.0) - } -} - bitflags! { flags NonTSPseudoClassFlag: u8 { // See NonTSPseudoClass::is_internal() @@ -561,25 +364,18 @@ impl SelectorImpl { pub fn each_eagerly_cascaded_pseudo_element(mut fun: F) where F: FnMut(PseudoElement), { - macro_rules! case { - ($atom:expr, $idx:expr) => { fun(PseudoElement($atom, false)); } + for pseudo in &EAGER_PSEUDOS { + fun(pseudo.clone()) } - each_eager_pseudo!(case, atom); } #[inline] /// Executes a function for each pseudo-element. - pub fn each_pseudo_element(mut fun: F) + pub fn each_pseudo_element(fun: F) where F: FnMut(PseudoElement), { - macro_rules! pseudo_element { - ($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => {{ - fun(PseudoElement($atom, $is_anon_box)); - }} - } - - include!(concat!(env!("OUT_DIR"), "/gecko/pseudo_element_helper.rs")); + PseudoElement::each(fun) } #[inline] diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 6558fbc38a1..41224c0b403 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -627,7 +627,8 @@ impl<'le> TElement for GeckoElement<'le> { _existing_values: &'a Arc, pseudo: Option<&PseudoElement>) -> Option<&'a nsStyleContext> { - let atom_ptr = PseudoElement::ns_atom_or_null_from_opt(pseudo); + // TODO(emilio): Migrate this to CSSPseudoElementType. + let atom_ptr = pseudo.map_or(ptr::null_mut(), |p| p.atom().as_ptr()); unsafe { let context_ptr = Gecko_GetStyleContext(self.0, atom_ptr); context_ptr.as_ref() @@ -699,15 +700,9 @@ impl<'le> TElement for GeckoElement<'le> { return None; } - let maybe_atom = + let pseudo_type = unsafe { bindings::Gecko_GetImplementedPseudo(self.0) }; - - if maybe_atom.is_null() { - return None; - } - - let atom = Atom::from(maybe_atom); - Some(PseudoElement::from_atom_unchecked(atom, /* anon_box = */ false)) + PseudoElement::from_pseudo_type(pseudo_type) } fn store_children_to_process(&self, _: isize) { diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 439f4d82bb1..1a673afc790 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -58,10 +58,10 @@ use style::gecko_bindings::bindings::nsTArrayBorrowed_uintptr_t; use style::gecko_bindings::bindings::nsTimingFunctionBorrowed; use style::gecko_bindings::bindings::nsTimingFunctionBorrowedMut; use style::gecko_bindings::structs; +use style::gecko_bindings::structs::{CSSPseudoElementType, CompositeOperation}; use style::gecko_bindings::structs::{RawServoStyleRule, ServoStyleSheet}; use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom, nsCSSPropertyID}; use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint, nsCSSFontFaceRule}; -use style::gecko_bindings::structs::CompositeOperation; use style::gecko_bindings::structs::Loader; use style::gecko_bindings::structs::RawGeckoPresContextOwned; use style::gecko_bindings::structs::ServoElementSnapshotTable; @@ -474,7 +474,7 @@ pub extern "C" fn Servo_AnimationValue_Uncompute(value: RawServoAnimationValueBo pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(raw_data: RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed, snapshots: *const ServoElementSnapshotTable, - pseudo_tag: *mut nsIAtom) + pseudo_type: CSSPseudoElementType) -> ServoComputedValuesStrong { use style::matching::MatchMethods; @@ -492,12 +492,7 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(raw_data: RawSe let element_data = element.borrow_data().unwrap(); let styles = element_data.styles(); - let pseudo = if pseudo_tag.is_null() { - None - } else { - let atom = Atom::from(pseudo_tag); - Some(PseudoElement::from_atom_unchecked(atom, /* anon_box = */ false)) - }; + let pseudo = PseudoElement::from_pseudo_type(pseudo_type); let pseudos = &styles.pseudos; let pseudo_style = match pseudo { Some(ref p) => { @@ -974,7 +969,8 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: let guards = StylesheetGuards::same(&guard); let data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); let atom = Atom::from(pseudo_tag); - let pseudo = PseudoElement::from_atom_unchecked(atom, /* anon_box = */ true); + let pseudo = PseudoElement::from_anon_box_atom(&atom) + .expect("Not an anon box pseudo?"); let maybe_parent = ComputedValues::arc_from_borrowed(&parent_style_or_null); @@ -991,7 +987,7 @@ pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: #[no_mangle] pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, - pseudo_tag: *mut nsIAtom, + pseudo_type: CSSPseudoElementType, is_probe: bool, raw_data: RawServoStyleSetBorrowed) -> ServoComputedValuesStrong @@ -1010,9 +1006,12 @@ pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, }; } + let pseudo = PseudoElement::from_pseudo_type(pseudo_type) + .expect("ResolvePseudoStyle with a non-pseudo?"); + let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); - match get_pseudo_style(&guard, element, pseudo_tag, data.styles(), doc_data) { + match get_pseudo_style(&guard, element, &pseudo, data.styles(), doc_data) { Some(values) => values.into_strong(), // FIXME(emilio): This looks pretty wrong! Shouldn't it be at least an // empty style inheriting from the element? @@ -1043,12 +1042,11 @@ pub extern "C" fn Servo_HasAuthorSpecifiedRules(element: RawGeckoElementBorrowed fn get_pseudo_style(guard: &SharedRwLockReadGuard, element: GeckoElement, - pseudo_tag: *mut nsIAtom, + pseudo: &PseudoElement, styles: &ElementStyles, doc_data: &PerDocumentStyleData) -> Option> { - let pseudo = PseudoElement::from_atom_unchecked(Atom::from(pseudo_tag), false); match pseudo.cascade_type() { PseudoElementCascadeType::Eager => styles.pseudos.get(&pseudo).map(|s| s.values().clone()), PseudoElementCascadeType::Precomputed => unreachable!("No anonymous boxes"), @@ -1981,7 +1979,7 @@ pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed, #[no_mangle] pub extern "C" fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed, - pseudo_tag: *mut nsIAtom, + pseudo_type: CSSPseudoElementType, snapshots: *const ServoElementSnapshotTable, raw_data: RawServoStyleSetBorrowed) -> ServoComputedValuesStrong @@ -1992,12 +1990,9 @@ pub extern "C" fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed, let element = GeckoElement(element); let doc_data = PerDocumentStyleData::from_ffi(raw_data); let finish = |styles: &ElementStyles| -> Arc { - let maybe_pseudo = if !pseudo_tag.is_null() { - get_pseudo_style(&guard, element, pseudo_tag, styles, doc_data) - } else { - None - }; - maybe_pseudo.unwrap_or_else(|| styles.primary.values().clone()) + PseudoElement::from_pseudo_type(pseudo_type).and_then(|ref pseudo| { + get_pseudo_style(&guard, element, pseudo, styles, doc_data) + }).unwrap_or_else(|| styles.primary.values().clone()) }; // In the common case we already have the style. Check that before setting diff --git a/tests/unit/stylo/sanity_checks.rs b/tests/unit/stylo/sanity_checks.rs index ce0576fe6cf..c7558d3055c 100644 --- a/tests/unit/stylo/sanity_checks.rs +++ b/tests/unit/stylo/sanity_checks.rs @@ -26,28 +26,3 @@ macro_rules! check_enum_value_non_static { assert_eq!($a.0 as usize, $b as usize); } } - -// Note that we can't call each_pseudo_element, parse_pseudo_element, or -// similar, because we'd need the foreign atom symbols to link. -#[test] -fn assert_basic_pseudo_elements() { - let saw_before; - let saw_after; - - macro_rules! pseudo_element { - (":before", $atom:expr, false) => { - saw_before = true; - }; - (":after", $atom:expr, false) => { - saw_after = true; - }; - ($pseudo_str_with_colon:expr, $atom:expr, $is_anon_box:expr) => { - // Do nothing - }; - } - - include!("../../../components/style/gecko/generated/pseudo_element_helper.rs"); - - assert!(saw_before); - assert!(saw_after); -} From 1e0edf49090dce7ccdd5c79a0cef566f44ea431b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 15 May 2017 16:19:24 +0200 Subject: [PATCH 8/9] Bug 1364412: Expose pseudo-element flags, and properly reject pseudos in non-UA sheets. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: KYC1ywfI7Lg Signed-off-by: Emilio Cobos Álvarez --- components/style/build_gecko.rs | 2 + components/style/gecko/generated/bindings.rs | 2 +- .../generated/pseudo_element_definition.rs | 424 ++++++++++++++---- .../style/gecko/generated/structs_debug.rs | 302 ++++++++----- .../style/gecko/generated/structs_release.rs | 302 ++++++++----- components/style/gecko/pseudo_element.rs | 22 +- .../gecko/pseudo_element_definition.mako.rs | 20 +- 7 files changed, 742 insertions(+), 332 deletions(-) diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 462c1545739..b4c26cb4f6d 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -348,6 +348,8 @@ mod bindings { "BORDER_COLOR_.*", "BORDER_STYLE_.*", "mozilla::SERVO_PREF_.*", + "CSS_PSEUDO_ELEMENT_.*", + "SERVO_CSS_PSEUDO_ELEMENT_FLAGS_.*", "kNameSpaceID_.*", "kGenericFont_.*", "kPresContext_.*", diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index ed00d8cd94f..79987dba6f9 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -1642,7 +1642,7 @@ extern "C" { *mut ServoStyleSheet, data: *const nsACString, extra_data: - *mut RawGeckoURLExtraData, + *mut RawGeckoURLExtraData, line_number_offset: u32); } extern "C" { diff --git a/components/style/gecko/generated/pseudo_element_definition.rs b/components/style/gecko/generated/pseudo_element_definition.rs index c733aa08f8b..4f627fe9459 100644 --- a/components/style/gecko/generated/pseudo_element_definition.rs +++ b/components/style/gecko/generated/pseudo_element_definition.rs @@ -461,10 +461,260 @@ impl PseudoElement { PseudoElement::Before | PseudoElement::After) } - /// Whether this pseudo-element is precomputed. - #[inline] - pub fn is_precomputed(&self) -> bool { - self.is_anon_box() + /// Gets the flags associated to this pseudo-element, or 0 if it's an + /// anonymous box. + pub fn flags(&self) -> u32 { + match *self { + PseudoElement::After => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_after + } + PseudoElement::Before => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_before + } + PseudoElement::Backdrop => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_backdrop + } + PseudoElement::Cue => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_cue + } + PseudoElement::FirstLetter => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_firstLetter + } + PseudoElement::FirstLine => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_firstLine + } + PseudoElement::MozSelection => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozSelection + } + PseudoElement::MozFocusInner => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozFocusInner + } + PseudoElement::MozFocusOuter => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozFocusOuter + } + PseudoElement::MozListBullet => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozListBullet + } + PseudoElement::MozListNumber => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozListNumber + } + PseudoElement::MozMathAnonymous => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozMathAnonymous + } + PseudoElement::MozNumberWrapper => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberWrapper + } + PseudoElement::MozNumberText => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberText + } + PseudoElement::MozNumberSpinBox => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinBox + } + PseudoElement::MozNumberSpinUp => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinUp + } + PseudoElement::MozNumberSpinDown => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinDown + } + PseudoElement::MozProgressBar => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozProgressBar + } + PseudoElement::MozRangeTrack => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeTrack + } + PseudoElement::MozRangeProgress => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeProgress + } + PseudoElement::MozRangeThumb => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeThumb + } + PseudoElement::MozMeterBar => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozMeterBar + } + PseudoElement::MozPlaceholder => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozPlaceholder + } + PseudoElement::Placeholder => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder + } + PseudoElement::MozColorSwatch => { + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch + } + PseudoElement::MozText => { + 0 + } + PseudoElement::OofPlaceholder => { + 0 + } + PseudoElement::FirstLetterContinuation => { + 0 + } + PseudoElement::MozBlockInsideInlineWrapper => { + 0 + } + PseudoElement::MozMathMLAnonymousBlock => { + 0 + } + PseudoElement::MozXULAnonymousBlock => { + 0 + } + PseudoElement::HorizontalFramesetBorder => { + 0 + } + PseudoElement::VerticalFramesetBorder => { + 0 + } + PseudoElement::MozLineFrame => { + 0 + } + PseudoElement::ButtonContent => { + 0 + } + PseudoElement::CellContent => { + 0 + } + PseudoElement::DropDownList => { + 0 + } + PseudoElement::FieldsetContent => { + 0 + } + PseudoElement::FramesetBlank => { + 0 + } + PseudoElement::MozDisplayComboboxControlFrame => { + 0 + } + PseudoElement::HtmlCanvasContent => { + 0 + } + PseudoElement::InlineTable => { + 0 + } + PseudoElement::Table => { + 0 + } + PseudoElement::TableCell => { + 0 + } + PseudoElement::TableColGroup => { + 0 + } + PseudoElement::TableCol => { + 0 + } + PseudoElement::TableWrapper => { + 0 + } + PseudoElement::TableRowGroup => { + 0 + } + PseudoElement::TableRow => { + 0 + } + PseudoElement::Canvas => { + 0 + } + PseudoElement::PageBreak => { + 0 + } + PseudoElement::Page => { + 0 + } + PseudoElement::PageContent => { + 0 + } + PseudoElement::PageSequence => { + 0 + } + PseudoElement::ScrolledContent => { + 0 + } + PseudoElement::ScrolledCanvas => { + 0 + } + PseudoElement::ScrolledPageSequence => { + 0 + } + PseudoElement::ColumnContent => { + 0 + } + PseudoElement::Viewport => { + 0 + } + PseudoElement::ViewportScroll => { + 0 + } + PseudoElement::AnonymousFlexItem => { + 0 + } + PseudoElement::AnonymousGridItem => { + 0 + } + PseudoElement::Ruby => { + 0 + } + PseudoElement::RubyBase => { + 0 + } + PseudoElement::RubyBaseContainer => { + 0 + } + PseudoElement::RubyText => { + 0 + } + PseudoElement::RubyTextContainer => { + 0 + } + PseudoElement::Moztreecolumn => { + 0 + } + PseudoElement::Moztreerow => { + 0 + } + PseudoElement::Moztreeseparator => { + 0 + } + PseudoElement::Moztreecell => { + 0 + } + PseudoElement::Moztreeindentation => { + 0 + } + PseudoElement::Moztreeline => { + 0 + } + PseudoElement::Moztreetwisty => { + 0 + } + PseudoElement::Moztreeimage => { + 0 + } + PseudoElement::Moztreecelltext => { + 0 + } + PseudoElement::Moztreecheckbox => { + 0 + } + PseudoElement::Moztreeprogressmeter => { + 0 + } + PseudoElement::Moztreedropfeedback => { + 0 + } + PseudoElement::MozSVGMarkerAnonChild => { + 0 + } + PseudoElement::MozSVGOuterSVGAnonChild => { + 0 + } + PseudoElement::MozSVGForeignContent => { + 0 + } + PseudoElement::MozSVGText => { + 0 + } + } } /// Construct a pseudo-element from a `CSSPseudoElementType`. @@ -741,417 +991,417 @@ impl PseudoElement { pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option { use std::ascii::AsciiExt; - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::After.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("after") { return Some(PseudoElement::After) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Before.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("before") { return Some(PseudoElement::Before) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Backdrop.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("backdrop") { return Some(PseudoElement::Backdrop) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Cue.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("cue") { return Some(PseudoElement::Cue) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::FirstLetter.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("first-letter") { return Some(PseudoElement::FirstLetter) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::FirstLine.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("first-line") { return Some(PseudoElement::FirstLine) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozSelection.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-selection") { return Some(PseudoElement::MozSelection) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozFocusInner.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-focus-inner") { return Some(PseudoElement::MozFocusInner) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozFocusOuter.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-focus-outer") { return Some(PseudoElement::MozFocusOuter) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozListBullet.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-list-bullet") { return Some(PseudoElement::MozListBullet) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozListNumber.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-list-number") { return Some(PseudoElement::MozListNumber) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozMathAnonymous.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-math-anonymous") { return Some(PseudoElement::MozMathAnonymous) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozNumberWrapper.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-number-wrapper") { return Some(PseudoElement::MozNumberWrapper) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozNumberText.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-number-text") { return Some(PseudoElement::MozNumberText) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozNumberSpinBox.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-number-spin-box") { return Some(PseudoElement::MozNumberSpinBox) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozNumberSpinUp.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-number-spin-up") { return Some(PseudoElement::MozNumberSpinUp) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozNumberSpinDown.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-number-spin-down") { return Some(PseudoElement::MozNumberSpinDown) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozProgressBar.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-progress-bar") { return Some(PseudoElement::MozProgressBar) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozRangeTrack.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-range-track") { return Some(PseudoElement::MozRangeTrack) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozRangeProgress.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-range-progress") { return Some(PseudoElement::MozRangeProgress) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozRangeThumb.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-range-thumb") { return Some(PseudoElement::MozRangeThumb) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozMeterBar.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-meter-bar") { return Some(PseudoElement::MozMeterBar) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozPlaceholder.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-placeholder") { return Some(PseudoElement::MozPlaceholder) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Placeholder.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("placeholder") { return Some(PseudoElement::Placeholder) } } - if !false || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozColorSwatch.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-color-swatch") { return Some(PseudoElement::MozColorSwatch) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozText.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-text") { return Some(PseudoElement::MozText) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::OofPlaceholder.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-oof-placeholder") { return Some(PseudoElement::OofPlaceholder) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::FirstLetterContinuation.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-first-letter-continuation") { return Some(PseudoElement::FirstLetterContinuation) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozBlockInsideInlineWrapper.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-block-inside-inline-wrapper") { return Some(PseudoElement::MozBlockInsideInlineWrapper) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozMathMLAnonymousBlock.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-mathml-anonymous-block") { return Some(PseudoElement::MozMathMLAnonymousBlock) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozXULAnonymousBlock.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-xul-anonymous-block") { return Some(PseudoElement::MozXULAnonymousBlock) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::HorizontalFramesetBorder.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-hframeset-border") { return Some(PseudoElement::HorizontalFramesetBorder) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::VerticalFramesetBorder.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-vframeset-border") { return Some(PseudoElement::VerticalFramesetBorder) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozLineFrame.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-line-frame") { return Some(PseudoElement::MozLineFrame) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::ButtonContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-button-content") { return Some(PseudoElement::ButtonContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::CellContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-cell-content") { return Some(PseudoElement::CellContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::DropDownList.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-dropdown-list") { return Some(PseudoElement::DropDownList) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::FieldsetContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-fieldset-content") { return Some(PseudoElement::FieldsetContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::FramesetBlank.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-frameset-blank") { return Some(PseudoElement::FramesetBlank) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozDisplayComboboxControlFrame.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-display-comboboxcontrol-frame") { return Some(PseudoElement::MozDisplayComboboxControlFrame) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::HtmlCanvasContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-html-canvas-content") { return Some(PseudoElement::HtmlCanvasContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::InlineTable.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-inline-table") { return Some(PseudoElement::InlineTable) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Table.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-table") { return Some(PseudoElement::Table) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::TableCell.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-table-cell") { return Some(PseudoElement::TableCell) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::TableColGroup.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-table-column-group") { return Some(PseudoElement::TableColGroup) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::TableCol.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-table-column") { return Some(PseudoElement::TableCol) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::TableWrapper.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-table-wrapper") { return Some(PseudoElement::TableWrapper) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::TableRowGroup.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-table-row-group") { return Some(PseudoElement::TableRowGroup) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::TableRow.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-table-row") { return Some(PseudoElement::TableRow) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Canvas.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-canvas") { return Some(PseudoElement::Canvas) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::PageBreak.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-pagebreak") { return Some(PseudoElement::PageBreak) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Page.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-page") { return Some(PseudoElement::Page) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::PageContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-pagecontent") { return Some(PseudoElement::PageContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::PageSequence.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-page-sequence") { return Some(PseudoElement::PageSequence) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::ScrolledContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-scrolled-content") { return Some(PseudoElement::ScrolledContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::ScrolledCanvas.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-scrolled-canvas") { return Some(PseudoElement::ScrolledCanvas) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::ScrolledPageSequence.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-scrolled-page-sequence") { return Some(PseudoElement::ScrolledPageSequence) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::ColumnContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-column-content") { return Some(PseudoElement::ColumnContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Viewport.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-viewport") { return Some(PseudoElement::Viewport) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::ViewportScroll.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-viewport-scroll") { return Some(PseudoElement::ViewportScroll) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::AnonymousFlexItem.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-anonymous-flex-item") { return Some(PseudoElement::AnonymousFlexItem) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::AnonymousGridItem.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-anonymous-grid-item") { return Some(PseudoElement::AnonymousGridItem) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Ruby.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-ruby") { return Some(PseudoElement::Ruby) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::RubyBase.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-ruby-base") { return Some(PseudoElement::RubyBase) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::RubyBaseContainer.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-ruby-base-container") { return Some(PseudoElement::RubyBaseContainer) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::RubyText.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-ruby-text") { return Some(PseudoElement::RubyText) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::RubyTextContainer.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-ruby-text-container") { return Some(PseudoElement::RubyTextContainer) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreecolumn.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-column") { return Some(PseudoElement::Moztreecolumn) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreerow.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-row") { return Some(PseudoElement::Moztreerow) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreeseparator.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-separator") { return Some(PseudoElement::Moztreeseparator) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreecell.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-cell") { return Some(PseudoElement::Moztreecell) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreeindentation.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-indentation") { return Some(PseudoElement::Moztreeindentation) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreeline.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-line") { return Some(PseudoElement::Moztreeline) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreetwisty.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-twisty") { return Some(PseudoElement::Moztreetwisty) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreeimage.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-image") { return Some(PseudoElement::Moztreeimage) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreecelltext.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-cell-text") { return Some(PseudoElement::Moztreecelltext) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreecheckbox.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-checkbox") { return Some(PseudoElement::Moztreecheckbox) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreeprogressmeter.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-progressmeter") { return Some(PseudoElement::Moztreeprogressmeter) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::Moztreedropfeedback.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-tree-drop-feedback") { return Some(PseudoElement::Moztreedropfeedback) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozSVGMarkerAnonChild.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-svg-marker-anon-child") { return Some(PseudoElement::MozSVGMarkerAnonChild) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozSVGOuterSVGAnonChild.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-svg-outer-svg-anon-child") { return Some(PseudoElement::MozSVGOuterSVGAnonChild) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozSVGForeignContent.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-svg-foreign-content") { return Some(PseudoElement::MozSVGForeignContent) } } - if !true || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::MozSVGText.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("-moz-svg-text") { return Some(PseudoElement::MozSVGText) } diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index 3141fa27c16..851f05c1172 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -1111,6 +1111,18 @@ pub mod root { pub const NS_THEME_MAC_ACTIVE_SOURCE_LIST_SELECTION: ::std::os::raw::c_uint = 250; + pub const CSS_PSEUDO_ELEMENT_IS_CSS2: ::std::os::raw::c_uint = 1; + pub const CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS: ::std::os::raw::c_uint = + 2; + pub const CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE: + ::std::os::raw::c_uint = + 4; + pub const CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE: + ::std::os::raw::c_uint = + 8; + pub const CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY: ::std::os::raw::c_uint = 16; + pub const CSS_PSEUDO_ELEMENT_IS_JS_CREATED_NAC: ::std::os::raw::c_uint = + 32; pub const kNameSpaceID_Unknown: ::std::os::raw::c_int = -1; pub const kNameSpaceID_XMLNS: ::std::os::raw::c_uint = 1; pub const kNameSpaceID_XML: ::std::os::raw::c_uint = 2; @@ -1228,7 +1240,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_61468() { + fn __bindgen_test_layout_atomic_instantiation_61524() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1237,7 +1249,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_61476() { + fn __bindgen_test_layout_atomic_instantiation_61532() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -6889,7 +6901,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_118151() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_118207() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -7812,13 +7824,14 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mPresContext: *mut root::nsPresContext, - pub mCacheTable: [u64; 6usize], + pub mStyles: [u64; 6usize], + pub mRetiredStyles: root::nsTArray<*mut root::mozilla::CounterStyle>, } pub type CounterStyleManager_HasThreadSafeRefCnt = root::mozilla::FalseType; #[test] fn bindgen_test_layout_CounterStyleManager() { - assert_eq!(::std::mem::size_of::() , 72usize + assert_eq!(::std::mem::size_of::() , 80usize , concat ! ( "Size of: " , stringify ! ( CounterStyleManager ) )); assert_eq! (::std::mem::align_of::() , 8usize @@ -7845,13 +7858,19 @@ pub mod root { "Alignment of field: " , stringify ! ( CounterStyleManager ) , "::" , stringify ! ( mPresContext ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const CounterStyleManager ) ) . mStyles + as * const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( + CounterStyleManager ) , "::" , stringify ! ( mStyles ) + )); assert_eq! (unsafe { & ( * ( 0 as * const CounterStyleManager ) ) . - mCacheTable as * const _ as usize } , 24usize , concat - ! ( + mRetiredStyles as * const _ as usize } , 72usize , + concat ! ( "Alignment of field: " , stringify ! ( CounterStyleManager ) , "::" , stringify ! ( - mCacheTable ) )); + mRetiredStyles ) )); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8160,6 +8179,26 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] + #[derive(Debug)] + pub struct CounterStylePtr { + pub mRaw: usize, + } + pub const CounterStylePtr_kAnonymousFlag: usize = 1; + #[test] + fn bindgen_test_layout_CounterStylePtr() { + assert_eq!(::std::mem::size_of::() , 8usize , + concat ! ( + "Size of: " , stringify ! ( CounterStylePtr ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( CounterStylePtr ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const CounterStylePtr ) ) . mRaw as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( CounterStylePtr + ) , "::" , stringify ! ( mRaw ) )); + } + #[repr(C)] #[derive(Debug, Copy)] pub struct Position { pub mXPosition: root::mozilla::Position_Coord, @@ -9105,7 +9144,7 @@ pub mod root { pub type ComputedKeyframeValues = root::nsTArray; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_155856() { + fn __bindgen_test_layout_DefaultDelete_instantiation_155943() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11544,7 +11583,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_51312() { + fn __bindgen_test_layout_nsCharTraits_instantiation_51368() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11555,7 +11594,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_51316() { + fn __bindgen_test_layout_nsCharTraits_instantiation_51372() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -13103,7 +13142,7 @@ pub mod root { } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_64757() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_64813() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28679,7 +28718,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_151848() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_151935() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28694,7 +28733,7 @@ pub mod root { pub struct nsStyleList { pub mListStylePosition: u8, pub mListStyleImage: root::RefPtr, - pub mCounterStyle: root::RefPtr, + pub mCounterStyle: root::mozilla::CounterStylePtr, pub mQuotes: root::RefPtr, pub mImageRegion: root::nsRect, } @@ -31568,6 +31607,31 @@ pub mod root { impl Clone for GeckoFontMetrics { fn clone(&self) -> Self { *self } } + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_after: u32 = 1; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_before: u32 = 1; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_backdrop: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_cue: u32 = 36; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_firstLetter: u32 = 3; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_firstLine: u32 = 3; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozSelection: u32 = 2; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozFocusInner: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozFocusOuter: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozListBullet: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozListNumber: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozMathAnonymous: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberWrapper: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberText: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinBox: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinUp: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinDown: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozProgressBar: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeTrack: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeProgress: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeThumb: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozMeterBar: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozPlaceholder: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch: u32 = 12; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsROCSSPrimitiveValue { @@ -31903,7 +31967,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_179636() { + fn __bindgen_test_layout_IntegralConstant_instantiation_179789() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31912,7 +31976,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_179640() { + fn __bindgen_test_layout_IntegralConstant_instantiation_179793() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31921,7 +31985,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_180472() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_180625() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31934,7 +31998,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_180475() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_180628() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31947,7 +32011,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_180547() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_180700() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31960,7 +32024,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_180550() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_180703() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31973,7 +32037,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_184957() { + fn __bindgen_test_layout_nsTArray_instantiation_185110() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31984,7 +32048,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_185808() { + fn __bindgen_test_layout_Handle_instantiation_185961() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31995,7 +32059,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_185824() { + fn __bindgen_test_layout_Handle_instantiation_185977() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32006,7 +32070,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_185834() { + fn __bindgen_test_layout_MutableHandle_instantiation_185987() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32017,7 +32081,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_185850() { + fn __bindgen_test_layout_MutableHandle_instantiation_186003() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32028,7 +32092,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_185853() { + fn __bindgen_test_layout_Rooted_instantiation_186006() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32039,7 +32103,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_188400() { + fn __bindgen_test_layout_nsTArray_instantiation_188553() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32050,7 +32114,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_188404() { + fn __bindgen_test_layout_nsTArray_instantiation_188557() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32061,7 +32125,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_188417() { + fn __bindgen_test_layout_nsTArray_instantiation_188570() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32072,7 +32136,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_189579() { + fn __bindgen_test_layout_TenuredHeap_instantiation_189732() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32083,7 +32147,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_189669() { + fn __bindgen_test_layout_Heap_instantiation_189822() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32094,7 +32158,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_189784() { + fn __bindgen_test_layout_Heap_instantiation_189937() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32105,7 +32169,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_189791() { + fn __bindgen_test_layout_TErrorResult_instantiation_189944() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32116,7 +32180,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_189807() { + fn __bindgen_test_layout_TErrorResult_instantiation_189960() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32127,7 +32191,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_189812() { + fn __bindgen_test_layout_already_AddRefed_instantiation_189965() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32138,7 +32202,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_189864() { + fn __bindgen_test_layout_already_AddRefed_instantiation_190017() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32149,7 +32213,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_190347() { + fn __bindgen_test_layout_RefPtr_instantiation_190500() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32160,7 +32224,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_190693() { + fn __bindgen_test_layout_already_AddRefed_instantiation_190846() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32171,7 +32235,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_190938() { + fn __bindgen_test_layout_already_AddRefed_instantiation_191091() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32182,7 +32246,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_191085() { + fn __bindgen_test_layout_already_AddRefed_instantiation_191238() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32193,7 +32257,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_195189() { + fn __bindgen_test_layout_UniquePtr_instantiation_195342() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32204,7 +32268,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_195221() { + fn __bindgen_test_layout_iterator_instantiation_195374() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32215,7 +32279,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_195790() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_195943() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32226,7 +32290,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197378() { + fn __bindgen_test_layout_nsTArray_instantiation_197531() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32239,7 +32303,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_197651() { + fn __bindgen_test_layout_LinkedList_instantiation_197804() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32250,7 +32314,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_197667() { + fn __bindgen_test_layout_RefPtr_instantiation_197820() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32261,7 +32325,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197666() { + fn __bindgen_test_layout_nsTArray_instantiation_197819() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32274,7 +32338,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_197696() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_197849() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32285,7 +32349,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197695() { + fn __bindgen_test_layout_nsTArray_instantiation_197848() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32296,7 +32360,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_197741() { + fn __bindgen_test_layout_already_AddRefed_instantiation_197894() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32307,7 +32371,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_197906() { + fn __bindgen_test_layout_already_AddRefed_instantiation_198059() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32318,7 +32382,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_198233() { + fn __bindgen_test_layout_already_AddRefed_instantiation_198386() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32329,7 +32393,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_198326() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_198479() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32340,7 +32404,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_198617() { + fn __bindgen_test_layout_UniquePtr_instantiation_198770() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32351,7 +32415,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_199164() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_199317() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32364,7 +32428,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_199163() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_199316() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32375,7 +32439,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199279() { + fn __bindgen_test_layout_nsTArray_instantiation_199432() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32386,7 +32450,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_199330() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_199483() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32395,7 +32459,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199510() { + fn __bindgen_test_layout_nsTArray_instantiation_199663() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32406,7 +32470,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199788() { + fn __bindgen_test_layout_nsTArray_instantiation_199941() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32417,7 +32481,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_200575() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_200728() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32428,7 +32492,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_200667() { + fn __bindgen_test_layout_already_AddRefed_instantiation_200820() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32439,7 +32503,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_200848() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_201001() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32450,7 +32514,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_201371() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_201524() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32461,7 +32525,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_201379() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_201532() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32472,7 +32536,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_201494() { + fn __bindgen_test_layout_OwningNonNull_instantiation_201647() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32483,7 +32547,7 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_201621() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_201774() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32494,7 +32558,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_202573() { + fn __bindgen_test_layout_PointTyped_instantiation_202726() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32505,7 +32569,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_202576() { + fn __bindgen_test_layout_IntPointTyped_instantiation_202729() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32516,7 +32580,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_202579() { + fn __bindgen_test_layout_SizeTyped_instantiation_202732() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32527,7 +32591,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_202585() { + fn __bindgen_test_layout_RectTyped_instantiation_202738() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32538,7 +32602,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_202609() { + fn __bindgen_test_layout_IntPointTyped_instantiation_202762() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32549,7 +32613,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_202615() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_202768() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32560,7 +32624,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_202621() { + fn __bindgen_test_layout_IntRectTyped_instantiation_202774() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32571,7 +32635,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_202750() { + fn __bindgen_test_layout_MarginTyped_instantiation_202903() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32582,7 +32646,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_202777() { + fn __bindgen_test_layout_RectTyped_instantiation_202930() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32593,7 +32657,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_202780() { + fn __bindgen_test_layout_IntRectTyped_instantiation_202933() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32604,7 +32668,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_202816() { + fn __bindgen_test_layout_ScaleFactor_instantiation_202969() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32613,7 +32677,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_202916() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_203069() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32624,7 +32688,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_202924() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_203077() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32635,7 +32699,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_202968() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_203121() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32646,7 +32710,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_203598() { + fn __bindgen_test_layout_nsTArray_instantiation_203751() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32659,7 +32723,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_203614() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_203767() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32670,7 +32734,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_206877() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_207030() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32681,7 +32745,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207510() { + fn __bindgen_test_layout_already_AddRefed_instantiation_207663() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32692,7 +32756,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_207602() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_207755() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32703,7 +32767,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_208791() { + fn __bindgen_test_layout_already_AddRefed_instantiation_208944() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32714,7 +32778,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_209137() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_209290() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32725,7 +32789,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_210717() { + fn __bindgen_test_layout_nsTArray_instantiation_210870() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32736,7 +32800,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_210729() { + fn __bindgen_test_layout_RefPtr_instantiation_210882() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32749,7 +32813,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_210728() { + fn __bindgen_test_layout_nsTArray_instantiation_210881() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32762,7 +32826,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_210762() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_210915() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32773,7 +32837,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_210859() { + fn __bindgen_test_layout_UniquePtr_instantiation_211012() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32784,7 +32848,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_212630() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_212783() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32795,7 +32859,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_212669() { + fn __bindgen_test_layout_OwningNonNull_instantiation_212822() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32808,7 +32872,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212690() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212845() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32819,7 +32883,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212721() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212881() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32830,7 +32894,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_213277() { + fn __bindgen_test_layout_already_AddRefed_instantiation_213437() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32841,7 +32905,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_213281() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_213441() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32852,7 +32916,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_213355() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_213515() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32863,7 +32927,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_213640() { + fn __bindgen_test_layout_UniquePtr_instantiation_213800() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32874,7 +32938,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_213643() { + fn __bindgen_test_layout_UniquePtr_instantiation_213803() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32885,7 +32949,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_213985() { + fn __bindgen_test_layout_Maybe_instantiation_214145() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32896,7 +32960,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_214151() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_214311() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32905,7 +32969,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_214304() { + fn __bindgen_test_layout_Maybe_instantiation_214472() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32916,7 +32980,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214319() { + fn __bindgen_test_layout_already_AddRefed_instantiation_214487() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32927,7 +32991,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_214325() { + fn __bindgen_test_layout_UniquePtr_instantiation_214493() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32938,7 +33002,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_214511() { + fn __bindgen_test_layout_pair_instantiation_214679() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32949,7 +33013,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_214510() { + fn __bindgen_test_layout_nsTArray_instantiation_214678() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -32964,7 +33028,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_215512() { + fn __bindgen_test_layout_RefPtr_instantiation_215667() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32975,7 +33039,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_219500() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_219655() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32986,7 +33050,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_220092() { + fn __bindgen_test_layout_nsTArray_instantiation_220247() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32999,7 +33063,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_220272() { + fn __bindgen_test_layout_Maybe_instantiation_220427() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33010,7 +33074,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_220447() { + fn __bindgen_test_layout_RefPtr_instantiation_220602() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33021,7 +33085,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_220691() { + fn __bindgen_test_layout_Sequence_instantiation_220846() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -33030,7 +33094,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_220990() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_221145() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33041,7 +33105,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_220989() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_221144() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33052,7 +33116,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_222132() { + fn __bindgen_test_layout_nsTArray_instantiation_222311() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33063,7 +33127,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_222170() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_222349() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko/generated/structs_release.rs b/components/style/gecko/generated/structs_release.rs index b1aa9e383de..0f4e5e0b764 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -1111,6 +1111,18 @@ pub mod root { pub const NS_THEME_MAC_ACTIVE_SOURCE_LIST_SELECTION: ::std::os::raw::c_uint = 250; + pub const CSS_PSEUDO_ELEMENT_IS_CSS2: ::std::os::raw::c_uint = 1; + pub const CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS: ::std::os::raw::c_uint = + 2; + pub const CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE: + ::std::os::raw::c_uint = + 4; + pub const CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE: + ::std::os::raw::c_uint = + 8; + pub const CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY: ::std::os::raw::c_uint = 16; + pub const CSS_PSEUDO_ELEMENT_IS_JS_CREATED_NAC: ::std::os::raw::c_uint = + 32; pub const kNameSpaceID_Unknown: ::std::os::raw::c_int = -1; pub const kNameSpaceID_XMLNS: ::std::os::raw::c_uint = 1; pub const kNameSpaceID_XML: ::std::os::raw::c_uint = 2; @@ -1228,7 +1240,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_60317() { + fn __bindgen_test_layout_atomic_instantiation_60373() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1237,7 +1249,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_60325() { + fn __bindgen_test_layout_atomic_instantiation_60381() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -6747,7 +6759,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_114814() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_114870() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -7649,13 +7661,14 @@ pub mod root { pub struct CounterStyleManager { pub mRefCnt: root::nsAutoRefCnt, pub mPresContext: *mut root::nsPresContext, - pub mCacheTable: [u64; 5usize], + pub mStyles: [u64; 5usize], + pub mRetiredStyles: root::nsTArray<*mut root::mozilla::CounterStyle>, } pub type CounterStyleManager_HasThreadSafeRefCnt = root::mozilla::FalseType; #[test] fn bindgen_test_layout_CounterStyleManager() { - assert_eq!(::std::mem::size_of::() , 56usize + assert_eq!(::std::mem::size_of::() , 64usize , concat ! ( "Size of: " , stringify ! ( CounterStyleManager ) )); assert_eq! (::std::mem::align_of::() , 8usize @@ -7675,13 +7688,19 @@ pub mod root { "Alignment of field: " , stringify ! ( CounterStyleManager ) , "::" , stringify ! ( mPresContext ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const CounterStyleManager ) ) . mStyles + as * const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( + CounterStyleManager ) , "::" , stringify ! ( mStyles ) + )); assert_eq! (unsafe { & ( * ( 0 as * const CounterStyleManager ) ) . - mCacheTable as * const _ as usize } , 16usize , concat - ! ( + mRetiredStyles as * const _ as usize } , 56usize , + concat ! ( "Alignment of field: " , stringify ! ( CounterStyleManager ) , "::" , stringify ! ( - mCacheTable ) )); + mRetiredStyles ) )); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7908,6 +7927,26 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] + #[derive(Debug)] + pub struct CounterStylePtr { + pub mRaw: usize, + } + pub const CounterStylePtr_kAnonymousFlag: usize = 1; + #[test] + fn bindgen_test_layout_CounterStylePtr() { + assert_eq!(::std::mem::size_of::() , 8usize , + concat ! ( + "Size of: " , stringify ! ( CounterStylePtr ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( CounterStylePtr ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const CounterStylePtr ) ) . mRaw as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( CounterStylePtr + ) , "::" , stringify ! ( mRaw ) )); + } + #[repr(C)] #[derive(Debug, Copy)] pub struct Position { pub mXPosition: root::mozilla::Position_Coord, @@ -8853,7 +8892,7 @@ pub mod root { pub type ComputedKeyframeValues = root::nsTArray; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_152177() { + fn __bindgen_test_layout_DefaultDelete_instantiation_152265() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11070,7 +11109,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_50051() { + fn __bindgen_test_layout_nsCharTraits_instantiation_50107() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11081,7 +11120,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_50055() { + fn __bindgen_test_layout_nsCharTraits_instantiation_50111() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12793,7 +12832,7 @@ pub mod root { } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_63481() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_63537() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28156,7 +28195,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_148169() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_148257() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28171,7 +28210,7 @@ pub mod root { pub struct nsStyleList { pub mListStylePosition: u8, pub mListStyleImage: root::RefPtr, - pub mCounterStyle: root::RefPtr, + pub mCounterStyle: root::mozilla::CounterStylePtr, pub mQuotes: root::RefPtr, pub mImageRegion: root::nsRect, } @@ -31045,6 +31084,31 @@ pub mod root { impl Clone for GeckoFontMetrics { fn clone(&self) -> Self { *self } } + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_after: u32 = 1; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_before: u32 = 1; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_backdrop: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_cue: u32 = 36; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_firstLetter: u32 = 3; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_firstLine: u32 = 3; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozSelection: u32 = 2; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozFocusInner: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozFocusOuter: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozListBullet: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozListNumber: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozMathAnonymous: u32 = 0; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberWrapper: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberText: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinBox: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinUp: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozNumberSpinDown: u32 = 24; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozProgressBar: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeTrack: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeProgress: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozRangeThumb: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozMeterBar: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozPlaceholder: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder: u32 = 8; + pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch: u32 = 12; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsROCSSPrimitiveValue { @@ -31380,7 +31444,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_175838() { + fn __bindgen_test_layout_IntegralConstant_instantiation_175992() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31389,7 +31453,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_175842() { + fn __bindgen_test_layout_IntegralConstant_instantiation_175996() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31398,7 +31462,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_176671() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_176825() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31411,7 +31475,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_176674() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_176828() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31424,7 +31488,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_176746() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_176900() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31437,7 +31501,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_176749() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_176903() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31450,7 +31514,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_181103() { + fn __bindgen_test_layout_nsTArray_instantiation_181257() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31461,7 +31525,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_181947() { + fn __bindgen_test_layout_Handle_instantiation_182101() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31472,7 +31536,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_181963() { + fn __bindgen_test_layout_Handle_instantiation_182117() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31483,7 +31547,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_181973() { + fn __bindgen_test_layout_MutableHandle_instantiation_182127() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31494,7 +31558,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_181989() { + fn __bindgen_test_layout_MutableHandle_instantiation_182143() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31505,7 +31569,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_181992() { + fn __bindgen_test_layout_Rooted_instantiation_182146() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31516,7 +31580,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_184495() { + fn __bindgen_test_layout_nsTArray_instantiation_184649() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31527,7 +31591,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_184499() { + fn __bindgen_test_layout_nsTArray_instantiation_184653() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31538,7 +31602,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_184512() { + fn __bindgen_test_layout_nsTArray_instantiation_184666() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31549,7 +31613,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_185365() { + fn __bindgen_test_layout_TenuredHeap_instantiation_185519() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31560,7 +31624,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_185455() { + fn __bindgen_test_layout_Heap_instantiation_185609() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31571,7 +31635,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_185565() { + fn __bindgen_test_layout_TErrorResult_instantiation_185719() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31582,7 +31646,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_185581() { + fn __bindgen_test_layout_TErrorResult_instantiation_185735() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31593,7 +31657,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_185586() { + fn __bindgen_test_layout_already_AddRefed_instantiation_185740() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31604,7 +31668,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_185638() { + fn __bindgen_test_layout_already_AddRefed_instantiation_185792() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31615,7 +31679,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_186112() { + fn __bindgen_test_layout_RefPtr_instantiation_186266() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31626,7 +31690,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_186458() { + fn __bindgen_test_layout_already_AddRefed_instantiation_186612() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31637,7 +31701,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_186701() { + fn __bindgen_test_layout_already_AddRefed_instantiation_186855() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31648,7 +31712,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_186848() { + fn __bindgen_test_layout_already_AddRefed_instantiation_187002() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31659,7 +31723,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_190928() { + fn __bindgen_test_layout_UniquePtr_instantiation_191082() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31670,7 +31734,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_190960() { + fn __bindgen_test_layout_iterator_instantiation_191114() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31681,7 +31745,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_191527() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_191681() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31692,7 +31756,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_192775() { + fn __bindgen_test_layout_Heap_instantiation_192929() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31703,7 +31767,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_193117() { + fn __bindgen_test_layout_nsTArray_instantiation_193271() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31716,7 +31780,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_193390() { + fn __bindgen_test_layout_LinkedList_instantiation_193544() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31727,7 +31791,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_193406() { + fn __bindgen_test_layout_RefPtr_instantiation_193560() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31738,7 +31802,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_193405() { + fn __bindgen_test_layout_nsTArray_instantiation_193559() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31751,7 +31815,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_193435() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_193589() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31762,7 +31826,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_193434() { + fn __bindgen_test_layout_nsTArray_instantiation_193588() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31773,7 +31837,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_193480() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193634() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31784,7 +31848,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_193645() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193799() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31795,7 +31859,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_193972() { + fn __bindgen_test_layout_already_AddRefed_instantiation_194126() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31806,7 +31870,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_194065() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_194219() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31817,7 +31881,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_194354() { + fn __bindgen_test_layout_UniquePtr_instantiation_194508() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31828,7 +31892,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_194891() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_195045() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31841,7 +31905,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_194890() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_195044() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31852,7 +31916,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_195006() { + fn __bindgen_test_layout_nsTArray_instantiation_195160() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31863,7 +31927,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_195053() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_195207() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -31872,7 +31936,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_195230() { + fn __bindgen_test_layout_nsTArray_instantiation_195384() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31883,7 +31947,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_195505() { + fn __bindgen_test_layout_nsTArray_instantiation_195659() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31894,7 +31958,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_196292() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_196446() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31905,7 +31969,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_196384() { + fn __bindgen_test_layout_already_AddRefed_instantiation_196538() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31916,7 +31980,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_196565() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_196719() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31927,7 +31991,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_197082() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_197236() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31938,7 +32002,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_197197() { + fn __bindgen_test_layout_OwningNonNull_instantiation_197351() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31949,7 +32013,7 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_197324() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_197478() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31960,7 +32024,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_197484() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_197638() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31971,7 +32035,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_198273() { + fn __bindgen_test_layout_PointTyped_instantiation_198427() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31982,7 +32046,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_198276() { + fn __bindgen_test_layout_IntPointTyped_instantiation_198430() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31993,7 +32057,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_198279() { + fn __bindgen_test_layout_SizeTyped_instantiation_198433() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32004,7 +32068,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_198285() { + fn __bindgen_test_layout_RectTyped_instantiation_198439() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32015,7 +32079,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_198309() { + fn __bindgen_test_layout_IntPointTyped_instantiation_198463() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32026,7 +32090,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_198315() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_198469() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32037,7 +32101,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_198321() { + fn __bindgen_test_layout_IntRectTyped_instantiation_198475() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32048,7 +32112,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_198450() { + fn __bindgen_test_layout_MarginTyped_instantiation_198604() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32059,7 +32123,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_198477() { + fn __bindgen_test_layout_RectTyped_instantiation_198631() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32070,7 +32134,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_198480() { + fn __bindgen_test_layout_IntRectTyped_instantiation_198634() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32081,7 +32145,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_198516() { + fn __bindgen_test_layout_ScaleFactor_instantiation_198670() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32090,7 +32154,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_198616() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198770() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32101,7 +32165,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_198624() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198778() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32112,7 +32176,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_198668() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198822() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32123,7 +32187,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199298() { + fn __bindgen_test_layout_nsTArray_instantiation_199452() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32136,7 +32200,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_199314() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_199468() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32147,7 +32211,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_202572() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_202726() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32158,7 +32222,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_203199() { + fn __bindgen_test_layout_already_AddRefed_instantiation_203353() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32169,7 +32233,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_203291() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_203445() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32180,7 +32244,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_204480() { + fn __bindgen_test_layout_already_AddRefed_instantiation_204634() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32191,7 +32255,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_204826() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_204980() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32202,7 +32266,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_206406() { + fn __bindgen_test_layout_nsTArray_instantiation_206560() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32213,7 +32277,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_206418() { + fn __bindgen_test_layout_RefPtr_instantiation_206572() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32226,7 +32290,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_206417() { + fn __bindgen_test_layout_nsTArray_instantiation_206571() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32239,7 +32303,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_206451() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_206605() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32250,7 +32314,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_206548() { + fn __bindgen_test_layout_UniquePtr_instantiation_206702() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32261,7 +32325,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_208299() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_208453() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32272,7 +32336,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_208338() { + fn __bindgen_test_layout_OwningNonNull_instantiation_208492() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32285,7 +32349,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208359() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208515() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32296,7 +32360,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208390() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208551() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32307,7 +32371,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_208946() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209107() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32318,7 +32382,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_208950() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_209111() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32329,7 +32393,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_209024() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_209185() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32340,7 +32404,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_209309() { + fn __bindgen_test_layout_UniquePtr_instantiation_209470() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32351,7 +32415,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_209312() { + fn __bindgen_test_layout_UniquePtr_instantiation_209473() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32362,7 +32426,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_209581() { + fn __bindgen_test_layout_Maybe_instantiation_209742() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32373,7 +32437,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_209747() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_209908() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32382,7 +32446,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_209897() { + fn __bindgen_test_layout_Maybe_instantiation_210066() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32393,7 +32457,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_209912() { + fn __bindgen_test_layout_already_AddRefed_instantiation_210081() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32404,7 +32468,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_209918() { + fn __bindgen_test_layout_UniquePtr_instantiation_210087() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32415,7 +32479,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_210104() { + fn __bindgen_test_layout_pair_instantiation_210273() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32426,7 +32490,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_210103() { + fn __bindgen_test_layout_nsTArray_instantiation_210272() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -32441,7 +32505,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_211105() { + fn __bindgen_test_layout_RefPtr_instantiation_211261() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32452,7 +32516,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_215093() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_215249() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32463,7 +32527,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215685() { + fn __bindgen_test_layout_nsTArray_instantiation_215841() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32476,7 +32540,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_215859() { + fn __bindgen_test_layout_Maybe_instantiation_216015() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32487,7 +32551,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_216034() { + fn __bindgen_test_layout_RefPtr_instantiation_216190() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32498,7 +32562,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_216278() { + fn __bindgen_test_layout_Sequence_instantiation_216434() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32507,7 +32571,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_216577() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_216733() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32518,7 +32582,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_216576() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_216732() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32529,7 +32593,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_217717() { + fn __bindgen_test_layout_nsTArray_instantiation_217897() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32540,7 +32604,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_217753() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_217933() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs index f5793499108..f01c182802e 100644 --- a/components/style/gecko/pseudo_element.rs +++ b/components/style/gecko/pseudo_element.rs @@ -9,7 +9,7 @@ //! need to update the checked-in files for Servo. use cssparser::ToCss; -use gecko_bindings::structs::CSSPseudoElementType; +use gecko_bindings::structs::{self, CSSPseudoElementType}; use selector_parser::PseudoElementCascadeType; use std::fmt; use string_cache::Atom; @@ -61,6 +61,26 @@ impl PseudoElement { pub fn is_lazy(&self) -> bool { !self.is_eager() && !self.is_precomputed() } + + /// Whether this pseudo-element is web-exposed. + pub fn exposed_in_non_ua_sheets(&self) -> bool { + if self.is_anon_box() { + return false; + } + + (self.flags() & structs::CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY) == 0 + } + + /// Whether this pseudo-element supports user action selectors. + pub fn supports_user_action_state(&self) -> bool { + (self.flags() & structs::CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE) != 0 + } + + /// Whether this pseudo-element is precomputed. + #[inline] + pub fn is_precomputed(&self) -> bool { + self.is_anon_box() + } } impl ToCss for PseudoElement { diff --git a/components/style/gecko/pseudo_element_definition.mako.rs b/components/style/gecko/pseudo_element_definition.mako.rs index 0872ed9a9a2..81bf539f2e1 100644 --- a/components/style/gecko/pseudo_element_definition.mako.rs +++ b/components/style/gecko/pseudo_element_definition.mako.rs @@ -60,10 +60,20 @@ impl PseudoElement { ${" | ".join(map(lambda name: "PseudoElement::{}".format(name), EAGER_PSEUDOS))}) } - /// Whether this pseudo-element is precomputed. - #[inline] - pub fn is_precomputed(&self) -> bool { - self.is_anon_box() + /// Gets the flags associated to this pseudo-element, or 0 if it's an + /// anonymous box. + pub fn flags(&self) -> u32 { + match *self { + % for pseudo in PSEUDOS: + PseudoElement::${pseudo.capitalized()} => { + % if pseudo.is_anon_box(): + 0 + % else: + structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_${pseudo.original_ident} + % endif + } + % endfor + } } /// Construct a pseudo-element from a `CSSPseudoElementType`. @@ -106,7 +116,7 @@ impl PseudoElement { use std::ascii::AsciiExt; % for pseudo in PSEUDOS: - if !${str(pseudo.is_anon_box()).lower()} || in_ua_stylesheet { + if in_ua_stylesheet || PseudoElement::${pseudo.capitalized()}.exposed_in_non_ua_sheets() { if s.eq_ignore_ascii_case("${pseudo.value[1:]}") { return Some(PseudoElement::${pseudo.capitalized()}) } From fe8da51feeb11102c25700da839eabbcf33bf22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 15 May 2017 16:38:35 +0200 Subject: [PATCH 9/9] Bug 1364412: Properly reject to parse pseudo-element states that don't support state. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: KQCFPtOTGQI Signed-off-by: Emilio Cobos Álvarez --- components/style/gecko/selector_parser.rs | 28 +++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index 9c67c06d60a..64f135c73ae 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -319,22 +319,26 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> { None => return Err(()), }; - let state = input.try(|input| { - let mut state = ElementState::empty(); + let state = if pseudo.supports_user_action_state() { + input.try(|input| { + let mut state = ElementState::empty(); - while !input.is_exhausted() { - input.expect_colon()?; - let ident = input.expect_ident()?; - let pseudo_class = self.parse_non_ts_pseudo_class(ident)?; + while !input.is_exhausted() { + input.expect_colon()?; + let ident = input.expect_ident()?; + let pseudo_class = self.parse_non_ts_pseudo_class(ident)?; - if !pseudo_class.is_safe_user_action_state() { - return Err(()) + if !pseudo_class.is_safe_user_action_state() { + return Err(()) + } + state.insert(pseudo_class.state_flag()); } - state.insert(pseudo_class.state_flag()); - } - Ok(state) - }); + Ok(state) + }).ok() + } else { + None + }; Ok(PseudoElementSelector { pseudo: pseudo,