aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/invalidation/element/element_wrapper.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2022-06-07 23:09:52 +0000
committerMartin Robinson <mrobinson@igalia.com>2023-10-02 14:37:19 +0000
commit1ce75ff7dd4d31eaba0f333e25dcbda68aef89d6 (patch)
tree556f116101b6104122e99d713e204d7f8a3962c3 /components/style/invalidation/element/element_wrapper.rs
parent949fd0e172a1cfa9db4b3634192687baa3c253f1 (diff)
downloadservo-1ce75ff7dd4d31eaba0f333e25dcbda68aef89d6.tar.gz
servo-1ce75ff7dd4d31eaba0f333e25dcbda68aef89d6.zip
style: Unify Gecko and Servo EventState/ElementState bits
Add a dom/base/rust crate called just "dom" where we can share these. Most of the changes are automatic: s/mozilla::EventStates/mozilla::dom::ElementState/ s/EventStates/ElementState/ s/NS_EVENT_STATE_/ElementState::/ s/NS_DOCUMENT_STATE_/DocumentState::/ And so on. This requires a new cbindgen version to avoid ugly casts for large shifts. Differential Revision: https://phabricator.services.mozilla.com/D148537
Diffstat (limited to 'components/style/invalidation/element/element_wrapper.rs')
-rw-r--r--components/style/invalidation/element/element_wrapper.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/style/invalidation/element/element_wrapper.rs b/components/style/invalidation/element/element_wrapper.rs
index 84d0e5c351a..b244f45d1c4 100644
--- a/components/style/invalidation/element/element_wrapper.rs
+++ b/components/style/invalidation/element/element_wrapper.rs
@@ -6,11 +6,11 @@
//! against a past state of the element.
use crate::dom::TElement;
-use crate::element_state::ElementState;
use crate::selector_parser::{AttrValue, NonTSPseudoClass, PseudoElement, SelectorImpl};
use crate::selector_parser::{Snapshot, SnapshotMap};
use crate::values::AtomIdent;
use crate::{CaseSensitivityExt, LocalName, Namespace, WeakAtom};
+use dom::ElementState;
use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
use selectors::matching::{ElementSelectorFlags, MatchingContext};
use selectors::{Element, OpaqueElement};
@@ -252,7 +252,7 @@ where
fn is_link(&self) -> bool {
match self.snapshot().and_then(|s| s.state()) {
- Some(state) => state.intersects(ElementState::IN_VISITED_OR_UNVISITED_STATE),
+ Some(state) => state.intersects(ElementState::VISITED_OR_UNVISITED),
None => self.element.is_link(),
}
}