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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef CanvasRenderingContext_h 26 #ifndef CanvasRenderingContext_h
27 #define CanvasRenderingContext_h 27 #define CanvasRenderingContext_h
28 28
29 #include "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/html/HTMLCanvasElement.h" 30 #include "core/html/HTMLCanvasElement.h"
31 #include "core/layout/HitTestCanvasResult.h"
31 #include "core/offscreencanvas/OffscreenCanvas.h" 32 #include "core/offscreencanvas/OffscreenCanvas.h"
32 #include "wtf/HashSet.h" 33 #include "wtf/HashSet.h"
33 #include "wtf/Noncopyable.h" 34 #include "wtf/Noncopyable.h"
34 #include "wtf/text/StringHash.h" 35 #include "wtf/text/StringHash.h"
35 36
36 class SkCanvas; 37 class SkCanvas;
37 38
38 namespace blink { class WebLayer; } 39 namespace blink { class WebLayer; }
39 40
40 namespace blink { 41 namespace blink {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Canvas2D-specific interface 101 // Canvas2D-specific interface
101 virtual bool is2d() const { return false; } 102 virtual bool is2d() const { return false; }
102 virtual void restoreCanvasMatrixClipStack(SkCanvas*) const { } 103 virtual void restoreCanvasMatrixClipStack(SkCanvas*) const { }
103 virtual void reset() { } 104 virtual void reset() { }
104 virtual void clearRect(double x, double y, double width, double height) { } 105 virtual void clearRect(double x, double y, double width, double height) { }
105 virtual void didSetSurfaceSize() { } 106 virtual void didSetSurfaceSize() { }
106 virtual void setShouldAntialias(bool) { } 107 virtual void setShouldAntialias(bool) { }
107 virtual unsigned hitRegionsCount() const { return 0; } 108 virtual unsigned hitRegionsCount() const { return 0; }
108 virtual void setFont(const String&) { } 109 virtual void setFont(const String&) { }
109 virtual void styleDidChange(const ComputedStyle* oldStyle, const ComputedSty le& newStyle) { } 110 virtual void styleDidChange(const ComputedStyle* oldStyle, const ComputedSty le& newStyle) { }
110 virtual std::pair<Element*, String> getControlAndIdIfHitRegionExists(const L ayoutPoint& location) { NOTREACHED(); return std::make_pair(nullptr, String()); } 111 virtual HitTestCanvasResult* getControlAndIdIfHitRegionExists(const LayoutPo int& location) { NOTREACHED(); return HitTestCanvasResult::create(String(), null ptr); }
111 virtual String getIdFromControl(const Element* element) { return String(); } 112 virtual String getIdFromControl(const Element* element) { return String(); }
112 virtual bool isAccelerationOptimalForCanvasContent() const { return true; } 113 virtual bool isAccelerationOptimalForCanvasContent() const { return true; }
113 virtual void resetUsageTracking() { }; 114 virtual void resetUsageTracking() { };
114 virtual void incrementFrameCount() { }; 115 virtual void incrementFrameCount() { };
115 116
116 // WebGL-specific interface 117 // WebGL-specific interface
117 virtual bool is3d() const { return false; } 118 virtual bool is3d() const { return false; }
118 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); } 119 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); }
119 virtual void reshape(int width, int height) { NOTREACHED(); } 120 virtual void reshape(int width, int height) { NOTREACHED(); }
120 virtual void markLayerComposited() { NOTREACHED(); } 121 virtual void markLayerComposited() { NOTREACHED(); }
(...skipping 22 matching lines...) Expand all
143 144
144 Member<HTMLCanvasElement> m_canvas; 145 Member<HTMLCanvasElement> m_canvas;
145 Member<OffscreenCanvas> m_offscreenCanvas; 146 Member<OffscreenCanvas> m_offscreenCanvas;
146 HashSet<String> m_cleanURLs; 147 HashSet<String> m_cleanURLs;
147 HashSet<String> m_dirtyURLs; 148 HashSet<String> m_dirtyURLs;
148 }; 149 };
149 150
150 } // namespace blink 151 } // namespace blink
151 152
152 #endif 153 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698