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, serialize_identifier};
|
||||
use cssparser::{Parser, ParserInput, serialize_identifier};
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::reflector::Reflector;
|
||||
|
@ -39,7 +39,8 @@ impl CSS {
|
|||
|
||||
/// https://drafts.csswg.org/css-conditional/#dom-css-supports
|
||||
pub fn Supports_(win: &Window, condition: DOMString) -> bool {
|
||||
let mut input = Parser::new(&condition);
|
||||
let mut input = ParserInput::new(&condition);
|
||||
let mut input = Parser::new(&mut input);
|
||||
let cond = parse_condition_or_declaration(&mut input);
|
||||
if let Ok(cond) = cond {
|
||||
let url = win.Document().url();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue