mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Implement concept of shadow including tree order
This commit is contained in:
parent
f6ba165882
commit
2e5c058463
15 changed files with 69 additions and 43 deletions
|
@ -162,7 +162,7 @@ impl VirtualMethods for HTMLLabelElement {
|
|||
impl HTMLLabelElement {
|
||||
pub fn first_labelable_descendant(&self) -> Option<DomRoot<HTMLElement>> {
|
||||
self.upcast::<Node>()
|
||||
.traverse_preorder()
|
||||
.traverse_preorder(/* shadow including */ false)
|
||||
.filter_map(DomRoot::downcast::<HTMLElement>)
|
||||
.filter(|elem| elem.is_labelable_element())
|
||||
.next()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue