Add an extra data field to ParserContext.

This will be used for passing Gecko-specific information through
the CSS parser in stylo.
This commit is contained in:
Cameron McCormack 2016-05-19 11:58:31 +10:00
parent a636b7127e
commit bb85f5faf0
10 changed files with 91 additions and 27 deletions

View file

@ -15,6 +15,7 @@ use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::cell::Ref;
use string_cache::Atom;
use style::parser::ParserContextExtraData;
use style::properties::{PropertyDeclaration, Shorthand};
use style::properties::{is_supported_property, parse_one_declaration};
use style::selector_impl::PseudoElement;
@ -239,7 +240,9 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
// Step 6
let window = window_from_node(&*self.owner);
let declarations = parse_one_declaration(&property, &value, &window.get_url(), window.css_error_reporter());
let declarations =
parse_one_declaration(&property, &value, &window.get_url(), window.css_error_reporter(),
ParserContextExtraData::default());
// Step 7
let declarations = if let Ok(declarations) = declarations {