aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r--src/components/script/dom/node.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index 8857e503b64..5cca4c0cbcf 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -101,6 +101,8 @@ impl NodeFlags {
/// Specifies whether this node is in a document.
bitfield!(NodeFlags, is_in_doc, set_is_in_doc, 0x01)
+/// Specifies whether this node is hover state for this node
+bitfield!(NodeFlags, get_in_hover_state, set_is_in_hover_state, 0x02)
#[unsafe_destructor]
impl Drop for Node {
@@ -546,6 +548,14 @@ impl<'a> AbstractNode {
pub fn is_in_doc(&self) -> bool {
self.node().flags.is_in_doc()
}
+
+ pub fn get_hover_state(&self) -> bool {
+ self.node().flags.get_in_hover_state()
+ }
+
+ pub fn set_hover_state(&self, state: bool) {
+ self.mut_node().flags.set_is_in_hover_state(state);
+ }
}
impl AbstractNode {
@@ -1607,6 +1617,14 @@ impl Node {
doc.document().wait_until_safe_to_modify_dom();
self.next_sibling = new_next_sibling
}
+
+ pub fn get_hover_state(&self) -> bool {
+ self.flags.get_in_hover_state()
+ }
+
+ pub fn set_hover_state(&mut self, state: bool) {
+ self.flags.set_is_in_hover_state(state);
+ }
}
impl Reflectable for Node {