diff --git a/components/style/element_state.rs b/components/style/element_state.rs index d8b4d680377..dbc04ff0fdc 100644 --- a/components/style/element_state.rs +++ b/components/style/element_state.rs @@ -138,3 +138,16 @@ bitflags! { const IN_AUTOFILL_PREVIEW_STATE = 1 << 51, } } + +bitflags! { + /// Event-based document states. + /// + /// NB: Is important for this to remain in sync with Gecko's + /// dom/base/nsIDocument.h. + pub flags DocumentState: u64 { + /// RTL locale: specific to the XUL localedir attribute + const NS_DOCUMENT_STATE_RTL_LOCALE = 1 << 0, + /// Window activation status + const NS_DOCUMENT_STATE_WINDOW_INACTIVE = 1 << 1, + } +} diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 3c0d2d94506..6d7f36e22e3 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -219,6 +219,7 @@ use gecko_bindings::structs::nsStyleTransformMatrix::MatrixTransformOperator; unsafe impl Send for nsStyleTransformMatrix::MatrixTransformOperator {} unsafe impl Sync for nsStyleTransformMatrix::MatrixTransformOperator {} use gecko_bindings::structs::RawGeckoGfxMatrix4x4; +use gecko_bindings::structs::EventStates; pub type nsTArrayBorrowed_uintptr_t<'a> = &'a mut ::gecko_bindings::structs::nsTArray; pub type RawServoStyleSetOwned = ::gecko_bindings::sugar::ownership::Owned; pub type RawServoStyleSetOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull; @@ -586,6 +587,10 @@ extern "C" { pub fn Gecko_GetDocumentLWTheme(aDocument: *const nsIDocument) -> nsIDocument_DocumentTheme; } +extern "C" { + pub fn Gecko_GetDocumentState(aDocument: *const nsIDocument) + -> EventStates; +} extern "C" { pub fn Gecko_AtomAttrValue(element: RawGeckoElementBorrowed, attribute: *mut nsIAtom) -> *mut nsIAtom; diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs index 92da05b5b64..17ffd0e7046 100644 --- a/components/style/gecko/non_ts_pseudo_class_list.rs +++ b/components/style/gecko/non_ts_pseudo_class_list.rs @@ -26,8 +26,6 @@ * * Pending pseudo-classes: * - * :-moz-window-inactive. - * * :scope ->