mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Don't resolve URLs at parse time for Stylo.
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo and Gecko, but they're different enough at this point that I don't think it really makes sense to try to share everything. Splitting them out has some nice simplifications as well. I recognize that there's still some potential correctness issues for Servo using the resolved URI in various places where the original URI may be the right thing, but I've got too much on my plate to look into that for now. MozReview-Commit-ID: BeDu93TQ4Ow
This commit is contained in:
parent
16e04046b5
commit
63e8367eee
14 changed files with 278 additions and 244 deletions
|
@ -9,12 +9,13 @@
|
|||
|
||||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
#[cfg(feature = "servo")]
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use values::specified::{Angle, CSSColor, Length, LengthOrPercentage};
|
||||
use values::specified::position::Position;
|
||||
use values::specified::url::{SpecifiedUrl, UrlExtraData};
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
|
||||
/// Specified values for an image according to CSS-IMAGES.
|
||||
/// https://drafts.csswg.org/css-images/#image-values
|
||||
|
@ -48,8 +49,9 @@ impl Image {
|
|||
|
||||
/// Creates an already specified image value from an already resolved URL
|
||||
/// for insertion in the cascade.
|
||||
pub fn for_cascade(url: ServoUrl, extra_data: UrlExtraData) -> Self {
|
||||
Image::Url(SpecifiedUrl::for_cascade(url, extra_data))
|
||||
#[cfg(feature = "servo")]
|
||||
pub fn for_cascade(url: ServoUrl) -> Self {
|
||||
Image::Url(SpecifiedUrl::for_cascade(url))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue