mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Make ParsingMode bitflags.
assert_parsing_mode_match() is mostly the same as assert_restyle_hints_match().
This commit is contained in:
parent
fcc50ea421
commit
b6b3187efa
19 changed files with 88 additions and 58 deletions
|
@ -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))
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue