aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-12-09 06:33:59 -0700
committerbors-servo <metajack+bors@gmail.com>2014-12-09 06:33:59 -0700
commitef81fb13e73d8d8bbda80fbe52ee9d5a539bc519 (patch)
treecbea9f4890773b10c8ba5c6c6d142f3051e2e22b /components/script/dom
parent25e5d312892421008133cb6c099644cf46a7b2bc (diff)
parent8ed6ace682dff1fe866b411553de0b5494094d57 (diff)
downloadservo-ef81fb13e73d8d8bbda80fbe52ee9d5a539bc519.tar.gz
servo-ef81fb13e73d8d8bbda80fbe52ee9d5a539bc519.zip
auto merge of #4304 : ema-fox/servo/bytag, r=Ms2ger
Fixes #4249
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/htmlcollection.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs
index c07af986135..3ac4d491513 100644
--- a/components/script/dom/htmlcollection.rs
+++ b/components/script/dom/htmlcollection.rs
@@ -85,7 +85,10 @@ impl HTMLCollection {
ascii_lower_tag: Atom,
}
impl CollectionFilter for TagNameFilter {
- fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
+ fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
+ if NodeCast::from_ref(elem) == root {
+ return false
+ }
if elem.html_element_in_html_document() {
*elem.local_name() == self.ascii_lower_tag
} else {