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

@ -18,6 +18,7 @@ use servo_url::ServoUrl;
use std::ascii::AsciiExt;
use std::sync::Arc;
use style::attr::AttrValue;
use style::parser::LengthParsingMode;
use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, LonghandId, ShorthandId};
use style::properties::{parse_one_declaration, parse_style_attribute};
use style::selector_parser::PseudoElement;
@ -257,7 +258,7 @@ impl CSSStyleDeclaration {
let window = self.owner.window();
let result =
parse_one_declaration(id, &value, &self.owner.base_url(),
window.css_error_reporter());
window.css_error_reporter(), LengthParsingMode::Default);
// Step 7
let parsed = match result {