mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
clarify todos about exposed objects
This commit is contained in:
parent
b1f78d8a3d
commit
fb2acb0b02
1 changed files with 9 additions and 3 deletions
|
@ -4799,7 +4799,9 @@ impl DocumentMethods for Document {
|
||||||
name == *self.name ||
|
name == *self.name ||
|
||||||
!name.is_empty() && elem.get_id().as_ref() == Some(&self.name)
|
!name.is_empty() && elem.get_id().as_ref() == Some(&self.name)
|
||||||
}),
|
}),
|
||||||
// TODO: Handle exposed objects.
|
// TODO handle <embed> and <object>; these depend on whether the element is
|
||||||
|
// “exposed”, a concept that doesn’t fully make sense until embed/object
|
||||||
|
// behaviour is actually implemented
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5357,12 +5359,16 @@ fn is_named_element_with_name_attribute(elem: &Element) -> bool {
|
||||||
HTMLElementTypeId::HTMLFormElement |
|
HTMLElementTypeId::HTMLFormElement |
|
||||||
HTMLElementTypeId::HTMLIFrameElement |
|
HTMLElementTypeId::HTMLIFrameElement |
|
||||||
HTMLElementTypeId::HTMLImageElement => true,
|
HTMLElementTypeId::HTMLImageElement => true,
|
||||||
// TODO: Handle exposed objects.
|
// TODO handle <embed> and <object>; these depend on whether the element is
|
||||||
|
// “exposed”, a concept that doesn’t fully make sense until embed/object
|
||||||
|
// behaviour is actually implemented
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_named_element_with_id_attribute(elem: &Element) -> bool {
|
fn is_named_element_with_id_attribute(elem: &Element) -> bool {
|
||||||
// TODO: Handle exposed objects.
|
// TODO handle <embed> and <object>; these depend on whether the element is
|
||||||
|
// “exposed”, a concept that doesn’t fully make sense until embed/object
|
||||||
|
// behaviour is actually implemented
|
||||||
elem.is::<HTMLImageElement>() && elem.get_name().map_or(false, |name| !name.is_empty())
|
elem.is::<HTMLImageElement>() && elem.get_name().map_or(false, |name| !name.is_empty())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue