mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Part 2 - Add page-size attribute to nsStyleStruct and property parsing
This parsing is hidden behind the pref layout.css.page-size.enabled. It isn't ideal that we parse this as a property, but we can't treat it as a descriptor because of compatibility issues with other browsers. There are also outstanding spec issues related to how descriptors like page-size are cascaded, and whether the !important specifier is valid or not. Differential Revision: https://phabricator.services.mozilla.com/D103958
This commit is contained in:
parent
cdce0d3b34
commit
3b2eef3d7d
6 changed files with 29 additions and 3 deletions
|
@ -86,7 +86,7 @@ pub enum Orientation {
|
|||
ToShmem,
|
||||
)]
|
||||
#[repr(C, u8)]
|
||||
pub enum PageSize<S> {
|
||||
pub enum GenericPageSize<S> {
|
||||
/// Page dimensions.
|
||||
Size(S),
|
||||
/// Paper size with no orientation.
|
||||
|
@ -99,6 +99,8 @@ pub enum PageSize<S> {
|
|||
Auto,
|
||||
}
|
||||
|
||||
pub use self::GenericPageSize as PageSize;
|
||||
|
||||
impl<S> PageSize<S> {
|
||||
/// `auto` value.
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue