style: Implement scroll-snap-align parser and serializer.

https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

Differential Revision: https://phabricator.services.mozilla.com/D20205
This commit is contained in:
Hiroyuki Ikezoe 2019-02-18 23:10:08 +00:00 committed by Emilio Cobos Álvarez
parent 7cbaaf6734
commit 22e12a0f52
8 changed files with 97 additions and 3 deletions

View file

@ -339,6 +339,7 @@ class Longhand(object):
"Resize",
"SVGOpacity",
"SVGPaintOrder",
"ScrollSnapAlign",
"ScrollSnapType",
"TextAlign",
"TextDecorationLine",

View file

@ -1354,6 +1354,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
"Appearance": impl_simple,
"OverscrollBehavior": impl_simple,
"OverflowClipBox": impl_simple,
"ScrollSnapAlign": impl_simple,
"ScrollSnapType": impl_simple,
"Float": impl_simple,
"Overflow": impl_simple,

View file

@ -417,6 +417,16 @@ ${helpers.single_keyword(
animation_value_type="discrete",
)}
${helpers.predefined_type(
"scroll-snap-align",
"ScrollSnapAlign",
"computed::ScrollSnapAlign::none()",
products="gecko",
gecko_pref="layout.css.scroll-snap-v1.enabled",
spec="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align",
animation_value_type="discrete",
)}
% for axis in ["x", "y"]:
${helpers.predefined_type(
"scroll-snap-type-" + axis,