2016-02-03 01:34:11 +00:00
|
|
|
/* 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/. */
|
|
|
|
|
2016-06-27 22:14:55 +00:00
|
|
|
//! States elements can be in.
|
|
|
|
|
2016-02-03 01:34:11 +00:00
|
|
|
bitflags! {
|
|
|
|
#[doc = "Event-based element states."]
|
2016-06-22 14:43:20 +00:00
|
|
|
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
2016-06-07 04:44:16 +00:00
|
|
|
pub flags ElementState: u16 {
|
2016-02-03 01:34:11 +00:00
|
|
|
#[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,
|
2016-04-29 15:12:18 +00:00
|
|
|
#[doc = "https://html.spec.whatwg.org/multipage/#selector-read-write"]
|
|
|
|
const IN_READ_WRITE_STATE = 0x80,
|
2016-06-07 04:44:16 +00:00
|
|
|
#[doc = "https://html.spec.whatwg.org/multipage/#selector-placeholder-shown"]
|
|
|
|
const IN_PLACEHOLDER_SHOWN_STATE = 0x0100,
|
2016-02-03 01:34:11 +00:00
|
|
|
}
|
|
|
|
}
|