mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Part 1: Add ScrollTimeline class
Define a simple version of ScrollTimeline. Differential Revision: https://phabricator.services.mozilla.com/D129099
This commit is contained in:
parent
d1bb131acc
commit
84cd22c3e0
1 changed files with 7 additions and 3 deletions
|
@ -182,7 +182,8 @@ impl Default for Source {
|
||||||
/// definition of ScrollTimelineOptions (WebIDL API).
|
/// definition of ScrollTimelineOptions (WebIDL API).
|
||||||
/// https://drafts.csswg.org/scroll-animations/#dom-scrolltimelineoptions-orientation
|
/// https://drafts.csswg.org/scroll-animations/#dom-scrolltimelineoptions-orientation
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Eq, Parse, PartialEq, PartialOrd, ToCss, ToShmem)]
|
#[derive(Clone, Copy, Debug, MallocSizeOf, Eq, Parse, PartialEq, PartialOrd, ToCss, ToShmem)]
|
||||||
pub enum Orientation {
|
#[repr(u8)]
|
||||||
|
pub enum ScrollDirection {
|
||||||
/// The initial value.
|
/// The initial value.
|
||||||
Auto,
|
Auto,
|
||||||
/// The direction along the block axis. This is the default value.
|
/// The direction along the block axis. This is the default value.
|
||||||
|
@ -195,12 +196,15 @@ pub enum Orientation {
|
||||||
Vertical,
|
Vertical,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Orientation {
|
impl Default for ScrollDirection {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Orientation::Auto
|
ScrollDirection::Auto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Avoid name collision in cbindgen with StyleOrientation.
|
||||||
|
pub use self::ScrollDirection as Orientation;
|
||||||
|
|
||||||
/// Scroll-timeline offsets. We treat None as an empty vector.
|
/// Scroll-timeline offsets. We treat None as an empty vector.
|
||||||
/// value: none | <scroll-timeline-offset>#
|
/// value: none | <scroll-timeline-offset>#
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue