From fcc50ea421f54893d41481e9d95cb4e3b29831ee Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sat, 13 May 2017 18:33:14 +0900 Subject: [PATCH 1/4] Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to PasingMode::AllowUnitlessLength. We need another flag that represents allow-negative-number for SMIL, so this enum will also comprise the another parsing mode that allows negative number. --- components/script/dom/css.rs | 6 +-- components/script/dom/cssmediarule.rs | 4 +- components/script/dom/cssstyledeclaration.rs | 4 +- components/script/dom/csssupportsrule.rs | 4 +- components/script/dom/htmllinkelement.rs | 4 +- components/script/dom/htmlstyleelement.rs | 4 +- components/script/dom/medialist.rs | 8 ++-- components/script/dom/window.rs | 4 +- components/style/build_gecko.rs | 4 +- components/style/gecko/generated/bindings.rs | 10 ++--- .../style/gecko/generated/structs_debug.rs | 2 +- .../style/gecko/generated/structs_release.rs | 2 +- components/style/keyframes.rs | 4 +- components/style/parser.rs | 26 ++++++------ .../style/properties/declaration_block.rs | 8 ++-- .../style/properties/properties.mako.rs | 4 +- components/style/stylesheets.rs | 6 +-- components/style/values/specified/length.rs | 6 +-- ports/geckolib/glue.rs | 42 +++++++++---------- tests/unit/style/parsing/length.rs | 6 +-- tests/unit/style/parsing/mod.rs | 4 +- tests/unit/style/properties/mod.rs | 4 +- tests/unit/style/viewport.rs | 4 +- 23 files changed, 85 insertions(+), 85 deletions(-) diff --git a/components/script/dom/css.rs b/components/script/dom/css.rs index 72cdbfa5be6..ce71c49e5ef 100644 --- a/components/script/dom/css.rs +++ b/components/script/dom/css.rs @@ -10,7 +10,7 @@ use dom::bindings::str::DOMString; use dom::window::Window; use dom_struct::dom_struct; use style::context::QuirksMode; -use style::parser::{LengthParsingMode, ParserContext}; +use style::parser::{ParsingMode, ParserContext}; use style::stylesheets::CssRuleType; use style::supports::{Declaration, parse_condition_or_declaration}; @@ -32,7 +32,7 @@ impl CSS { let decl = Declaration { prop: property.into(), val: value.into() }; let url = win.Document().url(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); decl.eval(&context) } @@ -44,7 +44,7 @@ impl CSS { if let Ok(cond) = cond { let url = win.Document().url(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); cond.eval(&context) } else { diff --git a/components/script/dom/cssmediarule.rs b/components/script/dom/cssmediarule.rs index afc41d31be0..ef560ce0be1 100644 --- a/components/script/dom/cssmediarule.rs +++ b/components/script/dom/cssmediarule.rs @@ -16,7 +16,7 @@ use dom::medialist::MediaList; use dom::window::Window; use dom_struct::dom_struct; use style::media_queries::parse_media_query_list; -use style::parser::{LengthParsingMode, ParserContext}; +use style::parser::{ParsingMode, ParserContext}; use style::shared_lock::{Locked, ToCssWithGuard}; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, MediaRule}; @@ -75,7 +75,7 @@ impl CSSMediaRule { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); let new_medialist = parse_media_query_list(&context, &mut input); let mut guard = self.cssconditionrule.shared_lock().write(); diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index 8b81201de77..797a9e16722 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -17,7 +17,7 @@ use dom_struct::dom_struct; use servo_url::ServoUrl; use std::ascii::AsciiExt; use style::attr::AttrValue; -use style::parser::LengthParsingMode; +use style::parser::ParsingMode; use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId}; use style::properties::{parse_one_declaration, parse_style_attribute}; use style::selector_parser::PseudoElement; @@ -260,7 +260,7 @@ impl CSSStyleDeclaration { let result = parse_one_declaration(id, &value, &self.owner.base_url(), window.css_error_reporter(), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); // Step 7 diff --git a/components/script/dom/csssupportsrule.rs b/components/script/dom/csssupportsrule.rs index 9a0743856d6..23502a3b8c8 100644 --- a/components/script/dom/csssupportsrule.rs +++ b/components/script/dom/csssupportsrule.rs @@ -13,7 +13,7 @@ use dom::cssrule::SpecificCSSRule; use dom::cssstylesheet::CSSStyleSheet; use dom::window::Window; use dom_struct::dom_struct; -use style::parser::{LengthParsingMode, ParserContext}; +use style::parser::{ParsingMode, ParserContext}; use style::shared_lock::{Locked, ToCssWithGuard}; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, SupportsRule}; @@ -63,7 +63,7 @@ impl CSSSupportsRule { let url = win.Document().url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); let enabled = cond.eval(&context); let mut guard = self.cssconditionrule.shared_lock().write(); diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index 09f24ace0d7..92dd0b9ed4a 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -32,7 +32,7 @@ use std::cell::Cell; use std::default::Default; use style::attr::AttrValue; use style::media_queries::parse_media_query_list; -use style::parser::{LengthParsingMode, ParserContext as CssParserContext}; +use style::parser::{ParsingMode, ParserContext as CssParserContext}; use style::str::HTML_SPACE_CHARACTERS; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, Stylesheet}; @@ -282,7 +282,7 @@ impl HTMLLinkElement { let win = document.window(); let doc_url = document.url(); let context = CssParserContext::new_for_cssom(&doc_url, win.css_error_reporter(), Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, document.quirks_mode()); let media = parse_media_query_list(&context, &mut css_parser); diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs index e96954efe26..cf4011cf811 100644 --- a/components/script/dom/htmlstyleelement.rs +++ b/components/script/dom/htmlstyleelement.rs @@ -23,7 +23,7 @@ use net_traits::ReferrerPolicy; use script_layout_interface::message::Msg; use std::cell::Cell; use style::media_queries::parse_media_query_list; -use style::parser::{LengthParsingMode, ParserContext as CssParserContext}; +use style::parser::{ParsingMode, ParserContext as CssParserContext}; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, Stylesheet, Origin}; use stylesheet_loader::{StylesheetLoader, StylesheetOwner}; @@ -88,7 +88,7 @@ impl HTMLStyleElement { let context = CssParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, doc.quirks_mode()); let shared_lock = node.owner_doc().style_shared_lock().clone(); let mq = Arc::new(shared_lock.wrap( diff --git a/components/script/dom/medialist.rs b/components/script/dom/medialist.rs index 514bccecc4a..0f3432eefec 100644 --- a/components/script/dom/medialist.rs +++ b/components/script/dom/medialist.rs @@ -14,7 +14,7 @@ use dom::window::Window; use dom_struct::dom_struct; use style::media_queries::{MediaQuery, parse_media_query_list}; use style::media_queries::MediaList as StyleMediaList; -use style::parser::{LengthParsingMode, ParserContext}; +use style::parser::{ParsingMode, ParserContext}; use style::shared_lock::{SharedRwLock, Locked}; use style::stylearc::Arc; use style::stylesheets::CssRuleType; @@ -77,7 +77,7 @@ impl MediaListMethods for MediaList { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); *media_queries = parse_media_query_list(&context, &mut parser); } @@ -113,7 +113,7 @@ impl MediaListMethods for MediaList { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); let m = MediaQuery::parse(&context, &mut parser); // Step 2 @@ -141,7 +141,7 @@ impl MediaListMethods for MediaList { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); let m = MediaQuery::parse(&context, &mut parser); // Step 2 diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index dbcbd054743..3078658bbdb 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -104,7 +104,7 @@ use std::sync::mpsc::TryRecvError::{Disconnected, Empty}; use style::context::ReflowGoal; use style::error_reporting::ParseErrorReporter; use style::media_queries; -use style::parser::{LengthParsingMode, ParserContext as CssParserContext}; +use style::parser::{ParsingMode, ParserContext as CssParserContext}; use style::properties::PropertyId; use style::properties::longhands::overflow_x; use style::selector_parser::PseudoElement; @@ -978,7 +978,7 @@ impl WindowMethods for Window { let url = self.get_url(); let quirks_mode = self.Document().quirks_mode(); let context = CssParserContext::new_for_cssom(&url, self.css_error_reporter(), Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); let media_query_list = media_queries::parse_media_query_list(&context, &mut parser); let document = self.Document(); diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index ad964b4b21d..6a727012be1 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -488,7 +488,7 @@ mod bindings { "mozilla::DefaultDelete", "mozilla::Side", "mozilla::binding_danger::AssertAndSuppressCleanupPolicy", - "mozilla::LengthParsingMode", + "mozilla::ParsingMode", "mozilla::InheritTarget", ]; let opaque_types = [ @@ -751,7 +751,7 @@ mod bindings { "ServoStyleSheet", "EffectCompositor_CascadeLevel", "UpdateAnimationsTasks", - "LengthParsingMode", + "ParsingMode", "InheritTarget", "URLMatchingFunction", ]; diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 422b2ddfbed..c1e4b70ab1d 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -192,7 +192,7 @@ use gecko_bindings::structs::Loader; use gecko_bindings::structs::ServoStyleSheet; use gecko_bindings::structs::EffectCompositor_CascadeLevel; use gecko_bindings::structs::UpdateAnimationsTasks; -use gecko_bindings::structs::LengthParsingMode; +use gecko_bindings::structs::ParsingMode; use gecko_bindings::structs::InheritTarget; use gecko_bindings::structs::URLMatchingFunction; pub type nsTArrayBorrowed_uintptr_t<'a> = &'a mut ::gecko_bindings::structs::nsTArray; @@ -2034,8 +2034,8 @@ extern "C" { value: *const nsACString, is_important: bool, data: *mut RawGeckoURLExtraData, - length_parsing_mode: - LengthParsingMode) -> bool; + parsing_mode: + ParsingMode) -> bool; } extern "C" { pub fn Servo_DeclarationBlock_SetPropertyById(declarations: @@ -2045,8 +2045,8 @@ extern "C" { is_important: bool, data: *mut RawGeckoURLExtraData, - length_parsing_mode: - LengthParsingMode) + parsing_mode: + ParsingMode) -> bool; } extern "C" { diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index 92e53edd8e3..96d6b9bba48 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -6355,7 +6355,7 @@ pub mod root { pub type UpdateAnimationsTasks = u8; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum LengthParsingMode { Default = 0, SVG = 1, } + pub enum ParsingMode { Default = 0, SVG = 1, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum InheritTarget { diff --git a/components/style/gecko/generated/structs_release.rs b/components/style/gecko/generated/structs_release.rs index 4dc9383423f..5275212d5bb 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -6218,7 +6218,7 @@ pub mod root { pub type UpdateAnimationsTasks = u8; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum LengthParsingMode { Default = 0, SVG = 1, } + pub enum ParsingMode { Default = 0, SVG = 1, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum InheritTarget { diff --git a/components/style/keyframes.rs b/components/style/keyframes.rs index 3a80320bb52..c8bf83c3411 100644 --- a/components/style/keyframes.rs +++ b/components/style/keyframes.rs @@ -9,7 +9,7 @@ use cssparser::{AtRuleParser, Parser, QualifiedRuleParser, RuleListParser}; use cssparser::{DeclarationListParser, DeclarationParser, parse_one_rule}; use error_reporting::NullReporter; -use parser::{LengthParsingMode, ParserContext, log_css_error}; +use parser::{ParsingMode, ParserContext, log_css_error}; use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, PropertyId}; use properties::{PropertyDeclarationId, LonghandId, ParsedDeclaration}; use properties::LonghandIdSet; @@ -131,7 +131,7 @@ impl Keyframe { &parent_stylesheet.url_data, &error_reporter, Some(CssRuleType::Keyframe), - LengthParsingMode::Default, + ParsingMode::Default, parent_stylesheet.quirks_mode); let mut input = Parser::new(css); diff --git a/components/style/parser.rs b/components/style/parser.rs index f437d8ba22c..05ee642f083 100644 --- a/components/style/parser.rs +++ b/components/style/parser.rs @@ -12,19 +12,19 @@ use stylesheets::{CssRuleType, Origin, UrlExtraData}; /// The mode to use when parsing lengths. #[derive(PartialEq, Eq, Copy, Clone)] -pub enum LengthParsingMode { +pub enum ParsingMode { /// In CSS, lengths must have units, except for zero values, where the unit can be omitted. /// https://www.w3.org/TR/css3-values/#lengths Default, /// In SVG, a coordinate or length value without a unit identifier (e.g., "25") is assumed to be in user units (px). /// https://www.w3.org/TR/SVG/coords.html#Units - SVG, + AllowUnitlessLength, } -impl LengthParsingMode { +impl ParsingMode { /// Whether the parsing mode allows unitless lengths for non-zero values to be intpreted as px. pub fn allows_unitless_lengths(&self) -> bool { - *self == LengthParsingMode::SVG + *self == ParsingMode::AllowUnitlessLength } } @@ -41,8 +41,8 @@ pub struct ParserContext<'a> { pub rule_type: Option, /// Line number offsets for inline stylesheets pub line_number_offset: u64, - /// The mode to use when parsing lengths. - pub length_parsing_mode: LengthParsingMode, + /// The mode to use when parsing. + pub parsing_mode: ParsingMode, /// The quirks mode of this stylesheet. pub quirks_mode: QuirksMode, } @@ -53,7 +53,7 @@ impl<'a> ParserContext<'a> { url_data: &'a UrlExtraData, error_reporter: &'a ParseErrorReporter, rule_type: Option, - length_parsing_mode: LengthParsingMode, + parsing_mode: ParsingMode, quirks_mode: QuirksMode) -> ParserContext<'a> { ParserContext { @@ -62,7 +62,7 @@ impl<'a> ParserContext<'a> { error_reporter: error_reporter, rule_type: rule_type, line_number_offset: 0u64, - length_parsing_mode: length_parsing_mode, + parsing_mode: parsing_mode, quirks_mode: quirks_mode, } } @@ -71,10 +71,10 @@ impl<'a> ParserContext<'a> { pub fn new_for_cssom(url_data: &'a UrlExtraData, error_reporter: &'a ParseErrorReporter, rule_type: Option, - length_parsing_mode: LengthParsingMode, + parsing_mode: ParsingMode, quirks_mode: QuirksMode) -> ParserContext<'a> { - Self::new(Origin::Author, url_data, error_reporter, rule_type, length_parsing_mode, quirks_mode) + Self::new(Origin::Author, url_data, error_reporter, rule_type, parsing_mode, quirks_mode) } /// Create a parser context based on a previous context, but with a modified rule type. @@ -87,7 +87,7 @@ impl<'a> ParserContext<'a> { error_reporter: context.error_reporter, rule_type: rule_type, line_number_offset: context.line_number_offset, - length_parsing_mode: context.length_parsing_mode, + parsing_mode: context.parsing_mode, quirks_mode: context.quirks_mode, } } @@ -97,7 +97,7 @@ impl<'a> ParserContext<'a> { url_data: &'a UrlExtraData, error_reporter: &'a ParseErrorReporter, line_number_offset: u64, - length_parsing_mode: LengthParsingMode, + parsing_mode: ParsingMode, quirks_mode: QuirksMode) -> ParserContext<'a> { ParserContext { @@ -106,7 +106,7 @@ impl<'a> ParserContext<'a> { error_reporter: error_reporter, rule_type: None, line_number_offset: line_number_offset, - length_parsing_mode: length_parsing_mode, + parsing_mode: parsing_mode, quirks_mode: quirks_mode, } } diff --git a/components/style/properties/declaration_block.rs b/components/style/properties/declaration_block.rs index 613b6327924..423ed54034c 100644 --- a/components/style/properties/declaration_block.rs +++ b/components/style/properties/declaration_block.rs @@ -10,7 +10,7 @@ use context::QuirksMode; use cssparser::{DeclarationListParser, parse_important}; use cssparser::{Parser, AtRuleParser, DeclarationParser, Delimiter}; use error_reporting::ParseErrorReporter; -use parser::{LengthParsingMode, ParserContext, log_css_error}; +use parser::{ParsingMode, ParserContext, log_css_error}; use std::fmt; use style_traits::ToCss; use stylesheets::{CssRuleType, Origin, UrlExtraData}; @@ -649,7 +649,7 @@ pub fn parse_style_attribute(input: &str, url_data, error_reporter, Some(CssRuleType::Style), - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); parse_property_declaration_list(&context, &mut Parser::new(input)) } @@ -663,14 +663,14 @@ pub fn parse_one_declaration(id: PropertyId, input: &str, url_data: &UrlExtraData, error_reporter: &ParseErrorReporter, - length_parsing_mode: LengthParsingMode, + parsing_mode: ParsingMode, quirks_mode: QuirksMode) -> Result { let context = ParserContext::new(Origin::Author, url_data, error_reporter, Some(CssRuleType::Style), - length_parsing_mode, + parsing_mode, quirks_mode); Parser::new(input).parse_entirely(|parser| { ParsedDeclaration::parse(id, &context, parser) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 6818eb4ec4e..186ca94269d 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -29,7 +29,7 @@ use font_metrics::FontMetricsProvider; #[cfg(feature = "servo")] use logical_geometry::{LogicalMargin, PhysicalSide}; use logical_geometry::WritingMode; use media_queries::Device; -use parser::{LengthParsingMode, Parse, ParserContext}; +use parser::{ParsingMode, Parse, ParserContext}; use properties::animated_properties::TransitionProperty; #[cfg(feature = "servo")] use servo_config::prefs::PREFS; use shared_lock::StylesheetGuards; @@ -387,7 +387,7 @@ impl PropertyDeclarationIdSet { url_data, error_reporter, None, - LengthParsingMode::Default, + ParsingMode::Default, quirks_mode); Parser::new(&css).parse_entirely(|input| { match from_shorthand { diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 5b19e9a14d3..026d896cc5b 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -26,7 +26,7 @@ use gecko_bindings::sugar::refptr::RefPtr; use keyframes::{Keyframe, parse_keyframe_list}; use media_queries::{Device, MediaList, parse_media_query_list}; use parking_lot::RwLock; -use parser::{LengthParsingMode, Parse, ParserContext, log_css_error}; +use parser::{ParsingMode, Parse, ParserContext, log_css_error}; use properties::{PropertyDeclarationBlock, parse_property_declaration_list}; use selector_parser::{SelectorImpl, SelectorParser}; use selectors::parser::SelectorList; @@ -442,7 +442,7 @@ impl CssRule { &parent_stylesheet.url_data, &error_reporter, None, - LengthParsingMode::Default, + ParsingMode::Default, parent_stylesheet.quirks_mode); let mut input = Parser::new(css); @@ -744,7 +744,7 @@ impl Stylesheet { shared_lock: shared_lock, loader: stylesheet_loader, context: ParserContext::new_with_line_number_offset(origin, url_data, error_reporter, - line_number_offset, LengthParsingMode::Default, + line_number_offset, ParsingMode::Default, quirks_mode), state: Cell::new(State::Start), }; diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs index 2062786adf8..1918c12ac0e 100644 --- a/components/style/values/specified/length.rs +++ b/components/style/values/specified/length.rs @@ -630,7 +630,7 @@ impl Length { Token::Dimension(ref value, ref unit) if num_context.is_ok(value.value) => Length::parse_dimension(context, value.value, unit), Token::Number(ref value) if num_context.is_ok(value.value) => { - if value.value != 0. && !context.length_parsing_mode.allows_unitless_lengths() && + if value.value != 0. && !context.parsing_mode.allows_unitless_lengths() && !allow_quirks.allowed(context.quirks_mode) { return Err(()) } @@ -972,7 +972,7 @@ impl LengthOrPercentageOrAuto { Token::Percentage(ref value) if num_context.is_ok(value.unit_value) => Ok(LengthOrPercentageOrAuto::Percentage(Percentage(value.unit_value))), Token::Number(ref value) if num_context.is_ok(value.value) => { - if value.value != 0. && !context.length_parsing_mode.allows_unitless_lengths() && + if value.value != 0. && !context.parsing_mode.allows_unitless_lengths() && !allow_quirks.allowed(context.quirks_mode) { return Err(()) } @@ -1080,7 +1080,7 @@ impl LengthOrPercentageOrNone { Token::Percentage(ref value) if num_context.is_ok(value.unit_value) => Ok(LengthOrPercentageOrNone::Percentage(Percentage(value.unit_value))), Token::Number(value) if num_context.is_ok(value.value) => { - if value.value != 0. && !context.length_parsing_mode.allows_unitless_lengths() && + if value.value != 0. && !context.parsing_mode.allows_unitless_lengths() && !allow_quirks.allowed(context.quirks_mode) { return Err(()) } diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index acf5edd0800..d3bbc83450e 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -75,7 +75,7 @@ use style::gecko_properties::{self, style_structs}; use style::keyframes::KeyframesStepValue; use style::media_queries::{MediaList, parse_media_query_list}; use style::parallel; -use style::parser::{LengthParsingMode, ParserContext}; +use style::parser::{ParsingMode, ParserContext}; use style::properties::{CascadeFlags, ComputedValues, Importance, ParsedDeclaration, StyleBuilder}; use style::properties::{LonghandIdSet, PropertyDeclarationBlock, PropertyId}; use style::properties::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP; @@ -1133,30 +1133,30 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) { fn parse_property(property_id: PropertyId, value: *const nsACString, data: *mut URLExtraData, - length_parsing_mode: structs::LengthParsingMode) -> Result { + parsing_mode: structs::ParsingMode) -> Result { let value = unsafe { value.as_ref().unwrap().as_str_unchecked() }; let url_data = unsafe { RefPtr::from_ptr_ref(&data) }; - let length_parsing_mode = match length_parsing_mode { - structs::LengthParsingMode::Default => LengthParsingMode::Default, - structs::LengthParsingMode::SVG => LengthParsingMode::SVG, + let parsing_mode = match parsing_mode { + structs::ParsingMode::Default => ParsingMode::Default, + structs::ParsingMode::AllowUnitlessLength => ParsingMode::AllowUnitlessLength, }; parse_one_declaration(property_id, value, url_data, &RustLogReporter, - length_parsing_mode, + parsing_mode, QuirksMode::NoQuirks) } #[no_mangle] pub extern "C" fn Servo_ParseProperty(property: nsCSSPropertyID, value: *const nsACString, data: *mut URLExtraData, - length_parsing_mode: structs::LengthParsingMode) + parsing_mode: structs::ParsingMode) -> RawServoDeclarationBlockStrong { let id = get_property_id_from_nscsspropertyid!(property, RawServoDeclarationBlockStrong::null()); - match parse_property(id, value, data, length_parsing_mode) { + match parse_property(id, value, data, parsing_mode) { Ok(parsed) => { let global_style_data = &*GLOBAL_STYLE_DATA; let mut block = PropertyDeclarationBlock::new(); @@ -1180,7 +1180,7 @@ pub extern "C" fn Servo_ParseEasing(easing: *const nsAString, url_data, &reporter, Some(CssRuleType::Style), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); let easing = unsafe { (*easing).to_string() }; match transition_timing_function::single_value::parse(&context, &mut Parser::new(&easing)) { @@ -1314,8 +1314,8 @@ pub extern "C" fn Servo_DeclarationBlock_GetPropertyIsImportant(declarations: Ra fn set_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId, value: *const nsACString, is_important: bool, data: *mut URLExtraData, - length_parsing_mode: structs::LengthParsingMode) -> bool { - match parse_property(property_id, value, data, length_parsing_mode) { + parsing_mode: structs::ParsingMode) -> bool { + match parse_property(property_id, value, data, parsing_mode) { Ok(parsed) => { let importance = if is_important { Importance::Important } else { Importance::Normal }; write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| { @@ -1330,18 +1330,18 @@ fn set_property(declarations: RawServoDeclarationBlockBorrowed, property_id: Pro pub extern "C" fn Servo_DeclarationBlock_SetProperty(declarations: RawServoDeclarationBlockBorrowed, property: *const nsACString, value: *const nsACString, is_important: bool, data: *mut URLExtraData, - length_parsing_mode: structs::LengthParsingMode) -> bool { + parsing_mode: structs::ParsingMode) -> bool { set_property(declarations, get_property_id_from_property!(property, false), - value, is_important, data, length_parsing_mode) + value, is_important, data, parsing_mode) } #[no_mangle] pub extern "C" fn Servo_DeclarationBlock_SetPropertyById(declarations: RawServoDeclarationBlockBorrowed, property: nsCSSPropertyID, value: *const nsACString, is_important: bool, data: *mut URLExtraData, - length_parsing_mode: structs::LengthParsingMode) -> bool { + parsing_mode: structs::ParsingMode) -> bool { set_property(declarations, get_property_id_from_nscsspropertyid!(property, false), - value, is_important, data, length_parsing_mode) + value, is_important, data, parsing_mode) } fn remove_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId) { @@ -1410,7 +1410,7 @@ pub extern "C" fn Servo_MediaList_SetText(list: RawServoMediaListBorrowed, text: let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); write_locked_arc(list, |list: &mut MediaList| { *list = parse_media_query_list(&context, &mut parser); @@ -1442,7 +1442,7 @@ pub extern "C" fn Servo_MediaList_AppendMedium(list: RawServoMediaListBorrowed, let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); write_locked_arc(list, |list: &mut MediaList| { list.append_medium(&context, new_medium); @@ -1456,7 +1456,7 @@ pub extern "C" fn Servo_MediaList_DeleteMedium(list: RawServoMediaListBorrowed, let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Media), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); write_locked_arc(list, |list: &mut MediaList| list.delete_medium(&context, old_medium)) } @@ -1810,7 +1810,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetBackgroundImage(declarations: let string = unsafe { (*value).to_string() }; let error_reporter = RustLogReporter; let context = ParserContext::new(Origin::Author, url_data, &error_reporter, - Some(CssRuleType::Style), LengthParsingMode::Default, + Some(CssRuleType::Style), ParsingMode::Default, QuirksMode::NoQuirks); if let Ok(url) = SpecifiedUrl::parse_from_string(string.into(), &context) { let decl = PropertyDeclaration::BackgroundImage(BackgroundImage( @@ -1842,7 +1842,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetTextDecorationColorOverride(declarat pub extern "C" fn Servo_CSSSupports2(property: *const nsACString, value: *const nsACString) -> bool { let id = get_property_id_from_property!(property, false); - parse_property(id, value, unsafe { DUMMY_URL_DATA }, structs::LengthParsingMode::Default).is_ok() + parse_property(id, value, unsafe { DUMMY_URL_DATA }, structs::ParsingMode::Default).is_ok() } #[no_mangle] @@ -1854,7 +1854,7 @@ pub extern "C" fn Servo_CSSSupports(cond: *const nsACString) -> bool { let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Style), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); cond.eval(&context) } else { diff --git a/tests/unit/style/parsing/length.rs b/tests/unit/style/parsing/length.rs index 9de042f26ff..66f33964edf 100644 --- a/tests/unit/style/parsing/length.rs +++ b/tests/unit/style/parsing/length.rs @@ -6,7 +6,7 @@ use cssparser::Parser; use media_queries::CSSErrorReporterTest; use parsing::parse; use style::context::QuirksMode; -use style::parser::{LengthParsingMode, Parse, ParserContext}; +use style::parser::{ParsingMode, Parse, ParserContext}; use style::stylesheets::{CssRuleType, Origin}; use style::values::Either; use style::values::specified::{LengthOrPercentageOrNumber, Number}; @@ -35,7 +35,7 @@ fn test_length_literals() { } #[test] -fn test_length_parsing_modes() { +fn test_parsing_modes() { // In default length mode, non-zero lengths must have a unit. assert!(parse(Length::parse, "1").is_err()); @@ -43,7 +43,7 @@ fn test_length_parsing_modes() { let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, - Some(CssRuleType::Style), LengthParsingMode::SVG, + Some(CssRuleType::Style), ParsingMode::AllowUnitlessLength, QuirksMode::NoQuirks); let mut parser = Parser::new("1"); let result = Length::parse(&context, &mut parser); diff --git a/tests/unit/style/parsing/mod.rs b/tests/unit/style/parsing/mod.rs index 2ff688c3f55..f1d04e005bb 100644 --- a/tests/unit/style/parsing/mod.rs +++ b/tests/unit/style/parsing/mod.rs @@ -7,14 +7,14 @@ use cssparser::Parser; use media_queries::CSSErrorReporterTest; use style::context::QuirksMode; -use style::parser::{LengthParsingMode, ParserContext}; +use style::parser::{ParsingMode, ParserContext}; use style::stylesheets::{CssRuleType, Origin}; fn parse Result>(f: F, s: &str) -> Result { let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); let mut parser = Parser::new(s); f(&context, &mut parser) diff --git a/tests/unit/style/properties/mod.rs b/tests/unit/style/properties/mod.rs index 747b0bd6571..5bf1e0bcbe3 100644 --- a/tests/unit/style/properties/mod.rs +++ b/tests/unit/style/properties/mod.rs @@ -5,14 +5,14 @@ use cssparser::Parser; use media_queries::CSSErrorReporterTest; use style::context::QuirksMode; -use style::parser::{LengthParsingMode, ParserContext}; +use style::parser::{ParsingMode, ParserContext}; use style::stylesheets::{CssRuleType, Origin}; fn parse Result>(f: F, s: &str) -> Result { let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); let mut parser = Parser::new(s); f(&context, &mut parser) diff --git a/tests/unit/style/viewport.rs b/tests/unit/style/viewport.rs index e9c11495878..c350d323cfe 100644 --- a/tests/unit/style/viewport.rs +++ b/tests/unit/style/viewport.rs @@ -9,7 +9,7 @@ use servo_config::prefs::{PREFS, PrefValue}; use servo_url::ServoUrl; use style::context::QuirksMode; use style::media_queries::{Device, MediaList, MediaType}; -use style::parser::{LengthParsingMode, Parse, ParserContext}; +use style::parser::{ParsingMode, Parse, ParserContext}; use style::shared_lock::SharedRwLock; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, Stylesheet, Origin}; @@ -295,7 +295,7 @@ fn constrain_viewport() { let url = ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Viewport), - LengthParsingMode::Default, + ParsingMode::Default, QuirksMode::NoQuirks); macro_rules! from_css { From b6b3187efa34a13929b39a7c58d5756dc26f630f Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sat, 13 May 2017 18:33:48 +0900 Subject: [PATCH 2/4] Make ParsingMode bitflags. assert_parsing_mode_match() is mostly the same as assert_restyle_hints_match(). --- components/script/dom/css.rs | 6 +-- components/script/dom/cssmediarule.rs | 4 +- components/script/dom/cssstyledeclaration.rs | 4 +- components/script/dom/csssupportsrule.rs | 4 +- components/script/dom/htmllinkelement.rs | 4 +- components/script/dom/htmlstyleelement.rs | 4 +- components/script/dom/medialist.rs | 8 ++-- components/script/dom/window.rs | 4 +- components/style/build_gecko.rs | 1 + components/style/keyframes.rs | 4 +- components/style/parser.rs | 47 +++++++++++++++---- .../style/properties/declaration_block.rs | 4 +- .../style/properties/properties.mako.rs | 4 +- components/style/stylesheets.rs | 6 +-- ports/geckolib/glue.rs | 26 +++++----- tests/unit/style/parsing/length.rs | 4 +- tests/unit/style/parsing/mod.rs | 4 +- tests/unit/style/properties/mod.rs | 4 +- tests/unit/style/viewport.rs | 4 +- 19 files changed, 88 insertions(+), 58 deletions(-) diff --git a/components/script/dom/css.rs b/components/script/dom/css.rs index ce71c49e5ef..d56575b9d38 100644 --- a/components/script/dom/css.rs +++ b/components/script/dom/css.rs @@ -10,7 +10,7 @@ use dom::bindings::str::DOMString; use dom::window::Window; use dom_struct::dom_struct; use style::context::QuirksMode; -use style::parser::{ParsingMode, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext}; use style::stylesheets::CssRuleType; use style::supports::{Declaration, parse_condition_or_declaration}; @@ -32,7 +32,7 @@ impl CSS { let decl = Declaration { prop: property.into(), val: value.into() }; let url = win.Document().url(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); decl.eval(&context) } @@ -44,7 +44,7 @@ impl CSS { if let Ok(cond) = cond { let url = win.Document().url(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); cond.eval(&context) } else { diff --git a/components/script/dom/cssmediarule.rs b/components/script/dom/cssmediarule.rs index ef560ce0be1..6986b0fe03d 100644 --- a/components/script/dom/cssmediarule.rs +++ b/components/script/dom/cssmediarule.rs @@ -16,7 +16,7 @@ use dom::medialist::MediaList; use dom::window::Window; use dom_struct::dom_struct; use style::media_queries::parse_media_query_list; -use style::parser::{ParsingMode, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext}; use style::shared_lock::{Locked, ToCssWithGuard}; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, MediaRule}; @@ -75,7 +75,7 @@ impl CSSMediaRule { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); let new_medialist = parse_media_query_list(&context, &mut input); let mut guard = self.cssconditionrule.shared_lock().write(); diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index 797a9e16722..4d7d8feaac5 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -17,7 +17,7 @@ use dom_struct::dom_struct; use servo_url::ServoUrl; use std::ascii::AsciiExt; use style::attr::AttrValue; -use style::parser::ParsingMode; +use style::parser::PARSING_MODE_DEFAULT; use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId}; use style::properties::{parse_one_declaration, parse_style_attribute}; use style::selector_parser::PseudoElement; @@ -260,7 +260,7 @@ impl CSSStyleDeclaration { let result = parse_one_declaration(id, &value, &self.owner.base_url(), window.css_error_reporter(), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); // Step 7 diff --git a/components/script/dom/csssupportsrule.rs b/components/script/dom/csssupportsrule.rs index 23502a3b8c8..cba47f0acd7 100644 --- a/components/script/dom/csssupportsrule.rs +++ b/components/script/dom/csssupportsrule.rs @@ -13,7 +13,7 @@ use dom::cssrule::SpecificCSSRule; use dom::cssstylesheet::CSSStyleSheet; use dom::window::Window; use dom_struct::dom_struct; -use style::parser::{ParsingMode, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext}; use style::shared_lock::{Locked, ToCssWithGuard}; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, SupportsRule}; @@ -63,7 +63,7 @@ impl CSSSupportsRule { let url = win.Document().url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); let enabled = cond.eval(&context); let mut guard = self.cssconditionrule.shared_lock().write(); diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index 92dd0b9ed4a..fc1783985f8 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -32,7 +32,7 @@ use std::cell::Cell; use std::default::Default; use style::attr::AttrValue; use style::media_queries::parse_media_query_list; -use style::parser::{ParsingMode, ParserContext as CssParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext as CssParserContext}; use style::str::HTML_SPACE_CHARACTERS; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, Stylesheet}; @@ -282,7 +282,7 @@ impl HTMLLinkElement { let win = document.window(); let doc_url = document.url(); let context = CssParserContext::new_for_cssom(&doc_url, win.css_error_reporter(), Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, document.quirks_mode()); let media = parse_media_query_list(&context, &mut css_parser); diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs index cf4011cf811..9f7a36c040c 100644 --- a/components/script/dom/htmlstyleelement.rs +++ b/components/script/dom/htmlstyleelement.rs @@ -23,7 +23,7 @@ use net_traits::ReferrerPolicy; use script_layout_interface::message::Msg; use std::cell::Cell; use style::media_queries::parse_media_query_list; -use style::parser::{ParsingMode, ParserContext as CssParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext as CssParserContext}; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, Stylesheet, Origin}; use stylesheet_loader::{StylesheetLoader, StylesheetOwner}; @@ -88,7 +88,7 @@ impl HTMLStyleElement { let context = CssParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, doc.quirks_mode()); let shared_lock = node.owner_doc().style_shared_lock().clone(); let mq = Arc::new(shared_lock.wrap( diff --git a/components/script/dom/medialist.rs b/components/script/dom/medialist.rs index 0f3432eefec..8915615ca37 100644 --- a/components/script/dom/medialist.rs +++ b/components/script/dom/medialist.rs @@ -14,7 +14,7 @@ use dom::window::Window; use dom_struct::dom_struct; use style::media_queries::{MediaQuery, parse_media_query_list}; use style::media_queries::MediaList as StyleMediaList; -use style::parser::{ParsingMode, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext}; use style::shared_lock::{SharedRwLock, Locked}; use style::stylearc::Arc; use style::stylesheets::CssRuleType; @@ -77,7 +77,7 @@ impl MediaListMethods for MediaList { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); *media_queries = parse_media_query_list(&context, &mut parser); } @@ -113,7 +113,7 @@ impl MediaListMethods for MediaList { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); let m = MediaQuery::parse(&context, &mut parser); // Step 2 @@ -141,7 +141,7 @@ impl MediaListMethods for MediaList { let url = win.get_url(); let quirks_mode = win.Document().quirks_mode(); let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); let m = MediaQuery::parse(&context, &mut parser); // Step 2 diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 3078658bbdb..993749b00c2 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -104,7 +104,7 @@ use std::sync::mpsc::TryRecvError::{Disconnected, Empty}; use style::context::ReflowGoal; use style::error_reporting::ParseErrorReporter; use style::media_queries; -use style::parser::{ParsingMode, ParserContext as CssParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext as CssParserContext}; use style::properties::PropertyId; use style::properties::longhands::overflow_x; use style::selector_parser::PseudoElement; @@ -978,7 +978,7 @@ impl WindowMethods for Window { let url = self.get_url(); let quirks_mode = self.Document().quirks_mode(); let context = CssParserContext::new_for_cssom(&url, self.css_error_reporter(), Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); let media_query_list = media_queries::parse_media_query_list(&context, &mut parser); let document = self.Document(); diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 6a727012be1..4836d3f9dd8 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -334,6 +334,7 @@ mod bindings { .bitfield_enum("nsChangeHint") .bitfield_enum("nsRestyleHint") .constified_enum("UpdateAnimationsTasks") + .constified_enum("ParsingMode") .parse_callbacks(Box::new(Callbacks)); let whitelist_vars = [ "NS_AUTHOR_SPECIFIED_.*", diff --git a/components/style/keyframes.rs b/components/style/keyframes.rs index c8bf83c3411..dc4a75806a5 100644 --- a/components/style/keyframes.rs +++ b/components/style/keyframes.rs @@ -9,7 +9,7 @@ use cssparser::{AtRuleParser, Parser, QualifiedRuleParser, RuleListParser}; use cssparser::{DeclarationListParser, DeclarationParser, parse_one_rule}; use error_reporting::NullReporter; -use parser::{ParsingMode, ParserContext, log_css_error}; +use parser::{PARSING_MODE_DEFAULT, ParserContext, log_css_error}; use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, PropertyId}; use properties::{PropertyDeclarationId, LonghandId, ParsedDeclaration}; use properties::LonghandIdSet; @@ -131,7 +131,7 @@ impl Keyframe { &parent_stylesheet.url_data, &error_reporter, Some(CssRuleType::Keyframe), - ParsingMode::Default, + PARSING_MODE_DEFAULT, parent_stylesheet.quirks_mode); let mut input = Parser::new(css); diff --git a/components/style/parser.rs b/components/style/parser.rs index 05ee642f083..9874bf49f54 100644 --- a/components/style/parser.rs +++ b/components/style/parser.rs @@ -10,21 +10,48 @@ use error_reporting::ParseErrorReporter; use style_traits::OneOrMoreCommaSeparated; use stylesheets::{CssRuleType, Origin, UrlExtraData}; -/// The mode to use when parsing lengths. -#[derive(PartialEq, Eq, Copy, Clone)] -pub enum ParsingMode { - /// In CSS, lengths must have units, except for zero values, where the unit can be omitted. - /// https://www.w3.org/TR/css3-values/#lengths - Default, - /// In SVG, a coordinate or length value without a unit identifier (e.g., "25") is assumed to be in user units (px). - /// https://www.w3.org/TR/SVG/coords.html#Units - AllowUnitlessLength, +bitflags! { + /// The mode to use when parsing values. + pub flags ParsingMode: u8 { + /// In CSS, lengths must have units, except for zero values, where the unit can be omitted. + /// https://www.w3.org/TR/css3-values/#lengths + const PARSING_MODE_DEFAULT = 0x00, + /// In SVG, a coordinate or length value without a unit identifier (e.g., "25") is assumed + /// to be in user units (px). + /// https://www.w3.org/TR/SVG/coords.html#Units + const PARSING_MODE_ALLOW_UNITLESS_LENGTH = 0x01, + } } impl ParsingMode { /// Whether the parsing mode allows unitless lengths for non-zero values to be intpreted as px. pub fn allows_unitless_lengths(&self) -> bool { - *self == ParsingMode::AllowUnitlessLength + self.intersects(PARSING_MODE_ALLOW_UNITLESS_LENGTH) + } +} + +/// Asserts that all ParsingMode flags have a matching ParsingMode value in gecko. +#[cfg(feature = "gecko")] +#[inline] +pub fn assert_parsing_mode_match() { + use gecko_bindings::structs; + + macro_rules! check_parsing_modes { + ( $( $a:ident => $b:ident ),*, ) => { + if cfg!(debug_assertions) { + let mut hints = ParsingMode::all(); + $( + assert_eq!(structs::$a as usize, $b.bits() as usize, stringify!($b)); + hints.remove($b); + )* + assert_eq!(hints, ParsingMode::empty(), "all ParsingMode bits should have an assertion"); + } + } + } + + check_parsing_modes! { + ParsingMode_Default => PARSING_MODE_DEFAULT, + ParsingMode_AllowUnitlessLength => PARSING_MODE_ALLOW_UNITLESS_LENGTH, } } diff --git a/components/style/properties/declaration_block.rs b/components/style/properties/declaration_block.rs index 423ed54034c..201ad8ea33d 100644 --- a/components/style/properties/declaration_block.rs +++ b/components/style/properties/declaration_block.rs @@ -10,7 +10,7 @@ use context::QuirksMode; use cssparser::{DeclarationListParser, parse_important}; use cssparser::{Parser, AtRuleParser, DeclarationParser, Delimiter}; use error_reporting::ParseErrorReporter; -use parser::{ParsingMode, ParserContext, log_css_error}; +use parser::{PARSING_MODE_DEFAULT, ParsingMode, ParserContext, log_css_error}; use std::fmt; use style_traits::ToCss; use stylesheets::{CssRuleType, Origin, UrlExtraData}; @@ -649,7 +649,7 @@ pub fn parse_style_attribute(input: &str, url_data, error_reporter, Some(CssRuleType::Style), - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); parse_property_declaration_list(&context, &mut Parser::new(input)) } diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 186ca94269d..5772410c38d 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -29,7 +29,7 @@ use font_metrics::FontMetricsProvider; #[cfg(feature = "servo")] use logical_geometry::{LogicalMargin, PhysicalSide}; use logical_geometry::WritingMode; use media_queries::Device; -use parser::{ParsingMode, Parse, ParserContext}; +use parser::{PARSING_MODE_DEFAULT, Parse, ParserContext}; use properties::animated_properties::TransitionProperty; #[cfg(feature = "servo")] use servo_config::prefs::PREFS; use shared_lock::StylesheetGuards; @@ -387,7 +387,7 @@ impl PropertyDeclarationIdSet { url_data, error_reporter, None, - ParsingMode::Default, + PARSING_MODE_DEFAULT, quirks_mode); Parser::new(&css).parse_entirely(|input| { match from_shorthand { diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 026d896cc5b..84b5753fb9b 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -26,7 +26,7 @@ use gecko_bindings::sugar::refptr::RefPtr; use keyframes::{Keyframe, parse_keyframe_list}; use media_queries::{Device, MediaList, parse_media_query_list}; use parking_lot::RwLock; -use parser::{ParsingMode, Parse, ParserContext, log_css_error}; +use parser::{PARSING_MODE_DEFAULT, Parse, ParserContext, log_css_error}; use properties::{PropertyDeclarationBlock, parse_property_declaration_list}; use selector_parser::{SelectorImpl, SelectorParser}; use selectors::parser::SelectorList; @@ -442,7 +442,7 @@ impl CssRule { &parent_stylesheet.url_data, &error_reporter, None, - ParsingMode::Default, + PARSING_MODE_DEFAULT, parent_stylesheet.quirks_mode); let mut input = Parser::new(css); @@ -744,7 +744,7 @@ impl Stylesheet { shared_lock: shared_lock, loader: stylesheet_loader, context: ParserContext::new_with_line_number_offset(origin, url_data, error_reporter, - line_number_offset, ParsingMode::Default, + line_number_offset, PARSING_MODE_DEFAULT, quirks_mode), state: Cell::new(State::Start), }; diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index d3bbc83450e..d7ae72317d8 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -75,7 +75,7 @@ use style::gecko_properties::{self, style_structs}; use style::keyframes::KeyframesStepValue; use style::media_queries::{MediaList, parse_media_query_list}; use style::parallel; -use style::parser::{ParsingMode, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext}; use style::properties::{CascadeFlags, ComputedValues, Importance, ParsedDeclaration, StyleBuilder}; use style::properties::{LonghandIdSet, PropertyDeclarationBlock, PropertyId}; use style::properties::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP; @@ -115,6 +115,8 @@ static mut DUMMY_URL_DATA: *mut URLExtraData = 0 as *mut URLExtraData; #[no_mangle] pub extern "C" fn Servo_Initialize(dummy_url_data: *mut URLExtraData) { + use style::parser::assert_parsing_mode_match; + // Initialize logging. let mut builder = LogBuilder::new(); let default_level = if cfg!(debug_assertions) { "warn" } else { "error" }; @@ -128,6 +130,7 @@ pub extern "C" fn Servo_Initialize(dummy_url_data: *mut URLExtraData) { // Perform some debug-only runtime assertions. restyle_hints::assert_restyle_hints_match(); + assert_parsing_mode_match(); // Initialize some static data. gecko_properties::initialize(); @@ -1134,12 +1137,11 @@ fn parse_property(property_id: PropertyId, value: *const nsACString, data: *mut URLExtraData, parsing_mode: structs::ParsingMode) -> Result { + use style::parser::ParsingMode; + let value = unsafe { value.as_ref().unwrap().as_str_unchecked() }; let url_data = unsafe { RefPtr::from_ptr_ref(&data) }; - let parsing_mode = match parsing_mode { - structs::ParsingMode::Default => ParsingMode::Default, - structs::ParsingMode::AllowUnitlessLength => ParsingMode::AllowUnitlessLength, - }; + let parsing_mode = ParsingMode::from_bits_truncate(parsing_mode); parse_one_declaration(property_id, value, @@ -1180,7 +1182,7 @@ pub extern "C" fn Servo_ParseEasing(easing: *const nsAString, url_data, &reporter, Some(CssRuleType::Style), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); let easing = unsafe { (*easing).to_string() }; match transition_timing_function::single_value::parse(&context, &mut Parser::new(&easing)) { @@ -1410,7 +1412,7 @@ pub extern "C" fn Servo_MediaList_SetText(list: RawServoMediaListBorrowed, text: let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); write_locked_arc(list, |list: &mut MediaList| { *list = parse_media_query_list(&context, &mut parser); @@ -1442,7 +1444,7 @@ pub extern "C" fn Servo_MediaList_AppendMedium(list: RawServoMediaListBorrowed, let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); write_locked_arc(list, |list: &mut MediaList| { list.append_medium(&context, new_medium); @@ -1456,7 +1458,7 @@ pub extern "C" fn Servo_MediaList_DeleteMedium(list: RawServoMediaListBorrowed, let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Media), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); write_locked_arc(list, |list: &mut MediaList| list.delete_medium(&context, old_medium)) } @@ -1810,7 +1812,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetBackgroundImage(declarations: let string = unsafe { (*value).to_string() }; let error_reporter = RustLogReporter; let context = ParserContext::new(Origin::Author, url_data, &error_reporter, - Some(CssRuleType::Style), ParsingMode::Default, + Some(CssRuleType::Style), PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); if let Ok(url) = SpecifiedUrl::parse_from_string(string.into(), &context) { let decl = PropertyDeclaration::BackgroundImage(BackgroundImage( @@ -1842,7 +1844,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetTextDecorationColorOverride(declarat pub extern "C" fn Servo_CSSSupports2(property: *const nsACString, value: *const nsACString) -> bool { let id = get_property_id_from_property!(property, false); - parse_property(id, value, unsafe { DUMMY_URL_DATA }, structs::ParsingMode::Default).is_ok() + parse_property(id, value, unsafe { DUMMY_URL_DATA }, structs::ParsingMode_Default).is_ok() } #[no_mangle] @@ -1854,7 +1856,7 @@ pub extern "C" fn Servo_CSSSupports(cond: *const nsACString) -> bool { let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; let context = ParserContext::new_for_cssom(url_data, &reporter, Some(CssRuleType::Style), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); cond.eval(&context) } else { diff --git a/tests/unit/style/parsing/length.rs b/tests/unit/style/parsing/length.rs index 66f33964edf..f87124e7444 100644 --- a/tests/unit/style/parsing/length.rs +++ b/tests/unit/style/parsing/length.rs @@ -6,7 +6,7 @@ use cssparser::Parser; use media_queries::CSSErrorReporterTest; use parsing::parse; use style::context::QuirksMode; -use style::parser::{ParsingMode, Parse, ParserContext}; +use style::parser::{PARSING_MODE_ALLOW_UNITLESS_LENGTH, Parse, ParserContext}; use style::stylesheets::{CssRuleType, Origin}; use style::values::Either; use style::values::specified::{LengthOrPercentageOrNumber, Number}; @@ -43,7 +43,7 @@ fn test_parsing_modes() { let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, - Some(CssRuleType::Style), ParsingMode::AllowUnitlessLength, + Some(CssRuleType::Style), PARSING_MODE_ALLOW_UNITLESS_LENGTH, QuirksMode::NoQuirks); let mut parser = Parser::new("1"); let result = Length::parse(&context, &mut parser); diff --git a/tests/unit/style/parsing/mod.rs b/tests/unit/style/parsing/mod.rs index f1d04e005bb..e15d2dca21b 100644 --- a/tests/unit/style/parsing/mod.rs +++ b/tests/unit/style/parsing/mod.rs @@ -7,14 +7,14 @@ use cssparser::Parser; use media_queries::CSSErrorReporterTest; use style::context::QuirksMode; -use style::parser::{ParsingMode, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext}; use style::stylesheets::{CssRuleType, Origin}; fn parse Result>(f: F, s: &str) -> Result { let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); let mut parser = Parser::new(s); f(&context, &mut parser) diff --git a/tests/unit/style/properties/mod.rs b/tests/unit/style/properties/mod.rs index 5bf1e0bcbe3..c11c1e33902 100644 --- a/tests/unit/style/properties/mod.rs +++ b/tests/unit/style/properties/mod.rs @@ -5,14 +5,14 @@ use cssparser::Parser; use media_queries::CSSErrorReporterTest; use style::context::QuirksMode; -use style::parser::{ParsingMode, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, ParserContext}; use style::stylesheets::{CssRuleType, Origin}; fn parse Result>(f: F, s: &str) -> Result { let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); let mut parser = Parser::new(s); f(&context, &mut parser) diff --git a/tests/unit/style/viewport.rs b/tests/unit/style/viewport.rs index c350d323cfe..61199660ef8 100644 --- a/tests/unit/style/viewport.rs +++ b/tests/unit/style/viewport.rs @@ -9,7 +9,7 @@ use servo_config::prefs::{PREFS, PrefValue}; use servo_url::ServoUrl; use style::context::QuirksMode; use style::media_queries::{Device, MediaList, MediaType}; -use style::parser::{ParsingMode, Parse, ParserContext}; +use style::parser::{PARSING_MODE_DEFAULT, Parse, ParserContext}; use style::shared_lock::SharedRwLock; use style::stylearc::Arc; use style::stylesheets::{CssRuleType, Stylesheet, Origin}; @@ -295,7 +295,7 @@ fn constrain_viewport() { let url = ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Viewport), - ParsingMode::Default, + PARSING_MODE_DEFAULT, QuirksMode::NoQuirks); macro_rules! from_css { From 59dd93f84910eb1fe1bc244d4cbf549bbfbf1c53 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sat, 13 May 2017 18:34:15 +0900 Subject: [PATCH 3/4] Add PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES to force to parse negative values. As per SVG spec [1], we should also parse negative color components values for SMIL, but currently Gecko does not support it either. [1] https://www.w3.org/TR/SVG/implnote.html#RangeClamping --- components/style/parser.rs | 15 ++++++++++++--- components/style/values/specified/mod.rs | 12 ++++++++++-- tests/unit/style/parsing/value.rs | 22 +++++++++++++++++++++- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/components/style/parser.rs b/components/style/parser.rs index 9874bf49f54..8bfefc414cb 100644 --- a/components/style/parser.rs +++ b/components/style/parser.rs @@ -20,6 +20,9 @@ bitflags! { /// to be in user units (px). /// https://www.w3.org/TR/SVG/coords.html#Units const PARSING_MODE_ALLOW_UNITLESS_LENGTH = 0x01, + /// In SVG, out-of-range values are not treated as an error in parsing. + /// https://www.w3.org/TR/SVG/implnote.html#RangeClamping + const PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES = 0x02, } } @@ -28,6 +31,11 @@ impl ParsingMode { pub fn allows_unitless_lengths(&self) -> bool { self.intersects(PARSING_MODE_ALLOW_UNITLESS_LENGTH) } + + /// Whether the parsing mode allows all numeric values. + pub fn allows_all_numeric_values(&self) -> bool { + self.intersects(PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES) + } } /// Asserts that all ParsingMode flags have a matching ParsingMode value in gecko. @@ -39,12 +47,12 @@ pub fn assert_parsing_mode_match() { macro_rules! check_parsing_modes { ( $( $a:ident => $b:ident ),*, ) => { if cfg!(debug_assertions) { - let mut hints = ParsingMode::all(); + let mut modes = ParsingMode::all(); $( assert_eq!(structs::$a as usize, $b.bits() as usize, stringify!($b)); - hints.remove($b); + modes.remove($b); )* - assert_eq!(hints, ParsingMode::empty(), "all ParsingMode bits should have an assertion"); + assert_eq!(modes, ParsingMode::empty(), "all ParsingMode bits should have an assertion"); } } } @@ -52,6 +60,7 @@ pub fn assert_parsing_mode_match() { check_parsing_modes! { ParsingMode_Default => PARSING_MODE_DEFAULT, ParsingMode_AllowUnitlessLength => PARSING_MODE_ALLOW_UNITLESS_LENGTH, + ParsingMode_AllowAllNumericValues => PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES, } } diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs index 8cd5ebdd793..31990fba71a 100644 --- a/components/style/values/specified/mod.rs +++ b/components/style/values/specified/mod.rs @@ -632,12 +632,20 @@ impl Number { #[allow(missing_docs)] pub fn parse_non_negative(context: &ParserContext, input: &mut Parser) -> Result { - parse_number_with_clamping_mode(context, input, AllowedNumericType::NonNegative) + if context.parsing_mode.allows_all_numeric_values() { + parse_number(context, input) + } else { + parse_number_with_clamping_mode(context, input, AllowedNumericType::NonNegative) + } } #[allow(missing_docs)] pub fn parse_at_least_one(context: &ParserContext, input: &mut Parser) -> Result { - parse_number_with_clamping_mode(context, input, AllowedNumericType::AtLeastOne) + if context.parsing_mode.allows_all_numeric_values() { + parse_number(context, input) + } else { + parse_number_with_clamping_mode(context, input, AllowedNumericType::AtLeastOne) + } } } diff --git a/tests/unit/style/parsing/value.rs b/tests/unit/style/parsing/value.rs index 2151529a293..3a1f69746e4 100644 --- a/tests/unit/style/parsing/value.rs +++ b/tests/unit/style/parsing/value.rs @@ -3,8 +3,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use app_units::Au; +use cssparser::Parser; +use media_queries::CSSErrorReporterTest; +use style::context::QuirksMode; +use style::parser::{PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES, ParserContext}; +use style::stylesheets::{CssRuleType, Origin}; use style::values::HasViewportPercentage; -use style::values::specified::{AbsoluteLength, NoCalcLength, ViewportPercentageLength}; +use style::values::specified::{AbsoluteLength, NoCalcLength, Number, ViewportPercentageLength}; #[test] fn length_has_viewport_percentage() { @@ -13,3 +18,18 @@ fn length_has_viewport_percentage() { let l = NoCalcLength::Absolute(AbsoluteLength::Px(Au(100).to_f32_px())); assert!(!l.has_viewport_percentage()); } + +#[test] +fn test_parsing_allo_all_numeric_values() { + // In SVG length mode, non-zero lengths are assumed to be px. + let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap(); + let reporter = CSSErrorReporterTest; + let context = ParserContext::new(Origin::Author, &url, &reporter, + Some(CssRuleType::Style), PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES, + QuirksMode::NoQuirks); + let mut parser = Parser::new("-1"); + let result = Number::parse_non_negative(&context, &mut parser); + assert!(result.is_ok()); + assert_eq!(result.unwrap(), Number::new(-1.)); +} + From 48f68215164745eadc3a904b87d6ff57d028e987 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sun, 14 May 2017 05:46:12 +0900 Subject: [PATCH 4/4] Update bindings. --- components/style/gecko/generated/bindings.rs | 9 +- .../style/gecko/generated/structs_debug.rs | 276 +++++++++--------- .../style/gecko/generated/structs_release.rs | 276 +++++++++--------- 3 files changed, 296 insertions(+), 265 deletions(-) diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index c1e4b70ab1d..8dfdbc2b4d3 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -1865,7 +1865,7 @@ extern "C" { pub fn Servo_ParseProperty(property: nsCSSPropertyID, value: *const nsACString, data: *mut RawGeckoURLExtraData, - length_parsing_mode: LengthParsingMode) + parsing_mode: ParsingMode) -> RawServoDeclarationBlockStrong; } extern "C" { @@ -2034,8 +2034,8 @@ extern "C" { value: *const nsACString, is_important: bool, data: *mut RawGeckoURLExtraData, - parsing_mode: - ParsingMode) -> bool; + parsing_mode: ParsingMode) + -> bool; } extern "C" { pub fn Servo_DeclarationBlock_SetPropertyById(declarations: @@ -2045,8 +2045,7 @@ extern "C" { is_important: bool, data: *mut RawGeckoURLExtraData, - parsing_mode: - ParsingMode) + parsing_mode: ParsingMode) -> bool; } extern "C" { diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index 96d6b9bba48..dd2114a1f06 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -1218,7 +1218,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_89168() { + fn __bindgen_test_layout_atomic_instantiation_89651() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1227,7 +1227,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_89176() { + fn __bindgen_test_layout_atomic_instantiation_89659() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -3749,9 +3749,20 @@ pub mod root { _unused: [u8; 0], } #[repr(C)] - #[derive(Debug, Copy, Clone)] + #[derive(Debug)] pub struct EventHandlerNonNull { - _unused: [u8; 0], + pub _base: root::mozilla::dom::CallbackFunction, + } + #[test] + fn bindgen_test_layout_EventHandlerNonNull() { + assert_eq!(::std::mem::size_of::() , + 56usize , concat ! ( + "Size of: " , stringify ! ( EventHandlerNonNull ) + )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( + EventHandlerNonNull ) )); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6353,9 +6364,14 @@ pub mod root { root::mozilla::UpdateAnimationsTasks = 8; pub type UpdateAnimationsTasks = u8; - #[repr(i32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum ParsingMode { Default = 0, SVG = 1, } + pub const ParsingMode_Default: root::mozilla::ParsingMode = 0; + pub const ParsingMode_AllowUnitlessLength: root::mozilla::ParsingMode + = + 1; + pub const ParsingMode_AllowAllNumericValues: + root::mozilla::ParsingMode = + 2; + pub type ParsingMode = u8; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum InheritTarget { @@ -6867,7 +6883,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_140656() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_141274() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -9081,7 +9097,7 @@ pub mod root { ( mValue ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_177723() { + fn __bindgen_test_layout_DefaultDelete_instantiation_178529() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11536,7 +11552,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_54552() { + fn __bindgen_test_layout_nsCharTraits_instantiation_55035() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11547,7 +11563,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_54556() { + fn __bindgen_test_layout_nsCharTraits_instantiation_55039() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -13020,7 +13036,7 @@ pub mod root { } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_92383() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_92866() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28596,7 +28612,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_173715() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_174521() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31820,7 +31836,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_194129() { + fn __bindgen_test_layout_IntegralConstant_instantiation_202097() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31829,7 +31845,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_194133() { + fn __bindgen_test_layout_IntegralConstant_instantiation_202101() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31838,7 +31854,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_194960() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_202928() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31849,7 +31865,7 @@ pub mod root { root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_194964() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_202932() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31860,7 +31876,7 @@ pub mod root { root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_195037() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_203005() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31871,7 +31887,7 @@ pub mod root { root::nsReadingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_195041() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_203009() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31882,7 +31898,7 @@ pub mod root { root::nsWritingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_200867_instantiation_200864() { + fn __bindgen_test_layout__bindgen_ty_id_208835_instantiation_208832() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31891,7 +31907,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_200900_instantiation_200897() { + fn __bindgen_test_layout__bindgen_ty_id_208868_instantiation_208865() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31900,7 +31916,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_201168() { + fn __bindgen_test_layout_nsTArray_instantiation_209136() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31911,7 +31927,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_202127() { + fn __bindgen_test_layout_Handle_instantiation_210095() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31922,7 +31938,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_202143() { + fn __bindgen_test_layout_Handle_instantiation_210111() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31933,7 +31949,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_202153() { + fn __bindgen_test_layout_MutableHandle_instantiation_210121() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31944,7 +31960,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_202169() { + fn __bindgen_test_layout_MutableHandle_instantiation_210137() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31955,7 +31971,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_202172() { + fn __bindgen_test_layout_Rooted_instantiation_210140() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31966,7 +31982,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_202509() { + fn __bindgen_test_layout_DeletePolicy_instantiation_210477() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31977,7 +31993,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_204559() { + fn __bindgen_test_layout_nsTArray_instantiation_212527() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31988,7 +32004,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_204563() { + fn __bindgen_test_layout_nsTArray_instantiation_212531() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31999,7 +32015,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_204576() { + fn __bindgen_test_layout_nsTArray_instantiation_212544() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32010,7 +32026,7 @@ pub mod root { root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_205701() { + fn __bindgen_test_layout_TenuredHeap_instantiation_213669() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32021,7 +32037,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_205791() { + fn __bindgen_test_layout_Heap_instantiation_213759() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32032,7 +32048,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_205906() { + fn __bindgen_test_layout_Heap_instantiation_213874() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32043,7 +32059,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_205913() { + fn __bindgen_test_layout_TErrorResult_instantiation_213881() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32054,7 +32070,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_205929() { + fn __bindgen_test_layout_TErrorResult_instantiation_213897() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32065,7 +32081,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_205934() { + fn __bindgen_test_layout_already_AddRefed_instantiation_213902() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32076,7 +32092,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_205986() { + fn __bindgen_test_layout_already_AddRefed_instantiation_213954() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32087,7 +32103,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_206469() { + fn __bindgen_test_layout_RefPtr_instantiation_214437() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32098,7 +32114,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_206815() { + fn __bindgen_test_layout_already_AddRefed_instantiation_214783() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32109,7 +32125,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207060() { + fn __bindgen_test_layout_already_AddRefed_instantiation_215028() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32120,7 +32136,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207207() { + fn __bindgen_test_layout_already_AddRefed_instantiation_215175() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32131,7 +32147,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_211326() { + fn __bindgen_test_layout_DeletePolicy_instantiation_219294() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32142,7 +32158,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_211324() { + fn __bindgen_test_layout_UniquePtr_instantiation_219292() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32153,7 +32169,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_211359() { + fn __bindgen_test_layout_iterator_instantiation_219327() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32164,7 +32180,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_211915() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_219895() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32175,7 +32191,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_213513() { + fn __bindgen_test_layout_nsTArray_instantiation_221493() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32188,7 +32204,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_213789() { + fn __bindgen_test_layout_LinkedList_instantiation_221769() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32199,7 +32215,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_213805() { + fn __bindgen_test_layout_RefPtr_instantiation_221785() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32210,7 +32226,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_213804() { + fn __bindgen_test_layout_nsTArray_instantiation_221784() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32223,7 +32239,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_213834() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_221814() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32234,7 +32250,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_213833() { + fn __bindgen_test_layout_nsTArray_instantiation_221813() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32245,7 +32261,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_213879() { + fn __bindgen_test_layout_already_AddRefed_instantiation_221859() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32256,7 +32272,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214044() { + fn __bindgen_test_layout_already_AddRefed_instantiation_222024() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32267,7 +32283,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214371() { + fn __bindgen_test_layout_already_AddRefed_instantiation_222351() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32278,7 +32294,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_214464() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_222444() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32289,7 +32305,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_214501() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_222481() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32300,7 +32316,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_214759() { + fn __bindgen_test_layout_DefaultDelete_instantiation_222739() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32311,7 +32327,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_214757() { + fn __bindgen_test_layout_UniquePtr_instantiation_222737() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32322,7 +32338,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_215307() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_223287() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32335,7 +32351,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_215306() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_223286() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32346,7 +32362,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215423() { + fn __bindgen_test_layout_nsTArray_instantiation_223403() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32357,7 +32373,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_215474() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_223454() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32366,7 +32382,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215649() { + fn __bindgen_test_layout_nsTArray_instantiation_223634() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32377,7 +32393,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_215765() { + fn __bindgen_test_layout_DefaultDelete_instantiation_223750() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32388,7 +32404,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215930() { + fn __bindgen_test_layout_nsTArray_instantiation_223915() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32399,7 +32415,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_216717() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_224702() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32410,7 +32426,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_216769() { + fn __bindgen_test_layout_already_AddRefed_instantiation_224794() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32421,7 +32437,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_216950() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_224975() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32432,7 +32448,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_217457() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_225498() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32443,7 +32459,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_217465() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_225506() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32454,7 +32470,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_217580() { + fn __bindgen_test_layout_OwningNonNull_instantiation_225621() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32465,7 +32481,7 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_218659() { + fn __bindgen_test_layout_PointTyped_instantiation_226700() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32476,7 +32492,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_218664() { + fn __bindgen_test_layout_IntPointTyped_instantiation_226705() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32487,7 +32503,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_218667() { + fn __bindgen_test_layout_SizeTyped_instantiation_226708() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32498,7 +32514,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_218675() { + fn __bindgen_test_layout_RectTyped_instantiation_226716() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32509,7 +32525,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_218707() { + fn __bindgen_test_layout_IntPointTyped_instantiation_226748() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32520,7 +32536,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_218715() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_226756() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32531,7 +32547,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_218723() { + fn __bindgen_test_layout_IntRectTyped_instantiation_226764() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32542,7 +32558,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_218890() { + fn __bindgen_test_layout_MarginTyped_instantiation_226931() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32553,7 +32569,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_218925() { + fn __bindgen_test_layout_RectTyped_instantiation_226966() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32564,7 +32580,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_218930() { + fn __bindgen_test_layout_IntRectTyped_instantiation_226971() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32575,7 +32591,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_218976() { + fn __bindgen_test_layout_ScaleFactor_instantiation_227017() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32584,7 +32600,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_219076() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_227117() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32595,7 +32611,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_219084() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_227125() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32606,7 +32622,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_219128() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_227169() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32617,7 +32633,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_219758() { + fn __bindgen_test_layout_nsTArray_instantiation_227799() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32630,7 +32646,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_219774() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_227815() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32641,7 +32657,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_222982() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_231089() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32652,7 +32668,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_223618() { + fn __bindgen_test_layout_already_AddRefed_instantiation_231725() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32663,7 +32679,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_223709() { + fn __bindgen_test_layout_DefaultDelete_instantiation_231816() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32674,7 +32690,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_223713() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_231820() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32685,7 +32701,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_224902() { + fn __bindgen_test_layout_already_AddRefed_instantiation_233009() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32696,7 +32712,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_225188() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_233295() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32707,7 +32723,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_226778() { + fn __bindgen_test_layout_nsTArray_instantiation_234885() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32718,7 +32734,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_226790() { + fn __bindgen_test_layout_RefPtr_instantiation_234897() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32731,7 +32747,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_226789() { + fn __bindgen_test_layout_nsTArray_instantiation_234896() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32744,7 +32760,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_226823() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_234930() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32755,7 +32771,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_226920() { + fn __bindgen_test_layout_UniquePtr_instantiation_235027() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32766,7 +32782,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_228702() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_236809() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32777,7 +32793,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_228741() { + fn __bindgen_test_layout_OwningNonNull_instantiation_236848() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32790,7 +32806,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_228762() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_236869() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32801,7 +32817,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_228793() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_236900() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32812,7 +32828,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_229338() { + fn __bindgen_test_layout_DefaultDelete_instantiation_237445() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32823,7 +32839,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_229352() { + fn __bindgen_test_layout_already_AddRefed_instantiation_237459() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32834,7 +32850,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_229356() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_237463() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32845,7 +32861,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_229430() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_237537() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32856,7 +32872,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_229717() { + fn __bindgen_test_layout_DefaultDelete_instantiation_237824() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32867,7 +32883,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_229715() { + fn __bindgen_test_layout_UniquePtr_instantiation_237822() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32878,7 +32894,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_229723() { + fn __bindgen_test_layout_DefaultDelete_instantiation_237830() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32889,7 +32905,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_229721() { + fn __bindgen_test_layout_UniquePtr_instantiation_237828() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32900,7 +32916,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_230066() { + fn __bindgen_test_layout_Maybe_instantiation_238173() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32911,7 +32927,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_230233() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_238340() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32920,7 +32936,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_230384() { + fn __bindgen_test_layout_Maybe_instantiation_238491() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32931,7 +32947,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_230399() { + fn __bindgen_test_layout_already_AddRefed_instantiation_238506() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32942,7 +32958,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_230407() { + fn __bindgen_test_layout_DefaultDelete_instantiation_238514() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32953,7 +32969,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_230405() { + fn __bindgen_test_layout_UniquePtr_instantiation_238512() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32964,7 +32980,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_230446() { + fn __bindgen_test_layout_DefaultDelete_instantiation_238553() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32975,7 +32991,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_230597() { + fn __bindgen_test_layout_pair_instantiation_238704() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32986,7 +33002,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_230596() { + fn __bindgen_test_layout_nsTArray_instantiation_238703() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -33001,7 +33017,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_231598() { + fn __bindgen_test_layout_RefPtr_instantiation_239705() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33012,7 +33028,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_233320() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_243697() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33023,7 +33039,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_233912() { + fn __bindgen_test_layout_nsTArray_instantiation_244289() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33036,7 +33052,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_234094() { + fn __bindgen_test_layout_Maybe_instantiation_244471() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33047,7 +33063,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_234269() { + fn __bindgen_test_layout_RefPtr_instantiation_244646() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33058,7 +33074,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_234513() { + fn __bindgen_test_layout_Sequence_instantiation_244890() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -33067,7 +33083,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_234812() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_245189() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33078,7 +33094,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_234811() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_245188() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33089,7 +33105,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_235947() { + fn __bindgen_test_layout_nsTArray_instantiation_246324() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33100,7 +33116,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_235985() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_246362() { 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 5275212d5bb..6c30b5bcdce 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -1218,7 +1218,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_87959() { + fn __bindgen_test_layout_atomic_instantiation_88535() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1227,7 +1227,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_87967() { + fn __bindgen_test_layout_atomic_instantiation_88543() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -3642,9 +3642,20 @@ pub mod root { _unused: [u8; 0], } #[repr(C)] - #[derive(Debug, Copy, Clone)] + #[derive(Debug)] pub struct EventHandlerNonNull { - _unused: [u8; 0], + pub _base: root::mozilla::dom::CallbackFunction, + } + #[test] + fn bindgen_test_layout_EventHandlerNonNull() { + assert_eq!(::std::mem::size_of::() , + 48usize , concat ! ( + "Size of: " , stringify ! ( EventHandlerNonNull ) + )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( + EventHandlerNonNull ) )); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6216,9 +6227,14 @@ pub mod root { root::mozilla::UpdateAnimationsTasks = 8; pub type UpdateAnimationsTasks = u8; - #[repr(i32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum ParsingMode { Default = 0, SVG = 1, } + pub const ParsingMode_Default: root::mozilla::ParsingMode = 0; + pub const ParsingMode_AllowUnitlessLength: root::mozilla::ParsingMode + = + 1; + pub const ParsingMode_AllowAllNumericValues: + root::mozilla::ParsingMode = + 2; + pub type ParsingMode = u8; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum InheritTarget { @@ -6732,7 +6748,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_137397() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_138166() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -8836,7 +8852,7 @@ pub mod root { ( mValue ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_173970() { + fn __bindgen_test_layout_DefaultDelete_instantiation_175037() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11069,7 +11085,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_53251() { + fn __bindgen_test_layout_nsCharTraits_instantiation_53827() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11080,7 +11096,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_53255() { + fn __bindgen_test_layout_nsCharTraits_instantiation_53831() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12717,7 +12733,7 @@ pub mod root { } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_91045() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_91623() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28080,7 +28096,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_169962() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_171029() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31304,7 +31320,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_190259() { + fn __bindgen_test_layout_IntegralConstant_instantiation_198488() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31313,7 +31329,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_190263() { + fn __bindgen_test_layout_IntegralConstant_instantiation_198492() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31322,7 +31338,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_191087() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_199316() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31333,7 +31349,7 @@ pub mod root { root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_191091() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_199320() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31344,7 +31360,7 @@ pub mod root { root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_191164() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_199393() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31355,7 +31371,7 @@ pub mod root { root::nsReadingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_191168() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_199397() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31366,7 +31382,7 @@ pub mod root { root::nsWritingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_196937_instantiation_196934() { + fn __bindgen_test_layout__bindgen_ty_id_205166_instantiation_205163() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31375,7 +31391,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_196970_instantiation_196967() { + fn __bindgen_test_layout__bindgen_ty_id_205199_instantiation_205196() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31384,7 +31400,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197238() { + fn __bindgen_test_layout_nsTArray_instantiation_205467() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31395,7 +31411,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_198190() { + fn __bindgen_test_layout_Handle_instantiation_206419() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31406,7 +31422,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_198206() { + fn __bindgen_test_layout_Handle_instantiation_206435() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31417,7 +31433,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_198216() { + fn __bindgen_test_layout_MutableHandle_instantiation_206445() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31428,7 +31444,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_198232() { + fn __bindgen_test_layout_MutableHandle_instantiation_206461() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31439,7 +31455,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_198235() { + fn __bindgen_test_layout_Rooted_instantiation_206464() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31450,7 +31466,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_198572() { + fn __bindgen_test_layout_DeletePolicy_instantiation_206801() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31461,7 +31477,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_200575() { + fn __bindgen_test_layout_nsTArray_instantiation_208804() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31472,7 +31488,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_200579() { + fn __bindgen_test_layout_nsTArray_instantiation_208808() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31483,7 +31499,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_200592() { + fn __bindgen_test_layout_nsTArray_instantiation_208821() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31494,7 +31510,7 @@ pub mod root { root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_201451() { + fn __bindgen_test_layout_TenuredHeap_instantiation_209688() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31505,7 +31521,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_201541() { + fn __bindgen_test_layout_Heap_instantiation_209778() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31516,7 +31532,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_201651() { + fn __bindgen_test_layout_TErrorResult_instantiation_209888() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31527,7 +31543,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_201667() { + fn __bindgen_test_layout_TErrorResult_instantiation_209904() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31538,7 +31554,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_201672() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209909() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31549,7 +31565,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_201724() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209961() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31560,7 +31576,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_202198() { + fn __bindgen_test_layout_RefPtr_instantiation_210435() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31571,7 +31587,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_202544() { + fn __bindgen_test_layout_already_AddRefed_instantiation_210781() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31582,7 +31598,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_202787() { + fn __bindgen_test_layout_already_AddRefed_instantiation_211024() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31593,7 +31609,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_202934() { + fn __bindgen_test_layout_already_AddRefed_instantiation_211171() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31604,7 +31620,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_207022() { + fn __bindgen_test_layout_DeletePolicy_instantiation_215266() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31615,7 +31631,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_207020() { + fn __bindgen_test_layout_UniquePtr_instantiation_215264() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31626,7 +31642,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_207055() { + fn __bindgen_test_layout_iterator_instantiation_215299() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31637,7 +31653,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_207609() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_215865() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31648,7 +31664,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_208867() { + fn __bindgen_test_layout_Heap_instantiation_217123() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31659,7 +31675,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209209() { + fn __bindgen_test_layout_nsTArray_instantiation_217465() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31672,7 +31688,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_209485() { + fn __bindgen_test_layout_LinkedList_instantiation_217741() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31683,7 +31699,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_209501() { + fn __bindgen_test_layout_RefPtr_instantiation_217757() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31694,7 +31710,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209500() { + fn __bindgen_test_layout_nsTArray_instantiation_217756() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31707,7 +31723,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_209530() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_217786() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31718,7 +31734,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209529() { + fn __bindgen_test_layout_nsTArray_instantiation_217785() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31729,7 +31745,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_209575() { + fn __bindgen_test_layout_already_AddRefed_instantiation_217831() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31740,7 +31756,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_209740() { + fn __bindgen_test_layout_already_AddRefed_instantiation_217996() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31751,7 +31767,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_210067() { + fn __bindgen_test_layout_already_AddRefed_instantiation_218323() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31762,7 +31778,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_210160() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_218416() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31773,7 +31789,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_210197() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_218453() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31784,7 +31800,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_210453() { + fn __bindgen_test_layout_DefaultDelete_instantiation_218709() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31795,7 +31811,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_210451() { + fn __bindgen_test_layout_UniquePtr_instantiation_218707() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31806,7 +31822,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_210991() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_219247() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31819,7 +31835,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_210990() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_219246() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31830,7 +31846,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_211107() { + fn __bindgen_test_layout_nsTArray_instantiation_219363() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31841,7 +31857,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_211154() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_219410() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -31850,7 +31866,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_211326() { + fn __bindgen_test_layout_nsTArray_instantiation_219587() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31861,7 +31877,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_211442() { + fn __bindgen_test_layout_DefaultDelete_instantiation_219703() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31872,7 +31888,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_211604() { + fn __bindgen_test_layout_nsTArray_instantiation_219865() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31883,7 +31899,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_212391() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_220652() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31894,7 +31910,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_212443() { + fn __bindgen_test_layout_already_AddRefed_instantiation_220744() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31905,7 +31921,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_212624() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_220925() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31916,7 +31932,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_213125() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_221442() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31927,7 +31943,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_213240() { + fn __bindgen_test_layout_OwningNonNull_instantiation_221557() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31938,7 +31954,7 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_213525() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_221842() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31949,7 +31965,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_214316() { + fn __bindgen_test_layout_PointTyped_instantiation_222633() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31960,7 +31976,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_214321() { + fn __bindgen_test_layout_IntPointTyped_instantiation_222638() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31971,7 +31987,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_214324() { + fn __bindgen_test_layout_SizeTyped_instantiation_222641() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31982,7 +31998,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_214332() { + fn __bindgen_test_layout_RectTyped_instantiation_222649() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31993,7 +32009,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_214364() { + fn __bindgen_test_layout_IntPointTyped_instantiation_222681() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32004,7 +32020,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_214372() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_222689() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32015,7 +32031,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_214380() { + fn __bindgen_test_layout_IntRectTyped_instantiation_222697() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32026,7 +32042,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_214547() { + fn __bindgen_test_layout_MarginTyped_instantiation_222864() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32037,7 +32053,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_214582() { + fn __bindgen_test_layout_RectTyped_instantiation_222899() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32048,7 +32064,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_214587() { + fn __bindgen_test_layout_IntRectTyped_instantiation_222904() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32059,7 +32075,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_214633() { + fn __bindgen_test_layout_ScaleFactor_instantiation_222950() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32068,7 +32084,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_214733() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_223050() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32079,7 +32095,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_214741() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_223058() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32090,7 +32106,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_214785() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_223102() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32101,7 +32117,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215415() { + fn __bindgen_test_layout_nsTArray_instantiation_223732() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32114,7 +32130,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_215431() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_223748() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32125,7 +32141,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_218567() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_227020() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32136,7 +32152,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_219197() { + fn __bindgen_test_layout_already_AddRefed_instantiation_227650() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32147,7 +32163,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_219288() { + fn __bindgen_test_layout_DefaultDelete_instantiation_227741() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32158,7 +32174,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_219292() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_227745() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32169,7 +32185,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_220481() { + fn __bindgen_test_layout_already_AddRefed_instantiation_228934() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32180,7 +32196,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_220767() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_229220() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32191,7 +32207,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_222357() { + fn __bindgen_test_layout_nsTArray_instantiation_230810() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32202,7 +32218,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_222369() { + fn __bindgen_test_layout_RefPtr_instantiation_230822() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32215,7 +32231,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_222368() { + fn __bindgen_test_layout_nsTArray_instantiation_230821() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32228,7 +32244,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_222402() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_230855() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32239,7 +32255,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_222499() { + fn __bindgen_test_layout_UniquePtr_instantiation_230952() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32250,7 +32266,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_224261() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_232714() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32261,7 +32277,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_224300() { + fn __bindgen_test_layout_OwningNonNull_instantiation_232753() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32274,7 +32290,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_224321() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_232774() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32285,7 +32301,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_224352() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_232805() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32296,7 +32312,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_224897() { + fn __bindgen_test_layout_DefaultDelete_instantiation_233350() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32307,7 +32323,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_224911() { + fn __bindgen_test_layout_already_AddRefed_instantiation_233364() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32318,7 +32334,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_224915() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_233368() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32329,7 +32345,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_224989() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_233442() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32340,7 +32356,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_225276() { + fn __bindgen_test_layout_DefaultDelete_instantiation_233729() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32351,7 +32367,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_225274() { + fn __bindgen_test_layout_UniquePtr_instantiation_233727() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32362,7 +32378,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_225282() { + fn __bindgen_test_layout_DefaultDelete_instantiation_233735() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32373,7 +32389,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_225280() { + fn __bindgen_test_layout_UniquePtr_instantiation_233733() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32384,7 +32400,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_225552() { + fn __bindgen_test_layout_Maybe_instantiation_234005() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32395,7 +32411,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_225719() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_234172() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32404,7 +32420,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_225867() { + fn __bindgen_test_layout_Maybe_instantiation_234320() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32415,7 +32431,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_225882() { + fn __bindgen_test_layout_already_AddRefed_instantiation_234335() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32426,7 +32442,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_225890() { + fn __bindgen_test_layout_DefaultDelete_instantiation_234343() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32437,7 +32453,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_225888() { + fn __bindgen_test_layout_UniquePtr_instantiation_234341() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32448,7 +32464,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_225929() { + fn __bindgen_test_layout_DefaultDelete_instantiation_234382() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32459,7 +32475,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_226080() { + fn __bindgen_test_layout_pair_instantiation_234533() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32470,7 +32486,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_226079() { + fn __bindgen_test_layout_nsTArray_instantiation_234532() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -32485,7 +32501,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_227081() { + fn __bindgen_test_layout_RefPtr_instantiation_235534() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32496,7 +32512,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_228803() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_239526() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32507,7 +32523,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_229395() { + fn __bindgen_test_layout_nsTArray_instantiation_240118() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32520,7 +32536,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_229571() { + fn __bindgen_test_layout_Maybe_instantiation_240294() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32531,7 +32547,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_229746() { + fn __bindgen_test_layout_RefPtr_instantiation_240469() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32542,7 +32558,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_229990() { + fn __bindgen_test_layout_Sequence_instantiation_240713() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32551,7 +32567,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_230289() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_241012() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32562,7 +32578,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_230288() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_241011() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32573,7 +32589,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_231422() { + fn __bindgen_test_layout_nsTArray_instantiation_242145() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32584,7 +32600,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_231458() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_242181() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! (