OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #ifndef CanvasRenderingContext2D_h | 27 #ifndef CanvasRenderingContext2D_h |
28 #define CanvasRenderingContext2D_h | 28 #define CanvasRenderingContext2D_h |
29 | 29 |
30 #include "bindings/core/v8/ScriptWrappable.h" | 30 #include "bindings/core/v8/ScriptWrappable.h" |
31 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 31 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
32 #include "core/html/canvas/CanvasRenderingContext.h" | 32 #include "core/html/canvas/CanvasRenderingContext.h" |
33 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 33 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 34 #include "core/style/FilterOperations.h" |
34 #include "core/svg/SVGResourceClient.h" | 35 #include "core/svg/SVGResourceClient.h" |
35 #include "modules/ModulesExport.h" | 36 #include "modules/ModulesExport.h" |
36 #include "modules/canvas2d/BaseRenderingContext2D.h" | 37 #include "modules/canvas2d/BaseRenderingContext2D.h" |
37 #include "modules/canvas2d/Canvas2DContextAttributes.h" | 38 #include "modules/canvas2d/Canvas2DContextAttributes.h" |
38 #include "modules/canvas2d/CanvasRenderingContext2DState.h" | 39 #include "modules/canvas2d/CanvasRenderingContext2DState.h" |
39 #include "platform/graphics/GraphicsTypes.h" | 40 #include "platform/graphics/GraphicsTypes.h" |
40 #include "platform/heap/GarbageCollected.h" | 41 #include "platform/heap/GarbageCollected.h" |
41 #include "public/platform/WebThread.h" | 42 #include "public/platform/WebThread.h" |
42 #include "wtf/Vector.h" | 43 #include "wtf/Vector.h" |
43 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 void didProcessTask() override; | 148 void didProcessTask() override; |
148 void willProcessTask() override {} | 149 void willProcessTask() override {} |
149 | 150 |
150 void styleDidChange(const ComputedStyle* oldStyle, | 151 void styleDidChange(const ComputedStyle* oldStyle, |
151 const ComputedStyle& newStyle) override; | 152 const ComputedStyle& newStyle) override; |
152 HitTestCanvasResult* getControlAndIdIfHitRegionExists( | 153 HitTestCanvasResult* getControlAndIdIfHitRegionExists( |
153 const LayoutPoint& location) override; | 154 const LayoutPoint& location) override; |
154 String getIdFromControl(const Element*) override; | 155 String getIdFromControl(const Element*) override; |
155 | 156 |
156 // SVGResourceClient implementation | 157 // SVGResourceClient implementation |
157 void filterNeedsInvalidation() override; | 158 TreeScope* treeScope() override; |
| 159 void resourceContentChanged() override; |
| 160 void resourceElementChanged() override; |
| 161 |
| 162 void updateFilterReferences(const FilterOperations&); |
| 163 void clearFilterReferences(); |
158 | 164 |
159 // BaseRenderingContext2D implementation | 165 // BaseRenderingContext2D implementation |
160 bool originClean() const final; | 166 bool originClean() const final; |
161 void setOriginTainted() final; | 167 void setOriginTainted() final; |
162 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { | 168 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { |
163 return CanvasRenderingContext::wouldTaintOrigin(source); | 169 return CanvasRenderingContext::wouldTaintOrigin(source); |
164 } | 170 } |
165 | 171 |
166 int width() const final; | 172 int width() const final; |
167 int height() const final; | 173 int height() const final; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 WebLayer* platformLayer() const override; | 249 WebLayer* platformLayer() const override; |
244 | 250 |
245 Member<HitRegionManager> m_hitRegionManager; | 251 Member<HitRegionManager> m_hitRegionManager; |
246 LostContextMode m_contextLostMode; | 252 LostContextMode m_contextLostMode; |
247 bool m_contextRestorable; | 253 bool m_contextRestorable; |
248 unsigned m_tryRestoreContextAttemptCount; | 254 unsigned m_tryRestoreContextAttemptCount; |
249 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 255 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
250 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 256 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
251 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 257 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
252 | 258 |
| 259 FilterOperations m_filterOperations; |
253 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; | 260 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; |
254 bool m_pruneLocalFontCacheScheduled; | 261 bool m_pruneLocalFontCacheScheduled; |
255 ListHashSet<String> m_fontLRUList; | 262 ListHashSet<String> m_fontLRUList; |
256 }; | 263 }; |
257 | 264 |
258 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, | 265 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, |
259 CanvasRenderingContext, | 266 CanvasRenderingContext, |
260 context, | 267 context, |
261 context->is2d() && context->canvas(), | 268 context->is2d() && context->canvas(), |
262 context.is2d() && context.canvas()); | 269 context.is2d() && context.canvas()); |
263 | 270 |
264 } // namespace blink | 271 } // namespace blink |
265 | 272 |
266 #endif // CanvasRenderingContext2D_h | 273 #endif // CanvasRenderingContext2D_h |
OLD | NEW |