mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Let aspect-ratio (css-sizing-4) support 'auto | <ratio>'.
In order to test its parsing and serialization, we expose it but protect it behind a pref. Besides, I would like to drop layout.css.aspect-ratio-number.enabled in the next patch because the spec has been updated. It seems we don't have to keep this pref and we should always use Number. Differential Revision: https://phabricator.services.mozilla.com/D74955
This commit is contained in:
parent
bd23e05c47
commit
fc9321bb23
8 changed files with 185 additions and 18 deletions
|
@ -328,6 +328,7 @@ class Longhand(object):
|
|||
"AlignItems",
|
||||
"AlignSelf",
|
||||
"Appearance",
|
||||
"AspectRatio",
|
||||
"BreakBetween",
|
||||
"BreakWithin",
|
||||
"BackgroundRepeat",
|
||||
|
@ -364,7 +365,6 @@ class Longhand(object):
|
|||
"MozScriptSizeMultiplier",
|
||||
"TextDecorationSkipInk",
|
||||
"NonNegativeNumber",
|
||||
"Number",
|
||||
"OffsetRotate",
|
||||
"Opacity",
|
||||
"OutlineStyle",
|
||||
|
|
|
@ -447,17 +447,13 @@ ${helpers.predefined_type(
|
|||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
|
||||
// NOTE(emilio): Before exposing this property to content, we probably need to
|
||||
// change syntax and such, and make it apply to more elements.
|
||||
//
|
||||
// For now, it's used only for mapped attributes.
|
||||
${helpers.predefined_type(
|
||||
"aspect-ratio",
|
||||
"Number",
|
||||
"computed::Number::zero()",
|
||||
"AspectRatio",
|
||||
"computed::AspectRatio::auto()",
|
||||
engines="gecko servo-2013",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="Internal, for now",
|
||||
enabled_in="",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-sizing-4/#aspect-ratio",
|
||||
gecko_pref="layout.css.aspect-ratio.enabled",
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue