Index: third_party/WebKit/Source/core/input/TouchEventManager.cpp |
diff --git a/third_party/WebKit/Source/core/input/TouchEventManager.cpp b/third_party/WebKit/Source/core/input/TouchEventManager.cpp |
index 9fca18a95a4d5d3ac7968d5686257643c42f8736..61ebef8989021452b932a75a8e6e700476b0ee2a 100644 |
--- a/third_party/WebKit/Source/core/input/TouchEventManager.cpp |
+++ b/third_party/WebKit/Source/core/input/TouchEventManager.cpp |
@@ -13,6 +13,7 @@ |
#include "core/html/HTMLCanvasElement.h" |
#include "core/input/EventHandler.h" |
#include "core/input/TouchActionUtil.h" |
+#include "core/layout/HitTestCanvasResult.h" |
#include "core/page/ChromeClient.h" |
#include "core/page/Page.h" |
#include "platform/Histogram.h" |
@@ -250,10 +251,10 @@ void TouchEventManager::updateTargetAndRegionMapsForTouchStarts( |
if (!node) |
continue; |
if (isHTMLCanvasElement(node)) { |
- std::pair<Element*, String> regionInfo = toHTMLCanvasElement(node)->getControlAndIdIfHitRegionExists(result.pointInInnerNodeFrame()); |
- if (regionInfo.first) |
- node = regionInfo.first; |
- touchInfo.region = regionInfo.second; |
+ HitTestCanvasResult* hitTestCanvasResult = toHTMLCanvasElement(node)->getControlAndIdIfHitRegionExists(result.pointInInnerNodeFrame()); |
+ if (hitTestCanvasResult->getControl()) |
+ node = hitTestCanvasResult->getControl(); |
+ touchInfo.region = hitTestCanvasResult->getId(); |
} |
// Touch events should not go to text nodes. |
if (node->isTextNode()) |