Expose CSS length mode in Stylo glue

Add length mode args to Stylo glue functions so that Gecko can enable the
special SVG mode as needed.

MozReview-Commit-ID: 1luM13MFEXX
This commit is contained in:
J. Ryan Stinnett 2017-04-14 14:04:34 +08:00
parent 6069e44f02
commit 8144aa1163
4 changed files with 34 additions and 22 deletions

View file

@ -633,13 +633,14 @@ pub fn parse_style_attribute(input: &str,
pub fn parse_one_declaration(id: PropertyId,
input: &str,
url_data: &UrlExtraData,
error_reporter: &ParseErrorReporter)
error_reporter: &ParseErrorReporter,
length_parsing_mode: LengthParsingMode)
-> Result<ParsedDeclaration, ()> {
let context = ParserContext::new(Origin::Author,
url_data,
error_reporter,
Some(CssRuleType::Style),
LengthParsingMode::Default);
length_parsing_mode);
Parser::new(input).parse_entirely(|parser| {
ParsedDeclaration::parse(id, &context, parser)
.map_err(|_| ())