Skip to content

Commit

Permalink
servo: Merge #4030 - Stop including the element during Element.getEle…
Browse files Browse the repository at this point in the history
…mentsByClassName (from achals:master); r=Ms2ger

servo/servo#3995

This is my first PR, so please let me know if I'm doing something wrong!

Source-Repo: https://github.com/servo/servo
Source-Revision: 8cecb03d756d8df4de69ca13b663d547f438d320

UltraBlame original commit: 6cee2c8e7db780d1d4114d0aa3d2d055a36863d6
  • Loading branch information
marco-c committed Sep 30, 2019
1 parent 2455e4a commit 5348079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servo/components/script/dom/htmlcollection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ impl HTMLCollection {
classes: Vec<Atom>
}
impl CollectionFilter for ClassNameFilter {
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
self.classes.iter().all(|class| elem.has_class(class))
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
(NodeCast::from_ref(elem) != root) && self.classes.iter().all(|class| elem.has_class(class))
}
}
let filter = ClassNameFilter {
Expand Down

0 comments on commit 5348079

Please sign in to comment.