mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Style changes to support the 'page-orientation' property
Differential Revision: https://phabricator.services.mozilla.com/D161800
This commit is contained in:
parent
9e36918bf0
commit
dd372eb5c2
7 changed files with 33 additions and 2 deletions
|
@ -476,6 +476,7 @@ class Longhand(Property):
|
|||
"OverflowClipBox",
|
||||
"OverflowWrap",
|
||||
"OverscrollBehavior",
|
||||
"PageOrientation",
|
||||
"Percentage",
|
||||
"PrintColorAdjust",
|
||||
"Resize",
|
||||
|
|
|
@ -29,3 +29,15 @@ ${helpers.predefined_type(
|
|||
spec="https://drafts.csswg.org/css-page-3/#using-named-pages",
|
||||
animation_value_type="discrete",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"page-orientation",
|
||||
"PageOrientation",
|
||||
"computed::PageOrientation::Upright",
|
||||
engines="gecko",
|
||||
gecko_pref="layout.css.page-orientation.enabled",
|
||||
initial_specified_value="specified::PageOrientation::Upright",
|
||||
spec="https://drafts.csswg.org/css-page-3/#page-orientation-prop",
|
||||
animation_value_type="none",
|
||||
rule_types_allowed=PAGE_RULE,
|
||||
)}
|
||||
|
|
|
@ -81,7 +81,7 @@ pub use self::list::ListStyleType;
|
|||
pub use self::list::Quotes;
|
||||
pub use self::motion::{OffsetPath, OffsetRotate};
|
||||
pub use self::outline::OutlineStyle;
|
||||
pub use self::page::{PageName, PageSize, PageSizeOrientation, PaperSize};
|
||||
pub use self::page::{PageName, PageOrientation, PageSize, PageSizeOrientation, PaperSize};
|
||||
pub use self::percentage::{NonNegativePercentage, Percentage};
|
||||
pub use self::position::AspectRatio;
|
||||
pub use self::position::{
|
||||
|
|
|
@ -11,6 +11,7 @@ use crate::values::generics::size::Size2D;
|
|||
|
||||
use crate::values::specified::page as specified;
|
||||
pub use generics::page::GenericPageSize;
|
||||
pub use generics::page::PageOrientation;
|
||||
pub use generics::page::PageSizeOrientation;
|
||||
pub use generics::page::PaperSize;
|
||||
pub use specified::PageName;
|
||||
|
|
|
@ -70,6 +70,22 @@ impl PaperSize {
|
|||
}
|
||||
}
|
||||
|
||||
/// Page orientation names.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-page-3/#page-orientation-prop
|
||||
#[derive(
|
||||
Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
|
||||
)]
|
||||
#[repr(u8)]
|
||||
pub enum PageOrientation {
|
||||
/// upright
|
||||
Upright,
|
||||
/// rotate-left (counter-clockwise)
|
||||
RotateLeft,
|
||||
/// rotate-right (clockwise)
|
||||
RotateRight,
|
||||
}
|
||||
|
||||
/// Paper orientation
|
||||
///
|
||||
/// https://drafts.csswg.org/css-page-3/#page-size-prop
|
||||
|
|
|
@ -72,7 +72,7 @@ pub use self::list::ListStyleType;
|
|||
pub use self::list::Quotes;
|
||||
pub use self::motion::{OffsetPath, OffsetRotate};
|
||||
pub use self::outline::OutlineStyle;
|
||||
pub use self::page::{PageName, PageSize, PageSizeOrientation, PaperSize};
|
||||
pub use self::page::{PageName, PageOrientation, PageSize, PageSizeOrientation, PaperSize};
|
||||
pub use self::percentage::{NonNegativePercentage, Percentage};
|
||||
pub use self::position::AspectRatio;
|
||||
pub use self::position::{
|
||||
|
|
|
@ -11,6 +11,7 @@ use crate::values::{generics, CustomIdent};
|
|||
use cssparser::Parser;
|
||||
use style_traits::ParseError;
|
||||
|
||||
pub use generics::page::PageOrientation;
|
||||
pub use generics::page::PageSizeOrientation;
|
||||
pub use generics::page::PaperSize;
|
||||
/// Specified value of the @page size descriptor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue