Index: Source/core/dom/TreeScope.cpp |
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp |
index 9cd02cbcf3d4ec0c4b439280162f94870e3f7e10..68ee74a922318aa9cc34f7d6e485f8865fc58dac 100644 |
--- a/Source/core/dom/TreeScope.cpp |
+++ b/Source/core/dom/TreeScope.cpp |
@@ -205,8 +205,8 @@ HTMLMapElement* TreeScope::getImageMap(const String& url) const |
size_t hashPos = url.find('#'); |
String name = (hashPos == notFound ? url : url.substring(hashPos + 1)).impl(); |
if (rootNode()->document()->isHTMLDocument()) |
- return static_cast<HTMLMapElement*>(m_imageMapsByName->getElementByLowercasedMapName(AtomicString(name.lower()).impl(), this)); |
- return static_cast<HTMLMapElement*>(m_imageMapsByName->getElementByMapName(AtomicString(name).impl(), this)); |
+ return toHTMLMapElement(m_imageMapsByName->getElementByLowercasedMapName(AtomicString(name.lower()).impl(), this)); |
+ return toHTMLMapElement(m_imageMapsByName->getElementByMapName(AtomicString(name).impl(), this)); |
} |
Node* nodeFromPoint(Document* document, int x, int y, LayoutPoint* localPoint) |