<commit_before>/* 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/. */

//! States elements can be in.

bitflags! {
    /// 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.
    #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
    pub flags ElementState: u64 {
        /// 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 = 1 << 0,
        /// This element has focus.
        /// https://html.spec.whatwg.org/multipage/#selector-focus
        const IN_FOCUS_STATE = 1 << 1,
        /// The mouse is hovering over this element.
        /// https://html.spec.whatwg.org/multipage/#selector-hover
        const IN_HOVER_STATE = 1 << 2,
        /// Content is enabled (and can be disabled).
        /// http://www.whatwg.org/html/#selector-enabled
        const IN_ENABLED_STATE = 1 << 3,
        /// Content is disabled.
        /// http://www.whatwg.org/html/#selector-disabled
        const IN_DISABLED_STATE = 1 << 4,
        /// Content is checked.
        /// https://html.spec.whatwg.org/multipage/#selector-checked
        const IN_CHECKED_STATE = 1 << 5,
        /// https://html.spec.whatwg.org/multipage/#selector-indeterminate
        const IN_INDETERMINATE_STATE = 1 << 6,
        /// https://html.spec.whatwg.org/multipage/#selector-placeholder-shown
        const IN_PLACEHOLDER_SHOWN_STATE = 1 << 7,
        /// https://html.spec.whatwg.org/multipage/#selector-target
        const IN_TARGET_STATE = 1 << 8,
        /// https://fullscreen.spec.whatwg.org/#%3Afullscreen-pseudo-class
        const IN_FULLSCREEN_STATE = 1 << 9,
        /// https://html.spec.whatwg.org/multipage/#selector-valid
        const IN_VALID_STATE = 1 << 10,
        /// https://html.spec.whatwg.org/multipage/#selector-invalid
        const IN_INVALID_STATE = 1 << 11,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-valid
        const IN_MOZ_UI_VALID_STATE = 1 << 12,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-invalid
        const IN_MOZ_UI_INVALID_STATE = 1 << 13,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-broken
        const IN_BROKEN_STATE = 1 << 14,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-user-disabled
        const IN_USER_DISABLED_STATE = 1 << 15,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-suppressed
        const IN_SUPPRESSED_STATE = 1 << 16,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-loading
        const IN_LOADING_STATE = 1 << 18,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-blocked
        const IN_HANDLER_BLOCKED_STATE = 1 << 18,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-disabled
        const IN_HANDLER_DISABLED_STATE = 1 << 19,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-crashed
        const IN_HANDLER_CRASHED_STATE = 1 << 20,
        /// https://html.spec.whatwg.org/multipage/#selector-required
        const IN_REQUIRED_STATE = 1 << 21,
        /// https://html.spec.whatwg.org/multipage/#selector-optional
        const IN_OPTIONAL_STATE = 1 << 22,
        /// https://html.spec.whatwg.org/multipage/#selector-read-write
        const IN_READ_WRITE_STATE = 1 << 22,
        /// Non-standard: Older custom-elements spec.
        const IN_UNRESOLVED_STATE = 1 << 23,
        /// https://html.spec.whatwg.org/multipage/#selector-visited
        const IN_VISITED_STATE = 1 << 24,
        /// https://html.spec.whatwg.org/multipage/#selector-link
        const IN_UNVISITED_STATE = 1 << 25,<commit_msg>Auto merge of #16806 - heycam:state, r=bholley<commit_after>/* 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/. */

//! States elements can be in.

bitflags! {
    /// 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.
    #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
    pub flags ElementState: u64 {
        /// 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 = 1 << 0,
        /// This element has focus.
        /// https://html.spec.whatwg.org/multipage/#selector-focus
        const IN_FOCUS_STATE = 1 << 1,
        /// The mouse is hovering over this element.
        /// https://html.spec.whatwg.org/multipage/#selector-hover
        const IN_HOVER_STATE = 1 << 2,
        /// Content is enabled (and can be disabled).
        /// http://www.whatwg.org/html/#selector-enabled
        const IN_ENABLED_STATE = 1 << 3,
        /// Content is disabled.
        /// http://www.whatwg.org/html/#selector-disabled
        const IN_DISABLED_STATE = 1 << 4,
        /// Content is checked.
        /// https://html.spec.whatwg.org/multipage/#selector-checked
        const IN_CHECKED_STATE = 1 << 5,
        /// https://html.spec.whatwg.org/multipage/#selector-indeterminate
        const IN_INDETERMINATE_STATE = 1 << 6,
        /// https://html.spec.whatwg.org/multipage/#selector-placeholder-shown
        const IN_PLACEHOLDER_SHOWN_STATE = 1 << 7,
        /// https://html.spec.whatwg.org/multipage/#selector-target
        const IN_TARGET_STATE = 1 << 8,
        /// https://fullscreen.spec.whatwg.org/#%3Afullscreen-pseudo-class
        const IN_FULLSCREEN_STATE = 1 << 9,
        /// https://html.spec.whatwg.org/multipage/#selector-valid
        const IN_VALID_STATE = 1 << 10,
        /// https://html.spec.whatwg.org/multipage/#selector-invalid
        const IN_INVALID_STATE = 1 << 11,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-valid
        const IN_MOZ_UI_VALID_STATE = 1 << 12,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-ui-invalid
        const IN_MOZ_UI_INVALID_STATE = 1 << 13,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-broken
        const IN_BROKEN_STATE = 1 << 14,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-user-disabled
        const IN_USER_DISABLED_STATE = 1 << 15,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-suppressed
        const IN_SUPPRESSED_STATE = 1 << 16,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-loading
        const IN_LOADING_STATE = 1 << 17,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-blocked
        const IN_HANDLER_BLOCKED_STATE = 1 << 18,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-disabled
        const IN_HANDLER_DISABLED_STATE = 1 << 19,
        /// Non-standard: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-handler-crashed
        const IN_HANDLER_CRASHED_STATE = 1 << 20,
        /// https://html.spec.whatwg.org/multipage/#selector-required
        const IN_REQUIRED_STATE = 1 << 21,
        /// https://html.spec.whatwg.org/multipage/#selector-optional
        const IN_OPTIONAL_STATE = 1 << 22,
        /// https://html.spec.whatwg.org/multipage/#selector-read-write
        const IN_READ_WRITE_STATE = 1 << 22,
        /// Non-standard: Older custom-elements spec.
        const IN_UNRESOLVED_STATE = 1 << 23,
        /// https://html.spec.whatwg.org/multipage/#selector-visited
        const IN_VISITED_STATE = 1 << 24,
        /// https://html.spec.whatwg.org/multipage/#selector-link
        const IN_UNVISITED_STATE = 1 << 25,
{'fraction_non_alphanumeric': 0.14793591392819552, 'fraction_numerical': 0.019763770319260906, 'mean_word_length': 2.2005988023952097, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 3, 'https://': 48, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2742533', 'n_tokens_mistral': 2920, 'n_tokens_neox': 2720, 'n_words': 546}