diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-07-03 13:30:31 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-07-03 13:30:31 +0200 |
commit | 59ea4dbd212c0dc7fd36f5cee3a9d278138503ae (patch) | |
tree | 25492f6cafdfab01ee51d50fac0459387ea1a40c | |
parent | 2e89228cd5d19ca55c8eaaf60e082f072bc5eb0c (diff) | |
download | servo-59ea4dbd212c0dc7fd36f5cee3a9d278138503ae.tar.gz servo-59ea4dbd212c0dc7fd36f5cee3a9d278138503ae.zip |
Remove an avoidable null-check from HTMLAnchorElement::activation_behavior.
-rw-r--r-- | components/script/dom/htmlanchorelement.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs index c96b13099cf..8fc76ced75f 100644 --- a/components/script/dom/htmlanchorelement.rs +++ b/components/script/dom/htmlanchorelement.rs @@ -129,7 +129,7 @@ impl<'a> Activatable for &'a HTMLAnchorElement { if let Some(element) = ElementCast::to_ref(target) { if target.is_htmlimageelement() && element.has_attribute(&atom!("ismap")) { - let target_node = NodeCast::to_ref(target).unwrap(); + let target_node = NodeCast::from_ref(element); let rect = window_from_node(target_node).r().content_box_query( target_node.to_trusted_node_address()); ismap_suffix = Some( |