mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Replace LengthOrNone by a specific type for the perspective property
This was its only use, and it was bugged: AFAIK this didn't properly clamp animated values below 0.
This commit is contained in:
parent
4a98fa70bf
commit
260e05320c
11 changed files with 88 additions and 32 deletions
|
@ -1455,7 +1455,6 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
"length::NonNegativeLengthOrAuto": impl_style_coord,
|
||||
"length::NonNegativeLengthOrNormal": impl_style_coord,
|
||||
"Length": impl_absolute_length,
|
||||
"LengthOrNone": impl_style_coord,
|
||||
"LengthOrNormal": impl_style_coord,
|
||||
"LengthOrPercentage": impl_style_coord,
|
||||
"LengthOrPercentageOrAuto": impl_style_coord,
|
||||
|
@ -1468,6 +1467,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
"NonNegativeNumber": impl_simple,
|
||||
"Number": impl_simple,
|
||||
"Opacity": impl_simple,
|
||||
"Perspective": impl_style_coord,
|
||||
"Position": impl_position,
|
||||
"RGBAColor": impl_rgba_color,
|
||||
"SVGLength": impl_svg_length,
|
||||
|
|
|
@ -507,16 +507,17 @@ ${helpers.single_keyword("resize",
|
|||
flags="APPLIES_TO_PLACEHOLDER",
|
||||
animation_value_type="discrete")}
|
||||
|
||||
|
||||
${helpers.predefined_type("perspective",
|
||||
"LengthOrNone",
|
||||
"Either::Second(None_)",
|
||||
gecko_ffi_name="mChildPerspective",
|
||||
spec="https://drafts.csswg.org/css-transforms/#perspective",
|
||||
extra_prefixes="moz webkit",
|
||||
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
|
||||
animation_value_type="ComputedValue",
|
||||
servo_restyle_damage = "reflow_out_of_flow")}
|
||||
${helpers.predefined_type(
|
||||
"perspective",
|
||||
"Perspective",
|
||||
"computed::Perspective::none()",
|
||||
gecko_ffi_name="mChildPerspective",
|
||||
spec="https://drafts.csswg.org/css-transforms/#perspective",
|
||||
extra_prefixes="moz webkit",
|
||||
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
|
||||
animation_value_type="AnimatedPerspective",
|
||||
servo_restyle_damage = "reflow_out_of_flow",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type("perspective-origin",
|
||||
"position::Position",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue