style: Distinguish between specified and computed URLs.

This is needed to serialize computed URLs correctly from getComputedStyle.

Bug: 1461288
Reviewed-by: xidorn
MozReview-Commit-ID: 9wakhqNrszb
This commit is contained in:
Emilio Cobos Álvarez 2018-05-14 12:29:40 +02:00
parent a6328ba3ce
commit 1314f47da5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
11 changed files with 375 additions and 295 deletions

View file

@ -145,11 +145,11 @@ impl nsStyleImage {
match image {
GenericImage::Gradient(boxed_gradient) => self.set_gradient(*boxed_gradient),
GenericImage::Url(ref url) => unsafe {
bindings::Gecko_SetLayerImageImageValue(self, url.image_value.get());
bindings::Gecko_SetLayerImageImageValue(self, url.0.image_value.get());
},
GenericImage::Rect(ref image_rect) => {
unsafe {
bindings::Gecko_SetLayerImageImageValue(self, image_rect.url.image_value.get());
bindings::Gecko_SetLayerImageImageValue(self, image_rect.url.0.image_value.get());
bindings::Gecko_InitializeImageCropRect(self);
// Set CropRect