mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Stylo: Remove the second parameter(with_url) of nsStyleImage::set.
This commit is contained in:
parent
53279596db
commit
2f91276280
2 changed files with 7 additions and 8 deletions
|
@ -101,12 +101,12 @@ impl From<nsStyleCoord_CalcValue> for LengthOrPercentage {
|
|||
|
||||
impl nsStyleImage {
|
||||
/// Set a given Servo `Image` value into this `nsStyleImage`.
|
||||
pub fn set(&mut self, image: Image, with_url: bool, cacheable: &mut bool) {
|
||||
pub fn set(&mut self, image: Image, cacheable: &mut bool) {
|
||||
match image {
|
||||
Image::Gradient(gradient) => {
|
||||
self.set_gradient(gradient)
|
||||
},
|
||||
Image::Url(ref url) if with_url => {
|
||||
Image::Url(ref url) => {
|
||||
unsafe {
|
||||
Gecko_SetUrlImageValue(self, url.for_ffi());
|
||||
// We unfortunately must make any url() value uncacheable, since
|
||||
|
@ -119,7 +119,7 @@ impl nsStyleImage {
|
|||
*cacheable = false;
|
||||
}
|
||||
},
|
||||
Image::ImageRect(ref image_rect) if with_url => {
|
||||
Image::ImageRect(ref image_rect) => {
|
||||
unsafe {
|
||||
Gecko_SetUrlImageValue(self, image_rect.url.for_ffi());
|
||||
Gecko_InitializeImageCropRect(self);
|
||||
|
@ -145,8 +145,7 @@ impl nsStyleImage {
|
|||
unsafe {
|
||||
Gecko_SetImageElement(self, element.as_ptr());
|
||||
}
|
||||
},
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue