diff options
author | bors-servo <release+servo@mozilla.com> | 2014-03-20 14:46:34 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-03-20 14:46:34 -0400 |
commit | 509ff7e52f6ea4f2f736d13f124c854d80c316c9 (patch) | |
tree | 1f956099ff9997778b5d1992dd9e15a8ba325d91 /src/components/script/dom/document.rs | |
parent | 0265fb9784baff3ea025198f3e5e73e6b81fe18e (diff) | |
parent | 038a195eade5476601a183f4b74e669f8619d6a4 (diff) | |
download | servo-509ff7e52f6ea4f2f736d13f124c854d80c316c9.tar.gz servo-509ff7e52f6ea4f2f736d13f124c854d80c316c9.zip |
auto merge of #1913 : Ms2ger/servo/attributes, r=jdm
Diffstat (limited to 'src/components/script/dom/document.rs')
-rw-r--r-- | src/components/script/dom/document.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index 0a25b29aa2b..622263458d8 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -15,7 +15,7 @@ use dom::comment::Comment; use dom::documentfragment::DocumentFragment; use dom::documenttype::DocumentType; use dom::domimplementation::DOMImplementation; -use dom::element::{Element}; +use dom::element::{Element, AttributeHandlers}; use dom::element::{HTMLHtmlElementTypeId, HTMLHeadElementTypeId, HTMLTitleElementTypeId}; use dom::element::{HTMLBodyElementTypeId, HTMLFrameSetElementTypeId}; use dom::event::Event; @@ -435,7 +435,7 @@ impl Document { } let element: JS<Element> = ElementCast::to(node).unwrap(); - element.get().get_attribute(Null, "name").map_or(false, |attr| { + element.get_attribute(Null, "name").map_or(false, |attr| { attr.get().value_ref() == name }) }) @@ -460,7 +460,7 @@ impl Document { // FIXME: https://github.com/mozilla/servo/issues/1847 HTMLCollection::create(&self.window, &NodeCast::from(abstract_self), |elem| { ("a" == elem.get().tag_name || "area" == elem.get().tag_name) && - elem.get().get_attribute(Null, "href").is_some() + elem.get_attribute(Null, "href").is_some() }) } @@ -477,7 +477,7 @@ impl Document { pub fn Anchors(&self, abstract_self: &JS<Document>) -> JS<HTMLCollection> { // FIXME: https://github.com/mozilla/servo/issues/1847 HTMLCollection::create(&self.window, &NodeCast::from(abstract_self), |elem| { - "a" == elem.get().tag_name && elem.get().get_attribute(Null, "name").is_some() + "a" == elem.get().tag_name && elem.get_attribute(Null, "name").is_some() }) } |