Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Unified Diff: Source/core/html/HTMLMapElement.cpp

Issue 18251004: Introduce isHTMLAreaElement and toHTMLAreaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLAreaElement.h ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMapElement.cpp
diff --git a/Source/core/html/HTMLMapElement.cpp b/Source/core/html/HTMLMapElement.cpp
index c7e800c3eae7fcaeda8298ffb0dde33f5b27787c..7c6ea39fd315d41757af242cf060e104121126e4 100644
--- a/Source/core/html/HTMLMapElement.cpp
+++ b/Source/core/html/HTMLMapElement.cpp
@@ -62,8 +62,8 @@ bool HTMLMapElement::mapMouseEvent(LayoutPoint location, const LayoutSize& size,
HTMLAreaElement* defaultArea = 0;
Element* element = this;
while ((element = ElementTraversal::next(element, this))) {
- if (element->hasTagName(areaTag)) {
- HTMLAreaElement* areaElt = static_cast<HTMLAreaElement*>(element);
+ if (isHTMLAreaElement(element)) {
+ HTMLAreaElement* areaElt = toHTMLAreaElement(element);
if (areaElt->isDefault()) {
if (!defaultArea)
defaultArea = areaElt;
@@ -71,7 +71,7 @@ bool HTMLMapElement::mapMouseEvent(LayoutPoint location, const LayoutSize& size,
return true;
}
}
-
+
if (defaultArea) {
result.setInnerNode(defaultArea);
result.setURLElement(defaultArea);
« no previous file with comments | « Source/core/html/HTMLAreaElement.h ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698