Index: Source/core/page/FocusController.cpp |
diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp |
index acafdb1464b72aaf6840b6868de8dab332a6b34f..cb81bb453983ea5bc964e1d6816e05027d15865b 100644 |
--- a/Source/core/page/FocusController.cpp |
+++ b/Source/core/page/FocusController.cpp |
@@ -850,8 +850,8 @@ bool FocusController::advanceFocusDirectionally(FocusDirection direction, Keyboa |
if (!hasOffscreenRect(focusedNode)) { |
container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direction, focusedNode); |
startingRect = nodeRectInAbsoluteCoordinates(focusedNode, true /* ignore border */); |
- } else if (focusedNode->hasTagName(areaTag)) { |
- HTMLAreaElement* area = static_cast<HTMLAreaElement*>(focusedNode); |
+ } else if (isHTMLAreaElement(focusedNode)) { |
+ HTMLAreaElement* area = toHTMLAreaElement(focusedNode); |
container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direction, area->imageElement()); |
startingRect = virtualRectForAreaElementAndDirection(area, direction); |
} |