mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
making image element areas good at finding areas
linting errors replaced with map fixes comments moving to document added test cases linting and updating manifest changing test cases linting fixes manifest update linting fixes splitting the test cases into two
This commit is contained in:
parent
5421d833de
commit
31dafcc5f3
5 changed files with 74 additions and 9 deletions
|
@ -429,16 +429,12 @@ impl HTMLImageElement {
|
|||
return None
|
||||
}
|
||||
|
||||
let map = self.upcast::<Node>()
|
||||
.following_siblings()
|
||||
.filter_map(Root::downcast::<HTMLMapElement>)
|
||||
.find(|n| n.upcast::<Element>().get_string_attribute(&LocalName::from("name")) == last);
|
||||
let useMapElements = document_from_node(self).upcast::<Node>()
|
||||
.traverse_preorder()
|
||||
.filter_map(Root::downcast::<HTMLMapElement>)
|
||||
.find(|n| n.upcast::<Element>().get_string_attribute(&LocalName::from("name")) == last);
|
||||
|
||||
let elements: Vec<Root<HTMLAreaElement>> = map.unwrap().upcast::<Node>()
|
||||
.children()
|
||||
.filter_map(Root::downcast::<HTMLAreaElement>)
|
||||
.collect();
|
||||
Some(elements)
|
||||
useMapElements.map(|mapElem| mapElem.get_area_elements())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue