diff options
author | cku <cku@mozilla.com> | 2017-04-27 00:06:43 +0800 |
---|---|---|
committer | cku <cku@mozilla.com> | 2017-04-27 00:07:38 +0800 |
commit | 2f9127628029c3474c32913d6f270ac0b96060d2 (patch) | |
tree | 0f6a5ccfdd00fd148d3649a9c19b69edd6a14797 /components/style/gecko/conversions.rs | |
parent | 53279596db7e3bf2fbfd457780cebc6435c646c1 (diff) | |
download | servo-2f9127628029c3474c32913d6f270ac0b96060d2.tar.gz servo-2f9127628029c3474c32913d6f270ac0b96060d2.zip |
Stylo: Remove the second parameter(with_url) of nsStyleImage::set.
Diffstat (limited to 'components/style/gecko/conversions.rs')
-rw-r--r-- | components/style/gecko/conversions.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/style/gecko/conversions.rs b/components/style/gecko/conversions.rs index 42c146f7125..631e5abb1eb 100644 --- a/components/style/gecko/conversions.rs +++ b/components/style/gecko/conversions.rs @@ -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()); } - }, - _ => (), + } } } |