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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h

Issue 1387743002: Fixed expando-loss.html test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cache ScriptState and use it to wrap m_defaultVertexArrayObject. Created 5 years, 2 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) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed.
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class ExceptionState; 49 class ExceptionState;
50 class FloatRect; 50 class FloatRect;
51 class FloatSize; 51 class FloatSize;
52 class Font; 52 class Font;
53 class FontMetrics; 53 class FontMetrics;
54 class HitRegion; 54 class HitRegion;
55 class HitRegionOptions; 55 class HitRegionOptions;
56 class HitRegionManager; 56 class HitRegionManager;
57 class ImageData; 57 class ImageData;
58 class Path2D; 58 class Path2D;
59 class ScriptState;
59 class SVGMatrixTearOff; 60 class SVGMatrixTearOff;
60 class TextMetrics; 61 class TextMetrics;
61 62
62 typedef HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmap Canva sImageSourceUnion; 63 typedef HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmap Canva sImageSourceUnion;
63 64
64 class MODULES_EXPORT CanvasRenderingContext2D final : public CanvasRenderingCont ext, public CanvasPathMethods, public WebThread::TaskObserver { 65 class MODULES_EXPORT CanvasRenderingContext2D final : public CanvasRenderingCont ext, public CanvasPathMethods, public WebThread::TaskObserver {
65 DEFINE_WRAPPERTYPEINFO(); 66 DEFINE_WRAPPERTYPEINFO();
66 public: 67 public:
67 class Factory : public CanvasRenderingContextFactory { 68 class Factory : public CanvasRenderingContextFactory {
68 WTF_MAKE_NONCOPYABLE(Factory); 69 WTF_MAKE_NONCOPYABLE(Factory);
69 public: 70 public:
70 Factory() {} 71 Factory() {}
71 ~Factory() override {} 72 ~Factory() override {}
72 73
73 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> create(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, Document& document) overr ide 74 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> create(HTMLCanvasElement* canvas, ScriptState*, const CanvasContextCreationAttributes& attrs, Document& d ocument) override
74 { 75 {
75 return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs , document)); 76 return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs , document));
76 } 77 }
77 CanvasRenderingContext::ContextType contextType() const override { retur n CanvasRenderingContext::Context2d; } 78 CanvasRenderingContext::ContextType contextType() const override { retur n CanvasRenderingContext::Context2d; }
78 void onError(HTMLCanvasElement*, const String& error) override { } 79 void onError(HTMLCanvasElement*, const String& error) override { }
79 }; 80 };
80 81
81 ~CanvasRenderingContext2D() override; 82 ~CanvasRenderingContext2D() override;
82 83
83 void strokeStyle(StringOrCanvasGradientOrCanvasPattern&) const; 84 void strokeStyle(StringOrCanvasGradientOrCanvasPattern&) const;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; 317 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle;
317 bool m_pruneLocalFontCacheScheduled; 318 bool m_pruneLocalFontCacheScheduled;
318 ListHashSet<String> m_fontLRUList; 319 ListHashSet<String> m_fontLRUList;
319 }; 320 };
320 321
321 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 322 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
322 323
323 } // namespace blink 324 } // namespace blink
324 325
325 #endif // CanvasRenderingContext2D_h 326 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698