mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Thread ParseError return values through CSS parsing.
This commit is contained in:
parent
58e39bfffa
commit
27ae1ef2e7
121 changed files with 2133 additions and 1505 deletions
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::Parser as CssParser;
|
||||
use cssparser::{Parser as CssParser, ParserInput};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::HTMLStyleElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementMethods;
|
||||
|
@ -91,8 +91,9 @@ impl HTMLStyleElement {
|
|||
PARSING_MODE_DEFAULT,
|
||||
doc.quirks_mode());
|
||||
let shared_lock = node.owner_doc().style_shared_lock().clone();
|
||||
let mut input = ParserInput::new(&mq_str);
|
||||
let mq = Arc::new(shared_lock.wrap(
|
||||
parse_media_query_list(&context, &mut CssParser::new(&mq_str))));
|
||||
parse_media_query_list(&context, &mut CssParser::new(&mut input))));
|
||||
let loader = StylesheetLoader::for_element(self.upcast());
|
||||
let sheet = Stylesheet::from_str(&data, win.get_url(), Origin::Author, mq,
|
||||
shared_lock, Some(&loader),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue