mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
style: Rename MozLength to Size, and MaxLength to MaxSize.
MozLength is not a very descriptive name. If we're going to use it in both Gecko and Servo we may as well name it something more accurate. I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence of box-sizing. I don't have better ideas than `Size`, given that. [1]: https://drafts.csswg.org/css2/visudet.html#propdef-width [2]: https://drafts.csswg.org/css2/box.html#content-width Differential Revision: https://phabricator.services.mozilla.com/D19280
This commit is contained in:
parent
7ed6b9d3ce
commit
c2819365f0
26 changed files with 280 additions and 333 deletions
|
@ -244,65 +244,40 @@ ${helpers.predefined_type(
|
|||
if logical:
|
||||
spec = "https://drafts.csswg.org/css-logical-props/#propdef-%s"
|
||||
%>
|
||||
% if product == "gecko":
|
||||
// width, height, block-size, inline-size
|
||||
${helpers.predefined_type(
|
||||
size,
|
||||
"MozLength",
|
||||
"computed::MozLength::auto()",
|
||||
logical=logical,
|
||||
logical_group="size",
|
||||
allow_quirks=not logical,
|
||||
spec=spec % size,
|
||||
animation_value_type="MozLength",
|
||||
flags="GETCS_NEEDS_LAYOUT_FLUSH",
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
// min-width, min-height, min-block-size, min-inline-size,
|
||||
${helpers.predefined_type(
|
||||
"min-%s" % size,
|
||||
"MozLength",
|
||||
"computed::MozLength::auto()",
|
||||
logical=logical,
|
||||
logical_group="min-size",
|
||||
allow_quirks=not logical,
|
||||
spec=spec % size,
|
||||
animation_value_type="MozLength",
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
% else:
|
||||
// servo versions (no keyword support)
|
||||
${helpers.predefined_type(
|
||||
size,
|
||||
"NonNegativeLengthPercentageOrAuto",
|
||||
"computed::NonNegativeLengthPercentageOrAuto::auto()",
|
||||
spec=spec % size,
|
||||
logical_group="size",
|
||||
allow_quirks=not logical,
|
||||
animation_value_type="ComputedValue", logical = logical,
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
${helpers.predefined_type(
|
||||
"min-%s" % size,
|
||||
"NonNegativeLengthPercentage",
|
||||
"computed::NonNegativeLengthPercentage::zero()",
|
||||
spec=spec % ("min-%s" % size),
|
||||
logical_group="min-size",
|
||||
animation_value_type="ComputedValue",
|
||||
logical=logical,
|
||||
allow_quirks=not logical,
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
% endif
|
||||
// width, height, block-size, inline-size
|
||||
${helpers.predefined_type(
|
||||
size,
|
||||
"Size",
|
||||
"computed::Size::auto()",
|
||||
logical=logical,
|
||||
logical_group="size",
|
||||
allow_quirks=not logical,
|
||||
spec=spec % size,
|
||||
animation_value_type="Size",
|
||||
flags="GETCS_NEEDS_LAYOUT_FLUSH",
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
// min-width, min-height, min-block-size, min-inline-size
|
||||
${helpers.predefined_type(
|
||||
"min-%s" % size,
|
||||
"Size",
|
||||
"computed::Size::auto()",
|
||||
logical=logical,
|
||||
logical_group="min-size",
|
||||
allow_quirks=not logical,
|
||||
spec=spec % size,
|
||||
animation_value_type="Size",
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
${helpers.predefined_type(
|
||||
"max-%s" % size,
|
||||
"MaxLength",
|
||||
"computed::MaxLength::none()",
|
||||
"MaxSize",
|
||||
"computed::MaxSize::none()",
|
||||
logical=logical,
|
||||
logical_group="max-size",
|
||||
allow_quirks=not logical,
|
||||
spec=spec % size,
|
||||
animation_value_type="MaxLength",
|
||||
animation_value_type="MaxSize",
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
% endfor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue