Index: Source/core/html/HTMLAreaElement.cpp |
diff --git a/Source/core/html/HTMLAreaElement.cpp b/Source/core/html/HTMLAreaElement.cpp |
index b56e728cded66edbaf62f4abfebae0fac6c0b8f2..350ff0e5f99e33750090739fdf8a0b8c2810d45a 100644 |
--- a/Source/core/html/HTMLAreaElement.cpp |
+++ b/Source/core/html/HTMLAreaElement.cpp |
@@ -181,13 +181,13 @@ Path HTMLAreaElement::getRegion(const LayoutSize& size) const |
HTMLImageElement* HTMLAreaElement::imageElement() const |
{ |
Element* mapElement = parentElement(); |
- while (mapElement && !mapElement->hasTagName(mapTag)) |
+ while (mapElement && !isHTMLMapElement(*mapElement)) |
mapElement = mapElement->parentElement(); |
if (!mapElement) |
return 0; |
- return toHTMLMapElement(mapElement)->imageElement(); |
+ return toHTMLMapElement(*mapElement).imageElement(); |
} |
bool HTMLAreaElement::isKeyboardFocusable() const |