stylo: Implement scroll-snap-coordinate

MozReview-Commit-ID: 6mr4ktfeEGT
This commit is contained in:
Manish Goregaokar 2017-02-06 17:45:09 -08:00 committed by Manish Goregaokar
parent a095565a8c
commit 20796ee94e
4 changed files with 62 additions and 4 deletions

View file

@ -21,8 +21,9 @@
</%call>
</%def>
<%def name="predefined_type(name, type, initial_value, parse_method='parse', needs_context=True, **kwargs)">
<%call expr="longhand(name, predefined_type=type, **kwargs)">
<%def name="predefined_type(name, type, initial_value, parse_method='parse',
needs_context=True, vector=False, **kwargs)">
<%def name="predefined_type_inner(name, type, initial_value, parse_method)">
#[allow(unused_imports)]
use app_units::Au;
use cssparser::{Color as CSSParserColor, RGBA};
@ -40,7 +41,16 @@
specified::${type}::${parse_method}(input)
% endif
}
</%call>
</%def>
% if vector:
<%call expr="vector_longhand(name, predefined_type=type, **kwargs)">
${predefined_type_inner(name, type, initial_value, parse_method)}
</%call>
% else:
<%call expr="longhand(name, predefined_type=type, **kwargs)">
${predefined_type_inner(name, type, initial_value, parse_method)}
</%call>
% endif
</%def>
// FIXME (Manishearth): Add computed_value_as_specified argument