style: Use Rust sizes for flex-basis, width, height, and their min/max properties.

Really sorry for the size of the patch :(

Only intentional behavior change is in the uses of HasLengthAndPercentage(),
where it's easier to do the right thing. The checks that used to check for
(IsCalcUnit() && CalcHasPercentage()) are wrong since bug 957915.

Differential Revision: https://phabricator.services.mozilla.com/D19553
This commit is contained in:
Emilio Cobos Álvarez 2019-02-10 13:55:16 +01:00
parent e12c76982d
commit f7a59bf0ee
9 changed files with 70 additions and 106 deletions

View file

@ -1385,13 +1385,13 @@ impl Clone for ${style_struct.gecko_struct_name} {
"length::NonNegativeLengthOrAuto": impl_style_coord,
"length::NonNegativeLengthPercentageOrNormal": impl_style_coord,
"FillRule": impl_simple,
"FlexBasis": impl_style_coord,
"FlexBasis": impl_simple,
"Length": impl_absolute_length,
"LengthOrNormal": impl_style_coord,
"LengthPercentage": impl_simple,
"LengthPercentageOrAuto": impl_style_coord,
"MaxSize": impl_style_coord,
"Size": impl_style_coord,
"MaxSize": impl_simple,
"Size": impl_simple,
"MozScriptMinSize": impl_absolute_length,
"MozScriptSizeMultiplier": impl_simple,
"NonNegativeLengthPercentage": impl_simple,

View file

@ -225,7 +225,7 @@ ${helpers.predefined_type(
extra_prefixes="webkit",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-flexbox/#order-property",
servo_restyle_damage = "reflow",
servo_restyle_damage="reflow",
)}
${helpers.predefined_type(
@ -235,7 +235,8 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit",
animation_value_type="FlexBasis",
servo_restyle_damage = "reflow",
servo_restyle_damage="reflow",
boxed=True,
)}
% for (size, logical) in ALL_SIZES: