mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
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.
This commit is contained in:
parent
b80d4acef4
commit
fcc50ea421
23 changed files with 85 additions and 85 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::{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<ParsedDeclaration, ()> {
|
||||
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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue