From 751a367eb94f3872fee5c34e3f69fb564fc17a86 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 22 Jul 2015 18:29:38 +0200 Subject: [PATCH] Don't call type_id_for_layout directly in LayoutElement::is_link. --- components/layout/wrapper.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index fe374aa4b25..762f7dba2a0 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -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)) |