Skip to content
Permalink
Browse files

style: Rename ScrollSnapType to ScrollSnapStrictness.

The scroll snap strictness is defined in the new spec [1], and the structure
is the exactly same as the old scroll snap type structure.

[1] https://drafts.csswg.org/css-scroll-snap-1/#snap-strictness

Differential Revision: https://phabricator.services.mozilla.com/D21621
  • Loading branch information...
hiikezoe authored and emilio committed Apr 11, 2019
1 parent 0a84073 commit 2f457ed144bf8960f54671c2e27705e59610e0dd
@@ -341,7 +341,7 @@ def specified_is_copy(self):
"SVGOpacity",
"SVGPaintOrder",
"ScrollSnapAlign",
"ScrollSnapType",
"ScrollSnapStrictness",
"TextAlign",
"TextDecorationLine",
"TextEmphasisPosition",
@@ -430,8 +430,8 @@ ${helpers.predefined_type(
% for axis in ["x", "y"]:
${helpers.predefined_type(
"scroll-snap-type-" + axis,
"ScrollSnapType",
"computed::ScrollSnapType::None",
"ScrollSnapStrictness",
"computed::ScrollSnapStrictness::None",
products="gecko",
needs_context=False,
gecko_pref="layout.css.scroll-snap.enabled",
@@ -15,7 +15,7 @@ pub use crate::values::specified::box_::{AnimationName, Appearance, BreakBetween
pub use crate::values::specified::box_::{Clear as SpecifiedClear, Float as SpecifiedFloat};
pub use crate::values::specified::box_::{Contain, Display, Overflow};
pub use crate::values::specified::box_::{OverflowAnchor, OverflowClipBox};
pub use crate::values::specified::box_::{OverscrollBehavior, ScrollSnapAlign, ScrollSnapType};
pub use crate::values::specified::box_::{OverscrollBehavior, ScrollSnapAlign, ScrollSnapStrictness};
pub use crate::values::specified::box_::{TouchAction, TransitionProperty, WillChange};

/// A computed value for the `vertical-align` property.
@@ -42,7 +42,7 @@ pub use self::box_::{AnimationIterationCount, AnimationName, Contain};
pub use self::box_::{Appearance, BreakBetween, BreakWithin, Clear, Float};
pub use self::box_::{Display, Overflow, OverflowAnchor, TransitionProperty};
pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize};
pub use self::box_::{ScrollSnapAlign, ScrollSnapType, TouchAction, VerticalAlign, WillChange};
pub use self::box_::{ScrollSnapAlign, ScrollSnapStrictness, TouchAction, VerticalAlign, WillChange};
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue};
pub use self::column::ColumnCount;
pub use self::counters::{Content, ContentItem, CounterIncrement, CounterSetOrReset};
@@ -379,6 +379,7 @@ impl Parse for AnimationName {
}
}

/// https://drafts.csswg.org/css-scroll-snap-1/#snap-strictness
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[derive(
@@ -396,7 +397,7 @@ impl Parse for AnimationName {
ToShmem,
)]
#[repr(u8)]
pub enum ScrollSnapType {
pub enum ScrollSnapStrictness {
None,
Mandatory,
Proximity,
@@ -40,7 +40,7 @@ pub use self::box_::{AnimationIterationCount, AnimationName, Contain, Display};
pub use self::box_::{Appearance, BreakBetween, BreakWithin};
pub use self::box_::{Clear, Float, Overflow, OverflowAnchor};
pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize};
pub use self::box_::{ScrollSnapAlign, ScrollSnapType};
pub use self::box_::{ScrollSnapAlign, ScrollSnapStrictness};
pub use self::box_::{TouchAction, TransitionProperty, VerticalAlign, WillChange};
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue};
pub use self::column::ColumnCount;

0 comments on commit 2f457ed

Please sign in to comment.
You can’t perform that action at this time.