diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-02-16 12:56:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 11:56:35 +0000 |
commit | 9a6973d629a6560367db8542cc958a41a1c83902 (patch) | |
tree | 4ad7acc99c1346a15e6c9a38b8a5b514dcebea0c /components/layout | |
parent | 29e1dfe1e4191a26708b2edee60823af2a6960bf (diff) | |
download | servo-9a6973d629a6560367db8542cc958a41a1c83902.tar.gz servo-9a6973d629a6560367db8542cc958a41a1c83902.zip |
style: Remove dependency on servo_url (#31358)
In order for stylo to be a separate crate, it needs to depend on less
things from Servo. This change makes it so that stylo no longer depends
on servo_url.
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/construct.rs | 2 | ||||
-rw-r--r-- | components/layout/display_list/builder.rs | 4 | ||||
-rw-r--r-- | components/layout/query.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index b4163cfdd80..f2fa3cb9104 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -1512,7 +1512,7 @@ where let marker_fragments = match node.style(self.style_context()).get_list().list_style_image { Image::Url(ref url_value) => { let image_info = Box::new(ImageFragmentInfo::new( - url_value.url().cloned(), + url_value.url().cloned().map(Into::into), None, node, self.layout_context, diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 1eaee7bc37f..753b7747c9f 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -734,7 +734,7 @@ impl Fragment { if let Some(url) = image_url.url() { let webrender_image = state.layout_context.get_webrender_image_for_url( self.node, - url.clone(), + url.clone().into(), UsePlaceholder::No, ); if let Some(webrender_image) = webrender_image { @@ -1205,7 +1205,7 @@ impl Fragment { let url = image_url.url()?; let image = state.layout_context.get_webrender_image_for_url( self.node, - url.clone(), + url.clone().into(), UsePlaceholder::No, )?; width = image.width; diff --git a/components/layout/query.rs b/components/layout/query.rs index aa3dfe8de2a..d55ef89a6fe 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -37,7 +37,7 @@ use style::properties::{ }; use style::selector_parser::PseudoElement; use style::shared_lock::SharedRwLock; -use style::stylesheets::{CssRuleType, Origin}; +use style::stylesheets::{CssRuleType, Origin, UrlExtraData}; use style_traits::{CSSPixel, ParsingMode, ToCss}; use webrender_api::ExternalScrollId; @@ -798,7 +798,7 @@ fn create_font_declaration( property.clone(), value, Origin::Author, - url_data, + &UrlExtraData(url_data.get_arc()), None, ParsingMode::DEFAULT, quirks_mode, |