This is implement Hover Event. If over element, currently full reflow. after PR, will make partial reflow.

This commit is contained in:
HyunJune Kim 2014-02-05 18:01:13 +09:00
parent d2f8b593a9
commit c8d503898a
14 changed files with 171 additions and 20 deletions

View file

@ -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 {