mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
style: Remove old CSS scroll snap implementation.
This will save us some time from figuring out what's the best thing to do in bug 1552587, so that other patches I have in flight (mainly bug 1552708) can land, since we cannot add a single byte to nsStyleDisplay right now otherwise. The code removed here is well isolated and not that complicated, so it seems to me that should be easy to bring back should we have an emergency (and I commit to doing that while preserving the nsStyleDisplay size limit if we need to :)). Differential Revision: https://phabricator.services.mozilla.com/D32026
This commit is contained in:
parent
44926adde7
commit
8bf0f82ddc
9 changed files with 2 additions and 192 deletions
|
@ -1,44 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Generic types for legacy Gecko-only properties that should probably be
|
||||
//! un-shipped at some point in the future.
|
||||
|
||||
/// A generic value for scroll snap points.
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub enum ScrollSnapPoint<LengthPercentage> {
|
||||
/// `none`
|
||||
None,
|
||||
/// `repeat(<length-or-percentage>)`
|
||||
#[css(function)]
|
||||
Repeat(LengthPercentage),
|
||||
}
|
||||
|
||||
impl<L> ScrollSnapPoint<L> {
|
||||
/// Returns `none`.
|
||||
#[inline]
|
||||
pub fn none() -> Self {
|
||||
ScrollSnapPoint::None
|
||||
}
|
||||
|
||||
/// Returns the repeat argument, if any.
|
||||
#[inline]
|
||||
pub fn repeated(&self) -> Option<&L> {
|
||||
match *self {
|
||||
ScrollSnapPoint::None => None,
|
||||
ScrollSnapPoint::Repeat(ref length) => Some(length),
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,8 +26,6 @@ pub mod easing;
|
|||
pub mod effects;
|
||||
pub mod flex;
|
||||
pub mod font;
|
||||
#[cfg(feature = "gecko")]
|
||||
pub mod gecko;
|
||||
pub mod grid;
|
||||
pub mod image;
|
||||
pub mod length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue