| 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" | |
| 35 #include "core/svg/SVGResourceClient.h" | 34 #include "core/svg/SVGResourceClient.h" |
| 36 #include "modules/ModulesExport.h" | 35 #include "modules/ModulesExport.h" |
| 37 #include "modules/canvas2d/BaseRenderingContext2D.h" | 36 #include "modules/canvas2d/BaseRenderingContext2D.h" |
| 38 #include "modules/canvas2d/Canvas2DContextAttributes.h" | 37 #include "modules/canvas2d/Canvas2DContextAttributes.h" |
| 39 #include "modules/canvas2d/CanvasRenderingContext2DState.h" | 38 #include "modules/canvas2d/CanvasRenderingContext2DState.h" |
| 40 #include "platform/graphics/GraphicsTypes.h" | 39 #include "platform/graphics/GraphicsTypes.h" |
| 41 #include "platform/heap/GarbageCollected.h" | 40 #include "platform/heap/GarbageCollected.h" |
| 42 #include "public/platform/WebThread.h" | 41 #include "public/platform/WebThread.h" |
| 43 #include "wtf/Vector.h" | 42 #include "wtf/Vector.h" |
| 44 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 void didProcessTask() override; | 144 void didProcessTask() override; |
| 146 void willProcessTask() override {} | 145 void willProcessTask() override {} |
| 147 | 146 |
| 148 void styleDidChange(const ComputedStyle* oldStyle, | 147 void styleDidChange(const ComputedStyle* oldStyle, |
| 149 const ComputedStyle& newStyle) override; | 148 const ComputedStyle& newStyle) override; |
| 150 HitTestCanvasResult* getControlAndIdIfHitRegionExists( | 149 HitTestCanvasResult* getControlAndIdIfHitRegionExists( |
| 151 const LayoutPoint& location) override; | 150 const LayoutPoint& location) override; |
| 152 String getIdFromControl(const Element*) override; | 151 String getIdFromControl(const Element*) override; |
| 153 | 152 |
| 154 // SVGResourceClient implementation | 153 // SVGResourceClient implementation |
| 155 TreeScope* treeScope() override; | 154 void filterNeedsInvalidation() override; |
| 156 void resourceContentChanged() override; | |
| 157 void resourceElementChanged() override; | |
| 158 | |
| 159 void updateFilterReferences(const FilterOperations&); | |
| 160 void clearFilterReferences(); | |
| 161 | 155 |
| 162 // BaseRenderingContext2D implementation | 156 // BaseRenderingContext2D implementation |
| 163 bool originClean() const final; | 157 bool originClean() const final; |
| 164 void setOriginTainted() final; | 158 void setOriginTainted() final; |
| 165 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { | 159 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { |
| 166 return CanvasRenderingContext::wouldTaintOrigin(source); | 160 return CanvasRenderingContext::wouldTaintOrigin(source); |
| 167 } | 161 } |
| 168 | 162 |
| 169 int width() const final; | 163 int width() const final; |
| 170 int height() const final; | 164 int height() const final; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 WebLayer* platformLayer() const override; | 240 WebLayer* platformLayer() const override; |
| 247 | 241 |
| 248 Member<HitRegionManager> m_hitRegionManager; | 242 Member<HitRegionManager> m_hitRegionManager; |
| 249 LostContextMode m_contextLostMode; | 243 LostContextMode m_contextLostMode; |
| 250 bool m_contextRestorable; | 244 bool m_contextRestorable; |
| 251 unsigned m_tryRestoreContextAttemptCount; | 245 unsigned m_tryRestoreContextAttemptCount; |
| 252 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 246 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
| 253 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 247 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
| 254 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 248 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
| 255 | 249 |
| 256 FilterOperations m_filterOperations; | |
| 257 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; | 250 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; |
| 258 bool m_pruneLocalFontCacheScheduled; | 251 bool m_pruneLocalFontCacheScheduled; |
| 259 ListHashSet<String> m_fontLRUList; | 252 ListHashSet<String> m_fontLRUList; |
| 260 }; | 253 }; |
| 261 | 254 |
| 262 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, | 255 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, |
| 263 CanvasRenderingContext, | 256 CanvasRenderingContext, |
| 264 context, | 257 context, |
| 265 context->is2d() && context->canvas(), | 258 context->is2d() && context->canvas(), |
| 266 context.is2d() && context.canvas()); | 259 context.is2d() && context.canvas()); |
| 267 | 260 |
| 268 } // namespace blink | 261 } // namespace blink |
| 269 | 262 |
| 270 #endif // CanvasRenderingContext2D_h | 263 #endif // CanvasRenderingContext2D_h |
| OLD | NEW |