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/page/FocusController.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/HTMLMapElement.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/core/html/HTMLMapElement.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698