mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
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:
parent
0d5d5a9c82
commit
7345af613a
4 changed files with 63 additions and 19 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue