Struct style::element_state::ElementState []

pub struct ElementState { /* fields omitted */ }

Event-based element states.

NB: Is important for this to remain in sync with Gecko's dom/events/EventStates.h.

Please keep in that order in order for this to be easily auditable.

TODO(emilio): We really really want to use the NS_EVENT_STATE bindings for this.

Methods

impl ElementState

IN_ACTIVE_STATE: ElementState = ElementState{bits: 1 << 0,}

The mouse is down on this element. https://html.spec.whatwg.org/multipage/#selector-active FIXME(#7333): set/unset this when appropriate

IN_FOCUS_STATE: ElementState = ElementState{bits: 1 << 1,}

This element has focus. https://html.spec.whatwg.org/multipage/#selector-focus

IN_HOVER_STATE: ElementState = ElementState{bits: 1 << 2,}

The mouse is hovering over this element. https://html.spec.whatwg.org/multipage/#selector-hover

IN_ENABLED_STATE: ElementState = ElementState{bits: 1 << 3,}

Content is enabled (and can be disabled). http://www.whatwg.org/html/#selector-enabled

IN_DISABLED_STATE: ElementState = ElementState{bits: 1 << 4,}

Content is disabled. http://www.whatwg.org/html/#selector-disabled

IN_CHECKED_STATE: ElementState = ElementState{bits: 1 << 5,}

Content is checked. https://html.spec.whatwg.org/multipage/#selector-checked

IN_INDETERMINATE_STATE: ElementState = ElementState{bits: 1 << 6,}

https://html.spec.whatwg.org/multipage/#selector-indeterminate

IN_PLACEHOLDER_SHOWN_STATE: ElementState = ElementState{bits: 1 << 7,}

https://html.spec.whatwg.org/multipage/#selector-placeholder-shown

IN_TARGET_STATE: ElementState = ElementState{bits: 1 << 8,}

https://html.spec.whatwg.org/multipage/#selector-target

IN_FULLSCREEN_STATE: ElementState = ElementState{bits: 1 << 9,}

https://fullscreen.spec.whatwg.org/#%3Afullscreen-pseudo-class

IN_VALID_STATE: ElementState = ElementState{bits: 1 << 10,}

https://html.spec.whatwg.org/multipage/#selector-valid

IN_INVALID_STATE: ElementState = ElementState{bits: 1 << 11,}

https://html.spec.whatwg.org/multipage/#selector-invalid

IN_MOZ_UI_VALID_STATE: ElementState = ElementState{bits: 1 << 12,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-valid

IN_MOZ_UI_INVALID_STATE: ElementState = ElementState{bits: 1 << 13,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-invalid

IN_BROKEN_STATE: ElementState = ElementState{bits: 1 << 14,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-broken

IN_USER_DISABLED_STATE: ElementState = ElementState{bits: 1 << 15,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-user-disabled

IN_SUPPRESSED_STATE: ElementState = ElementState{bits: 1 << 16,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-suppressed

IN_LOADING_STATE: ElementState = ElementState{bits: 1 << 17,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-loading

IN_HANDLER_BLOCKED_STATE: ElementState = ElementState{bits: 1 << 18,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-blocked

IN_HANDLER_DISABLED_STATE: ElementState = ElementState{bits: 1 << 19,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-disabled

IN_HANDLER_CRASHED_STATE: ElementState = ElementState{bits: 1 << 20,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-crashed

IN_REQUIRED_STATE: ElementState = ElementState{bits: 1 << 21,}

https://html.spec.whatwg.org/multipage/#selector-required

IN_OPTIONAL_STATE: ElementState = ElementState{bits: 1 << 22,}

https://html.spec.whatwg.org/multipage/#selector-optional

IN_READ_WRITE_STATE: ElementState = ElementState{bits: 1 << 22,}

https://html.spec.whatwg.org/multipage/#selector-read-write

IN_UNRESOLVED_STATE: ElementState = ElementState{bits: 1 << 23,}

Non-standard: Older custom-elements spec.

IN_VISITED_STATE: ElementState = ElementState{bits: 1 << 24,}

https://html.spec.whatwg.org/multipage/#selector-visited

IN_UNVISITED_STATE: ElementState = ElementState{bits: 1 << 25,}

https://html.spec.whatwg.org/multipage/#selector-link

IN_VISITED_OR_UNVISITED_STATE: ElementState = ElementState{bits:
                 <ElementState>::IN_VISITED_STATE.bits |
                     <ElementState>::IN_UNVISITED_STATE.bits,}

https://drafts.csswg.org/selectors-4/#the-any-link-pseudo

IN_DRAGOVER_STATE: ElementState = ElementState{bits: 1 << 26,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-drag-over

IN_INRANGE_STATE: ElementState = ElementState{bits: 1 << 27,}

https://html.spec.whatwg.org/multipage/#selector-in-range

IN_OUTOFRANGE_STATE: ElementState = ElementState{bits: 1 << 28,}

https://html.spec.whatwg.org/multipage/#selector-out-of-range

IN_MOZ_READONLY_STATE: ElementState = ElementState{bits: 1 << 29,}

https://html.spec.whatwg.org/multipage/#selector-read-only

IN_MOZ_READWRITE_STATE: ElementState = ElementState{bits: 1 << 30,}

https://html.spec.whatwg.org/multipage/#selector-read-write

IN_DEFAULT_STATE: ElementState = ElementState{bits: 1 << 31,}

https://html.spec.whatwg.org/multipage/#selector-default

IN_MOZ_SUBMITINVALID_STATE: ElementState = ElementState{bits: 1 << 32,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-submit-invalid

IN_OPTIMUM_STATE: ElementState = ElementState{bits: 1 << 33,}

Non-standard & undocumented.

IN_SUB_OPTIMUM_STATE: ElementState = ElementState{bits: 1 << 34,}

Non-standard & undocumented.

IN_SUB_SUB_OPTIMUM_STATE: ElementState = ElementState{bits: 1 << 35,}

Non-standard & undocumented.

IN_DEVTOOLS_HIGHLIGHTED_STATE: ElementState = ElementState{bits: 1 << 36,}

Non-standard & undocumented.

IN_STYLEEDITOR_TRANSITIONING_STATE: ElementState = ElementState{bits: 1 << 37,}

Non-standard & undocumented.

IN_INCREMENT_SCRIPT_LEVEL_STATE: ElementState = ElementState{bits: 1 << 38,}

Non-standard & undocumented.

IN_FOCUSRING_STATE: ElementState = ElementState{bits: 1 << 39,}

Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-focusring

IN_HANDLER_CLICK_TO_PLAY_STATE: ElementState = ElementState{bits: 1 << 40,}

Non-standard & undocumented.

IN_HANDLER_VULNERABLE_UPDATABLE_STATE: ElementState = ElementState{bits: 1 << 41,}

Non-standard & undocumented.

IN_HANDLER_VULNERABLE_NO_UPDATE_STATE: ElementState = ElementState{bits: 1 << 42,}

Non-standard & undocumented.

IN_FOCUS_WITHIN_STATE: ElementState = ElementState{bits: 1 << 43,}

https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo

IN_LTR_STATE: ElementState = ElementState{bits: 1 << 44,}

:dir matching; the states are used for dynamic change detection. State that elements that match :dir(ltr) are in.

IN_RTL_STATE: ElementState = ElementState{bits: 1 << 45,}

State that elements that match :dir(rtl) are in.

IN_HAS_DIR_ATTR_STATE: ElementState = ElementState{bits: 1 << 46,}

State that HTML elements that have a "dir" attr are in.

IN_HAS_DIR_ATTR_LTR_STATE: ElementState = ElementState{bits: 1 << 47,}

State that HTML elements with dir="ltr" (or something case-insensitively equal to "ltr") are in.

IN_HAS_DIR_ATTR_RTL_STATE: ElementState = ElementState{bits: 1 << 48,}

State that HTML elements with dir="rtl" (or something case-insensitively equal to "rtl") are in.

IN_HAS_DIR_ATTR_LIKE_AUTO_STATE: ElementState = ElementState{bits: 1 << 49,}

State that HTML elements without a valid-valued "dir" attr or any HTML elements (including ) with dir="auto" (or something case-insensitively equal to "auto") are in.

IN_AUTOFILL_STATE: ElementState = ElementState{bits: 1 << 50,}

Non-standard & undocumented.

IN_AUTOFILL_PREVIEW_STATE: ElementState = ElementState{bits: 1 << 51,}

Non-standard & undocumented.

Returns an empty set of flags.

Returns the set containing all flags.

Returns the raw value of the flags currently stored.

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

Returns true if no flags are currently stored.

Returns true if all flags are currently set.

Returns true if there are flags common to both self and other.

Returns true all of the flags in other are contained within self.

Inserts the specified flags in-place.

Removes the specified flags in-place.

Toggles the specified flags in-place.

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Copy for ElementState

impl PartialEq for ElementState

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for ElementState

impl Clone for ElementState

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd for ElementState

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for ElementState

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for ElementState

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl MallocSizeOf for ElementState
[src]

[src]

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

impl Debug for ElementState

Formats the value using the given formatter. Read more

impl Binary for ElementState

Formats the value using the given formatter.

impl Octal for ElementState

Formats the value using the given formatter.

impl LowerHex for ElementState

Formats the value using the given formatter.

impl UpperHex for ElementState

Formats the value using the given formatter.

impl BitOr for ElementState

The resulting type after applying the | operator.

Returns the union of the two sets of flags.

impl BitOrAssign for ElementState

Adds the set of flags.

impl BitXor for ElementState

The resulting type after applying the ^ operator.

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign for ElementState

Toggles the set of flags.

impl BitAnd for ElementState

The resulting type after applying the & operator.

Returns the intersection between the two sets of flags.

impl BitAndAssign for ElementState

Disables all flags disabled in the set.

impl Sub for ElementState

The resulting type after applying the - operator.

Returns the set difference of the two sets of flags.

impl SubAssign for ElementState

Disables all flags enabled in the set.

impl Not for ElementState

The resulting type after applying the ! operator.

Returns the complement of this set of flags.

impl Extend<ElementState> for ElementState

Extends a collection with the contents of an iterator. Read more

impl FromIterator<ElementState> for ElementState

Creates a value from an iterator. Read more