aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlelement.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2015-10-07 20:02:00 -0700
committerBobby Holley <bobbyholley@gmail.com>2015-10-16 17:56:31 -0700
commit75ec093334ff8f8f7ef41b90007588b924c40731 (patch)
treeba73c6dc51812c01f118e63c90ede1d8638f060d /components/script/dom/htmlelement.rs
parent628c2a04326b27ac2743771dca52612c8ce30ad2 (diff)
downloadservo-75ec093334ff8f8f7ef41b90007588b924c40731.tar.gz
servo-75ec093334ff8f8f7ef41b90007588b924c40731.zip
Move Event States to |Element|.
Conceptually they belong there, rather than on |Node|. Fixes #7934.
Diffstat (limited to 'components/script/dom/htmlelement.rs')
-rw-r--r--components/script/dom/htmlelement.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs
index 48154d25042..ae25eb3dc17 100644
--- a/components/script/dom/htmlelement.rs
+++ b/components/script/dom/htmlelement.rs
@@ -20,9 +20,9 @@ use dom::bindings::utils::Reflectable;
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration};
use dom::document::Document;
use dom::domstringmap::DOMStringMap;
-use dom::element::{AttributeMutation, Element};
+use dom::element::{AttributeMutation, Element, EventState};
use dom::htmlinputelement::HTMLInputElement;
-use dom::node::{Node, NodeFlags, SEQUENTIALLY_FOCUSABLE};
+use dom::node::{Node, SEQUENTIALLY_FOCUSABLE};
use dom::node::{document_from_node, window_from_node};
use dom::virtualmethods::VirtualMethods;
use msg::constellation_msg::FocusType;
@@ -49,15 +49,15 @@ impl PartialEq for HTMLElement {
impl HTMLElement {
pub fn new_inherited(tag_name: DOMString, prefix: Option<DOMString>,
document: &Document) -> HTMLElement {
- HTMLElement::new_inherited_with_flags(NodeFlags::new(), tag_name, prefix, document)
+ HTMLElement::new_inherited_with_state(EventState::empty(), tag_name, prefix, document)
}
- pub fn new_inherited_with_flags(flags: NodeFlags, tag_name: DOMString,
+ pub fn new_inherited_with_state(state: EventState, tag_name: DOMString,
prefix: Option<DOMString>, document: &Document)
-> HTMLElement {
HTMLElement {
element:
- Element::new_inherited_with_flags(flags, tag_name, ns!(HTML), prefix, document),
+ Element::new_inherited_with_state(state, tag_name, ns!(HTML), prefix, document),
style_decl: Default::default(),
dataset: Default::default(),
}
@@ -194,8 +194,8 @@ impl HTMLElementMethods for HTMLElement {
// https://html.spec.whatwg.org/multipage/#dom-blur
fn Blur(&self) {
// TODO: Run the unfocusing steps.
- let node = NodeCast::from_ref(self);
- if !node.get_focus_state() {
+ let el = ElementCast::from_ref(self);
+ if !el.get_focus_state() {
return;
}
// https://html.spec.whatwg.org/multipage/#unfocusing-steps