mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +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
|
@ -13,7 +13,7 @@ use std::fmt::{self, Write};
|
|||
// nonzero optimization is important in keeping the size of SpecifiedUrl below
|
||||
// the threshold.
|
||||
use std::sync::Arc;
|
||||
use style_traits::ToCss;
|
||||
use style_traits::{ToCss, ParseError};
|
||||
|
||||
/// A specified url() value for servo.
|
||||
///
|
||||
|
@ -43,7 +43,7 @@ impl SpecifiedUrl {
|
|||
/// gecko version.
|
||||
pub fn parse_from_string<'a>(url: Cow<'a, str>,
|
||||
context: &ParserContext)
|
||||
-> Result<Self, ()> {
|
||||
-> Result<Self, ParseError<'a>> {
|
||||
let serialization = Arc::new(url.into_owned());
|
||||
let resolved = context.url_data.join(&serialization).ok();
|
||||
Ok(SpecifiedUrl {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue