mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Update rust-selectors
This commits updates rust-selectors to use the generic parser, and as such it moves the element state into the style crate.
This commit is contained in:
parent
9baa59a6b4
commit
a1c830f1c1
40 changed files with 342 additions and 252 deletions
31
components/style/element_state.rs
Normal file
31
components/style/element_state.rs
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
bitflags! {
|
||||
#[doc = "Event-based element states."]
|
||||
#[derive(HeapSizeOf)]
|
||||
flags ElementState: u8 {
|
||||
#[doc = "The mouse is down on this element. \
|
||||
https://html.spec.whatwg.org/multipage/#selector-active \
|
||||
FIXME(#7333): set/unset this when appropriate"]
|
||||
const IN_ACTIVE_STATE = 0x01,
|
||||
#[doc = "This element has focus. \
|
||||
https://html.spec.whatwg.org/multipage/#selector-focus"]
|
||||
const IN_FOCUS_STATE = 0x02,
|
||||
#[doc = "The mouse is hovering over this element. \
|
||||
https://html.spec.whatwg.org/multipage/#selector-hover"]
|
||||
const IN_HOVER_STATE = 0x04,
|
||||
#[doc = "Content is enabled (and can be disabled). \
|
||||
http://www.whatwg.org/html/#selector-enabled"]
|
||||
const IN_ENABLED_STATE = 0x08,
|
||||
#[doc = "Content is disabled. \
|
||||
http://www.whatwg.org/html/#selector-disabled"]
|
||||
const IN_DISABLED_STATE = 0x10,
|
||||
#[doc = "Content is checked. \
|
||||
https://html.spec.whatwg.org/multipage/#selector-checked"]
|
||||
const IN_CHECKED_STATE = 0x20,
|
||||
#[doc = "https://html.spec.whatwg.org/multipage/#selector-indeterminate"]
|
||||
const IN_INDETERMINATE_STATE = 0x40,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue