mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
style: Allow C++ URLValue objects to be lazily created from Rust SpecifiedUrls.
This avoids having to support storing refcounted URLValue objects in shared memory, which would be tricky. Depends on D17183 Differential Revision: https://phabricator.services.mozilla.com/D17184
This commit is contained in:
parent
b6b5ddda71
commit
7e7a9e2ec5
3 changed files with 126 additions and 26 deletions
|
@ -123,14 +123,11 @@ impl nsStyleImage {
|
|||
match image {
|
||||
GenericImage::Gradient(boxed_gradient) => self.set_gradient(*boxed_gradient),
|
||||
GenericImage::Url(ref url) => unsafe {
|
||||
bindings::Gecko_SetLayerImageImageValue(self, (url.0).0.url_value.get());
|
||||
bindings::Gecko_SetLayerImageImageValue(self, url.url_value_ptr())
|
||||
},
|
||||
GenericImage::Rect(ref image_rect) => {
|
||||
unsafe {
|
||||
bindings::Gecko_SetLayerImageImageValue(
|
||||
self,
|
||||
(image_rect.url.0).0.url_value.get(),
|
||||
);
|
||||
bindings::Gecko_SetLayerImageImageValue(self, image_rect.url.url_value_ptr());
|
||||
bindings::Gecko_InitializeImageCropRect(self);
|
||||
|
||||
// Set CropRect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue