aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-07-22 18:29:38 +0200
committerMs2ger <ms2ger@gmail.com>2015-07-22 18:29:38 +0200
commit751a367eb94f3872fee5c34e3f69fb564fc17a86 (patch)
treef638aae48a819bc2946b3889d849f966f2376066
parent9cc1e017ee3991692a2d0f657c59c21f93d46dc6 (diff)
downloadservo-751a367eb94f3872fee5c34e3f69fb564fc17a86.tar.gz
servo-751a367eb94f3872fee5c34e3f69fb564fc17a86.zip
Don't call type_id_for_layout directly in LayoutElement::is_link.
-rw-r--r--components/layout/wrapper.rs4
1 files 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)) |