mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move Parse impl of SpecifiedUrl into corresponding files.
This commit is contained in:
parent
a99ca543cd
commit
d001fd9a0a
3 changed files with 18 additions and 13 deletions
|
@ -116,23 +116,10 @@ pub mod ui;
|
|||
|
||||
/// Common handling for the specified value CSS url() values.
|
||||
pub mod url {
|
||||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
use style_traits::ParseError;
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
pub use ::servo::url::*;
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use ::gecko::url::*;
|
||||
|
||||
impl Parse for SpecifiedUrl {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
let url = input.expect_url()?;
|
||||
Self::parse_from_string(url.as_ref().to_owned(), context)
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for SpecifiedUrl {}
|
||||
}
|
||||
|
||||
/// Parse a `<number>` value, with a given clamping mode.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue