Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 1654653002: Canvas2d: Implement rerouting event by hit region's control. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index 06208a187583d64b581dc4ff03b8426a4852681d..0669f9d701b29129410c8a7a2265b136e71fb3e8 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -1088,4 +1088,11 @@ bool HTMLCanvasElement::isSupportedInteractiveCanvasFallback(const Element& elem
return false;
}
+std::pair<Element*, String> HTMLCanvasElement::getControlAndIdIfHitRegionExists(const LayoutPoint& location)
+{
+ if (m_context && m_context->is2d() && m_context->hitRegionsCount() > 0)
Rick Byers 2016/03/10 21:36:29 nit: move the hitRegionsCount check down into impl
zino 2016/03/11 09:35:47 Done.
+ return m_context->getControlAndIdIfHitRegionExists(location);
+ return std::make_pair(nullptr, String());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698