style: Serialize a bunch of image properties with Servo.

I had to fix the conversion for BackgroundSize too, hopefully we can
simplify all this using cbindgen in the future instead of CalcValue.

Differential Revision: https://phabricator.services.mozilla.com/D7580
This commit is contained in:
Emilio Cobos Álvarez 2018-10-05 20:08:55 +00:00
parent 0d5d5a9c82
commit 7345af613a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 63 additions and 19 deletions

View file

@ -4005,7 +4005,6 @@ fn static_assert() {
pub fn clone_${shorthand}_size(&self) -> longhands::${shorthand}_size::computed_value::T {
use gecko_bindings::structs::nsStyleCoord_CalcValue as CalcValue;
use gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType as DimensionType;
use values::generics::NonNegative;
use values::computed::NonNegativeLengthOrPercentageOrAuto;
use values::generics::background::BackgroundSize;
@ -4014,7 +4013,7 @@ fn static_assert() {
NonNegativeLengthOrPercentageOrAuto::auto()
} else {
debug_assert_eq!(ty, DimensionType::eLengthPercentage as u8);
NonNegative(value.into())
value.into()
}
}