Add SpecifiedImageUrl for <url> used as images.

This commit is contained in:
Xidorn Quan 2018-03-08 21:31:05 +11:00
parent 14b708311b
commit a99ca543cd
18 changed files with 151 additions and 136 deletions

View file

@ -646,9 +646,17 @@ pub enum ComputedUrl {
Valid(ServoUrl),
}
/// TODO: Properly build ComputedUrl for gecko
/// The computed value of a CSS `url()` for image.
#[cfg(feature = "servo")]
pub type ComputedImageUrl = ComputedUrl;
// TODO: Properly build ComputedUrl for gecko
/// The computed value of a CSS `url()`.
#[cfg(feature = "gecko")]
pub type ComputedUrl = specified::url::SpecifiedUrl;
/// The computed value of a CSS `url()` for image.
#[cfg(feature = "gecko")]
pub type ComputedImageUrl = specified::url::SpecifiedImageUrl;
#[cfg(feature = "servo")]
impl ComputedUrl {
@ -680,3 +688,6 @@ impl ToCss for ComputedUrl {
/// <url> | <none>
pub type UrlOrNone = Either<ComputedUrl, None_>;
/// <url> | <none> for image
pub type ImageUrlOrNone = Either<ComputedImageUrl, None_>;