mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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.
This commit is contained in:
parent
29e1dfe1e4
commit
9a6973d629
42 changed files with 236 additions and 144 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue