mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Don't call type_id_for_layout directly in LayoutElement::is_link.
This commit is contained in:
parent
9cc1e017ee
commit
751a367eb9
1 changed files with 2 additions and 2 deletions
|
@ -412,8 +412,8 @@ impl<'le> ::selectors::Element for LayoutElement<'le> {
|
|||
|
||||
fn is_link(&self) -> bool {
|
||||
// FIXME: This is HTML only.
|
||||
let node = NodeCast::from_layout_js(&self.element);
|
||||
match unsafe { (*node.unsafe_get()).type_id_for_layout() } {
|
||||
let node = self.as_node();
|
||||
match node.type_id() {
|
||||
// https://html.spec.whatwg.org/multipage/#selector-link
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAnchorElement)) |
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAreaElement)) |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue