Skip to content

Commit

Permalink
Use re-exports for scroll-snap-type-y
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Burra committed Nov 14, 2016
1 parent bdedcb9 commit 1fff475
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 7 additions & 1 deletion components/style/properties/gecko.mako.rs
Expand Up @@ -962,7 +962,8 @@ fn static_assert() {

<% skip_box_longhands= """display overflow-y vertical-align
-moz-binding page-break-before page-break-after
scroll-snap-points-x scroll-snap-points-y transform""" %>
scroll-snap-points-x scroll-snap-points-y transform
scroll-snap-type-y""" %>
<%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">

// We manually-implement the |display| property until we get general
Expand Down Expand Up @@ -1204,6 +1205,11 @@ fn static_assert() {
pub fn copy_transform_from(&mut self, other: &Self) {
unsafe { self.gecko.mSpecifiedTransform.set(&other.gecko.mSpecifiedTransform); }
}

<% scroll_snap_type_keyword = Keyword("scroll-snap-type", "none mandatory proximity") %>

${impl_keyword('scroll_snap_type_y', 'mScrollSnapTypeY', scroll_snap_type_keyword, need_clone=False)}

</%self:impl_trait>

<%def name="simple_image_array_property(name, shorthand, field_name)">
Expand Down
11 changes: 6 additions & 5 deletions components/style/properties/longhand/box.mako.rs
Expand Up @@ -1474,11 +1474,12 @@ ${helpers.single_keyword("scroll-snap-type-x",
animatable=False)}

// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type-y
${helpers.single_keyword("scroll-snap-type-y",
"none mandatory proximity",
products="gecko",
gecko_constant_prefix="NS_STYLE_SCROLL_SNAP_TYPE",
animatable=False)}
<%helpers:longhand products="gecko" name="scroll-snap-type-y" animatable="False">
pub use super::scroll_snap_type_x::SpecifiedValue;
pub use super::scroll_snap_type_x::computed_value;
pub use super::scroll_snap_type_x::get_initial_value;
pub use super::scroll_snap_type_x::parse;
</%helpers:longhand>

// Compositing and Blending Level 1
// http://www.w3.org/TR/compositing-1/
Expand Down

0 comments on commit 1fff475

Please sign in to comment.