mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use canvas_traits::{CanvasGradientStop, FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle};
|
||||
use cssparser::{Parser, RGBA};
|
||||
use cssparser::{Parser, ParserInput, RGBA};
|
||||
use cssparser::Color as CSSColor;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::CanvasGradientBinding;
|
||||
|
@ -53,7 +53,8 @@ impl CanvasGradientMethods for CanvasGradient {
|
|||
return Err(Error::IndexSize);
|
||||
}
|
||||
|
||||
let mut parser = Parser::new(&color);
|
||||
let mut input = ParserInput::new(&color);
|
||||
let mut parser = Parser::new(&mut input);
|
||||
let color = CSSColor::parse(&mut parser);
|
||||
let color = if parser.is_exhausted() {
|
||||
match color {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue