Index: Source/core/html/HTMLAnchorElement.cpp |
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp |
index 0d2ee69ba29b1b4890d48cb9e7ac5129bd9999ab..33e6a318c7b93d13044a36ad4a3bce30857debed 100644 |
--- a/Source/core/html/HTMLAnchorElement.cpp |
+++ b/Source/core/html/HTMLAnchorElement.cpp |
@@ -171,16 +171,16 @@ static void appendServerMapMousePosition(StringBuilder& url, Event* event) |
ASSERT(event->target()); |
Node* target = event->target()->toNode(); |
ASSERT(target); |
- if (!target->hasTagName(imgTag)) |
+ if (!isHTMLImageElement(*target)) |
return; |
- HTMLImageElement* imageElement = toHTMLImageElement(event->target()->toNode()); |
- if (!imageElement || !imageElement->isServerMap()) |
+ HTMLImageElement& imageElement = toHTMLImageElement(*target); |
+ if (!imageElement.isServerMap()) |
return; |
- if (!imageElement->renderer() || !imageElement->renderer()->isRenderImage()) |
+ if (!imageElement.renderer() || !imageElement.renderer()->isRenderImage()) |
return; |
- RenderImage* renderer = toRenderImage(imageElement->renderer()); |
+ RenderImage* renderer = toRenderImage(imageElement.renderer()); |
// FIXME: This should probably pass true for useTransforms. |
FloatPoint absolutePosition = renderer->absoluteToLocal(FloatPoint(toMouseEvent(event)->pageX(), toMouseEvent(event)->pageY())); |