| Index: Source/core/page/SpatialNavigation.cpp
|
| diff --git a/Source/core/page/SpatialNavigation.cpp b/Source/core/page/SpatialNavigation.cpp
|
| index fb7ecd54bae268f2972034c6fdacd397208dbca2..64ff00a7d1f663ba78a898d848e6b386a9dda0b9 100644
|
| --- a/Source/core/page/SpatialNavigation.cpp
|
| +++ b/Source/core/page/SpatialNavigation.cpp
|
| @@ -67,8 +67,8 @@ FocusCandidate::FocusCandidate(Node* node, FocusDirection direction)
|
| ASSERT(node);
|
| ASSERT(node->isElementNode());
|
|
|
| - if (node->hasTagName(HTMLNames::areaTag)) {
|
| - HTMLAreaElement* area = static_cast<HTMLAreaElement*>(node);
|
| + if (isHTMLAreaElement(node)) {
|
| + HTMLAreaElement* area = toHTMLAreaElement(node);
|
| HTMLImageElement* image = area->imageElement();
|
| if (!image || !image->renderer())
|
| return;
|
| @@ -604,7 +604,7 @@ bool areElementsOnSameLine(const FocusCandidate& firstCandidate, const FocusCand
|
| if (!firstCandidate.rect.intersects(secondCandidate.rect))
|
| return false;
|
|
|
| - if (firstCandidate.focusableNode->hasTagName(HTMLNames::areaTag) || secondCandidate.focusableNode->hasTagName(HTMLNames::areaTag))
|
| + if (isHTMLAreaElement(firstCandidate.focusableNode) || isHTMLAreaElement(secondCandidate.focusableNode))
|
| return false;
|
|
|
| if (!firstCandidate.visibleNode->renderer()->isRenderInline() || !secondCandidate.visibleNode->renderer()->isRenderInline())
|
|
|