mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Add support for parsing the content-visibility
property from the CSS Contain specification
Add initial parsing support for the CSS `content-visibility` attribute. Currently these parsed values have no effect. Differential Revision: https://phabricator.services.mozilla.com/D140834
This commit is contained in:
parent
8016c434b0
commit
eb96b29af0
7 changed files with 44 additions and 6 deletions
|
@ -1450,6 +1450,34 @@ impl Parse for Contain {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(missing_docs)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[repr(u8)]
|
||||
pub enum ContentVisibility {
|
||||
/// `auto` variant, the element turns on layout containment, style containment, and paint
|
||||
/// containment. In addition, if the element is not relevant to the user (such as by being
|
||||
/// offscreen) it also skips its content
|
||||
Auto,
|
||||
/// `hidden` variant, the element skips its content
|
||||
Hidden,
|
||||
/// 'visible' variant, no effect
|
||||
Visible,
|
||||
}
|
||||
|
||||
/// A specified value for the `perspective` property.
|
||||
pub type Perspective = GenericPerspective<NonNegativeLength>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue