| 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 void resourceContentChanged(SVGElementProxy*) override; |
| 159 void resourceReferenceChanged(SVGElementProxy*) override; |
| 160 |
| 161 void updateFilterReferences(const FilterOperations&); |
| 162 void clearFilterReferences(); |
| 158 | 163 |
| 159 // BaseRenderingContext2D implementation | 164 // BaseRenderingContext2D implementation |
| 160 bool originClean() const final; | 165 bool originClean() const final; |
| 161 void setOriginTainted() final; | 166 void setOriginTainted() final; |
| 162 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { | 167 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { |
| 163 return CanvasRenderingContext::wouldTaintOrigin(source); | 168 return CanvasRenderingContext::wouldTaintOrigin(source); |
| 164 } | 169 } |
| 165 | 170 |
| 166 int width() const final; | 171 int width() const final; |
| 167 int height() const final; | 172 int height() const final; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 WebLayer* platformLayer() const override; | 248 WebLayer* platformLayer() const override; |
| 244 | 249 |
| 245 Member<HitRegionManager> m_hitRegionManager; | 250 Member<HitRegionManager> m_hitRegionManager; |
| 246 LostContextMode m_contextLostMode; | 251 LostContextMode m_contextLostMode; |
| 247 bool m_contextRestorable; | 252 bool m_contextRestorable; |
| 248 unsigned m_tryRestoreContextAttemptCount; | 253 unsigned m_tryRestoreContextAttemptCount; |
| 249 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 254 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
| 250 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 255 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
| 251 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 256 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
| 252 | 257 |
| 258 FilterOperations m_filterOperations; |
| 253 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; | 259 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; |
| 254 bool m_pruneLocalFontCacheScheduled; | 260 bool m_pruneLocalFontCacheScheduled; |
| 255 ListHashSet<String> m_fontLRUList; | 261 ListHashSet<String> m_fontLRUList; |
| 256 }; | 262 }; |
| 257 | 263 |
| 258 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, | 264 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, |
| 259 CanvasRenderingContext, | 265 CanvasRenderingContext, |
| 260 context, | 266 context, |
| 261 context->is2d() && context->canvas(), | 267 context->is2d() && context->canvas(), |
| 262 context.is2d() && context.canvas()); | 268 context.is2d() && context.canvas()); |
| 263 | 269 |
| 264 } // namespace blink | 270 } // namespace blink |
| 265 | 271 |
| 266 #endif // CanvasRenderingContext2D_h | 272 #endif // CanvasRenderingContext2D_h |
| OLD | NEW |