From d441d6f39bb846989d95bcf5caf387b42414718d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 13 Sep 2013 12:51:20 +0200 Subject: Import Qt5x2 branch of QtWebkit for Qt 5.2 Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/html/HTMLMapElement.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Source/WebCore/html/HTMLMapElement.cpp') diff --git a/Source/WebCore/html/HTMLMapElement.cpp b/Source/WebCore/html/HTMLMapElement.cpp index d01eae67e..66fd73e80 100644 --- a/Source/WebCore/html/HTMLMapElement.cpp +++ b/Source/WebCore/html/HTMLMapElement.cpp @@ -30,6 +30,7 @@ #include "HTMLNames.h" #include "HitTestResult.h" #include "IntSize.h" +#include "NodeTraversal.h" #include "RenderObject.h" using namespace std; @@ -61,10 +62,10 @@ HTMLMapElement::~HTMLMapElement() bool HTMLMapElement::mapMouseEvent(LayoutPoint location, const LayoutSize& size, HitTestResult& result) { HTMLAreaElement* defaultArea = 0; - Node *node = this; - while ((node = node->traverseNextNode(this))) { - if (node->hasTagName(areaTag)) { - HTMLAreaElement* areaElt = static_cast(node); + Element* element = this; + while ((element = ElementTraversal::next(element, this))) { + if (isHTMLAreaElement(element)) { + HTMLAreaElement* areaElt = toHTMLAreaElement(element); if (areaElt->isDefault()) { if (!defaultArea) defaultArea = areaElt; @@ -84,12 +85,12 @@ HTMLImageElement* HTMLMapElement::imageElement() { RefPtr images = document()->images(); for (unsigned i = 0; Node* curr = images->item(i); i++) { - if (!curr->hasTagName(imgTag)) + if (!isHTMLImageElement(curr)) continue; // The HTMLImageElement's useMap() value includes the '#' symbol at the beginning, // which has to be stripped off. - HTMLImageElement* imageElement = static_cast(curr); + HTMLImageElement* imageElement = toHTMLImageElement(curr); String useMapName = imageElement->getAttribute(usemapAttr).string().substring(1); if (equalIgnoringCase(useMapName, m_name)) return imageElement; -- cgit v1.2.1