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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.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) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 #define CanvasDefaultInterpolationQuality InterpolationLow 51 #define CanvasDefaultInterpolationQuality InterpolationLow
52 52
53 namespace blink { 53 namespace blink {
54 54
55 class AffineTransform; 55 class AffineTransform;
56 class CanvasContextCreationAttributes; 56 class CanvasContextCreationAttributes;
57 class CanvasRenderingContext; 57 class CanvasRenderingContext;
58 class CanvasRenderingContextFactory; 58 class CanvasRenderingContextFactory;
59 class GraphicsContext; 59 class GraphicsContext;
60 class HitTestCanvasResult;
60 class HTMLCanvasElement; 61 class HTMLCanvasElement;
61 class Image; 62 class Image;
62 class ImageBitmapOptions; 63 class ImageBitmapOptions;
63 class ImageBuffer; 64 class ImageBuffer;
64 class ImageBufferSurface; 65 class ImageBufferSurface;
65 class ImageData; 66 class ImageData;
66 class IntSize; 67 class IntSize;
67 68
68 class CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextOrI mageBitmapRenderingContext; 69 class CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextOrI mageBitmapRenderingContext;
69 typedef CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextO rImageBitmapRenderingContext RenderingContext; 70 typedef CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextO rImageBitmapRenderingContext RenderingContext;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 194
194 static void registerRenderingContextFactory(std::unique_ptr<CanvasRenderingC ontextFactory>); 195 static void registerRenderingContextFactory(std::unique_ptr<CanvasRenderingC ontextFactory>);
195 void updateExternallyAllocatedMemory() const; 196 void updateExternallyAllocatedMemory() const;
196 197
197 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS tyle); 198 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS tyle);
198 199
199 void notifyListenersCanvasChanged(); 200 void notifyListenersCanvasChanged();
200 201
201 // For Canvas HitRegions 202 // For Canvas HitRegions
202 bool isSupportedInteractiveCanvasFallback(const Element&); 203 bool isSupportedInteractiveCanvasFallback(const Element&);
203 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi nt&); 204 HitTestCanvasResult* getControlAndIdIfHitRegionExists(const LayoutPoint&);
204 String getIdFromControl(const Element*); 205 String getIdFromControl(const Element*);
205 206
206 // For OffscreenCanvas that controls this html canvas element 207 // For OffscreenCanvas that controls this html canvas element
207 CanvasSurfaceLayerBridge* surfaceLayerBridge() const { return m_surfaceLayer Bridge.get(); } 208 CanvasSurfaceLayerBridge* surfaceLayerBridge() const { return m_surfaceLayer Bridge.get(); }
208 bool createSurfaceLayer(); 209 bool createSurfaceLayer();
209 210
210 void detachContext() { m_context = nullptr; } 211 void detachContext() { m_context = nullptr; }
211 212
212 protected: 213 protected:
213 void didMoveToNewDocument(Document& oldDocument) override; 214 void didMoveToNewDocument(Document& oldDocument) override;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Used for OffscreenCanvas that controls this HTML canvas element 264 // Used for OffscreenCanvas that controls this HTML canvas element
264 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; 265 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
265 266
266 int m_numFramesSinceLastRenderingModeSwitch; 267 int m_numFramesSinceLastRenderingModeSwitch;
267 bool m_pendingRenderingModeSwitch; 268 bool m_pendingRenderingModeSwitch;
268 }; 269 };
269 270
270 } // namespace blink 271 } // namespace blink
271 272
272 #endif // HTMLCanvasElement_h 273 #endif // HTMLCanvasElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698