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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 287163007: WIP: <canvas> hit regions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « Source/core/html/canvas/CanvasHitRegion.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.h
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
index 27003eb1d581342e085a81783eebb72f8df90130..87e2237237d4f2ee96c1289fda893cb6d4d1bd13 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
@@ -49,9 +49,11 @@ namespace WebCore {
class CanvasImageSource;
class CanvasGradient;
+class CanvasHitRegion;
+class CanvasHitRegionManager;
class CanvasPattern;
class CanvasStyle;
-class Path2D;
+struct DecodedHitRegionOptions;
class Element;
class ExceptionState;
class FloatRect;
@@ -61,6 +63,7 @@ class HTMLImageElement;
class HTMLVideoElement;
class ImageBitmap;
class ImageData;
+class Path2D;
class TextMetrics;
typedef WillBeHeapHashMap<String, RefPtrWillBeMember<MutableStylePropertySet> > MutableStylePropertyMap;
@@ -224,6 +227,11 @@ public:
PassRefPtr<Canvas2DContextAttributes> getContextAttributes() const;
+ void addHitRegion(ExceptionState&);
+ void addHitRegion(const Dictionary& options, ExceptionState&);
+ void removeHitRegion(const String& id);
+ CanvasHitRegion* hitRegionAtPoint(const LayoutPoint&);
+
void drawFocusIfNeeded(Element*);
void drawFocusIfNeeded(Path2D*, Element*);
bool drawCustomFocusRing(Element*);
@@ -330,6 +338,8 @@ private:
template<class T> void fullCanvasCompositedStroke(const T&);
template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, const FloatRect&, CompositeOperator);
+ void addHitRegionInternal(const DecodedHitRegionOptions&, ExceptionState&);
+
void drawFocusIfNeededInternal(const Path&, Element*);
bool focusRingCallIsValid(const Path&, Element*);
void updateFocusRingAccessibility(const Path&, Element*);
@@ -344,6 +354,7 @@ private:
virtual blink::WebLayer* platformLayer() const OVERRIDE;
WillBeHeapVector<OwnPtrWillBeMember<State> > m_stateStack;
+ OwnPtrWillBeMember<CanvasHitRegionManager> m_hitRegionManager;
bool m_usesCSSCompatibilityParseMode;
bool m_hasAlpha;
bool m_isContextLost;
« no previous file with comments | « Source/core/html/canvas/CanvasHitRegion.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698