Index: third_party/WebKit/Source/core/input/PointerEventManager.cpp |
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp |
index d6d09a42fbc9600e38c306ffd99c946dc606bf9e..446af06ceb533ac6c6355da509b139e620ea5a19 100644 |
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp |
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp |
@@ -12,6 +12,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/PlatformTouchEvent.h" |
@@ -424,10 +425,10 @@ void PointerEventManager::dispatchTouchPointerEvents( |
if (node) { |
touchInfo.targetFrame = node->document().frame(); |
if (isHTMLCanvasElement(node)) { |
- std::pair<Element*, String> regionInfo = toHTMLCanvasElement(node)->getControlAndIdIfHitRegionExists(hitTestTesult.pointInInnerNodeFrame()); |
- if (regionInfo.first) |
- node = regionInfo.first; |
- touchInfo.region = regionInfo.second; |
+ HitTestCanvasResult* hitTestCanvasResult = toHTMLCanvasElement(node)->getControlAndIdIfHitRegionExists(hitTestTesult.pointInInnerNodeFrame()); |
+ if (hitTestCanvasResult->getControl()) |
+ node = hitTestCanvasResult->getControl(); |
+ touchInfo.region = hitTestCanvasResult->getId(); |
} |
// TODO(crbug.com/612456): We need to investigate whether pointer |
// events should go to text nodes or not. If so we need to |