stylo: Add -moz-element support

This commit is contained in:
Nazım Can Altınova 2017-04-08 20:25:34 +03:00
parent e0731215c0
commit 9618363e08
No known key found for this signature in database
GPG key ID: AF9BCD7CE6449954
5 changed files with 64 additions and 4 deletions

View file

@ -11,7 +11,7 @@
use app_units::Au;
use gecko::values::{convert_rgba_to_nscolor, GeckoStyleCoordConvertible};
use gecko_bindings::bindings::{Gecko_CreateGradient, Gecko_SetGradientImageValue, Gecko_SetUrlImageValue};
use gecko_bindings::bindings::Gecko_InitializeImageCropRect;
use gecko_bindings::bindings::{Gecko_InitializeImageCropRect, Gecko_SetImageElement};
use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImage};
use gecko_bindings::structs::{nsresult, SheetType};
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordDataMut};
@ -141,6 +141,11 @@ impl nsStyleImage {
image_rect.left.to_gecko_style_coord(&mut rect.data_at_mut(3));
}
}
Image::Element(ref element) => {
unsafe {
Gecko_SetImageElement(self, element.as_ptr());
}
},
_ => (),
}
}