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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Issue 2229743003: add HitTestCanvasResult Class instend of std::pair<Element*, String> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add HitTestCanvasResult Class instend of std::pair<Element*, String> Created 4 years, 4 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/canvas/CanvasRenderingContext.h
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
index aaf33831899d843bca629adb615a885a1ec6f7f2..71913e2f375645ac8c552bb9ce9fc467318b1eb1 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
@@ -28,6 +28,7 @@
#include "core/CoreExport.h"
#include "core/html/HTMLCanvasElement.h"
+#include "core/layout/HitTestCanvasResult.h"
#include "core/offscreencanvas/OffscreenCanvas.h"
#include "wtf/HashSet.h"
#include "wtf/Noncopyable.h"
@@ -107,7 +108,7 @@ public:
virtual unsigned hitRegionsCount() const { return 0; }
virtual void setFont(const String&) { }
virtual void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newStyle) { }
- virtual std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoint& location) { NOTREACHED(); return std::make_pair(nullptr, String()); }
+ virtual HitTestCanvasResult* getControlAndIdIfHitRegionExists(const LayoutPoint& location) { NOTREACHED(); return HitTestCanvasResult::create(String(), nullptr); }
virtual String getIdFromControl(const Element* element) { return String(); }
virtual bool isAccelerationOptimalForCanvasContent() const { return true; }
virtual void resetUsageTracking() { };

Powered by Google App Engine
This is Rietveld 408576698