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

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

Issue 1775613002: Throw a RangeError exception from get/createImageData when out of memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assert in test Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BaseRenderingContext2D_h 5 #ifndef BaseRenderingContext2D_h
6 #define BaseRenderingContext2D_h 6 #define BaseRenderingContext2D_h
7 7
8 #include "bindings/core/v8/UnionTypesCore.h" 8 #include "bindings/core/v8/UnionTypesCore.h"
9 #include "bindings/modules/v8/UnionTypesModules.h" 9 #include "bindings/modules/v8/UnionTypesModules.h"
10 #include "core/html/canvas/CanvasRenderingContext.h" 10 #include "core/html/canvas/CanvasRenderingContext.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 void drawImage(const CanvasImageSourceUnion&, double x, double y, ExceptionS tate&); 110 void drawImage(const CanvasImageSourceUnion&, double x, double y, ExceptionS tate&);
111 void drawImage(const CanvasImageSourceUnion&, double x, double y, double wid th, double height, ExceptionState&); 111 void drawImage(const CanvasImageSourceUnion&, double x, double y, double wid th, double height, ExceptionState&);
112 void drawImage(const CanvasImageSourceUnion&, double sx, double sy, double s w, double sh, double dx, double dy, double dw, double dh, ExceptionState&); 112 void drawImage(const CanvasImageSourceUnion&, double sx, double sy, double s w, double sh, double dx, double dy, double dw, double dh, ExceptionState&);
113 void drawImage(CanvasImageSource*, double sx, double sy, double sw, double s h, double dx, double dy, double dw, double dh, ExceptionState&); 113 void drawImage(CanvasImageSource*, double sx, double sy, double sw, double s h, double dx, double dy, double dw, double dh, ExceptionState&);
114 114
115 CanvasGradient* createLinearGradient(double x0, double y0, double x1, double y1); 115 CanvasGradient* createLinearGradient(double x0, double y0, double x1, double y1);
116 CanvasGradient* createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1, ExceptionState&); 116 CanvasGradient* createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1, ExceptionState&);
117 CanvasPattern* createPattern(const CanvasImageSourceUnion&, const String& re petitionType, ExceptionState&); 117 CanvasPattern* createPattern(const CanvasImageSourceUnion&, const String& re petitionType, ExceptionState&);
118 118
119 ImageData* createImageData(ImageData*) const; 119 ImageData* createImageData(ImageData*, ExceptionState&) const;
120 ImageData* createImageData(double width, double height, ExceptionState&) con st; 120 ImageData* createImageData(double width, double height, ExceptionState&) con st;
121 ImageData* getImageData(double sx, double sy, double sw, double sh, Exceptio nState&) const; 121 ImageData* getImageData(double sx, double sy, double sw, double sh, Exceptio nState&) const;
122 void putImageData(ImageData*, double dx, double dy, ExceptionState&); 122 void putImageData(ImageData*, double dx, double dy, ExceptionState&);
123 void putImageData(ImageData*, double dx, double dy, double dirtyX, double di rtyY, double dirtyWidth, double dirtyHeight, ExceptionState&); 123 void putImageData(ImageData*, double dx, double dy, double dirtyX, double di rtyY, double dirtyWidth, double dirtyHeight, ExceptionState&);
124 124
125 bool imageSmoothingEnabled() const; 125 bool imageSmoothingEnabled() const;
126 void setImageSmoothingEnabled(bool); 126 void setImageSmoothingEnabled(bool);
127 String imageSmoothingQuality() const; 127 String imageSmoothingQuality() const;
128 void setImageSmoothingQuality(const String&); 128 void setImageSmoothingQuality(const String&);
129 129
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode); 283 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
284 c->setMatrix(ctm); 284 c->setMatrix(ctm);
285 drawFunc(c, &foregroundPaint); 285 drawFunc(c, &foregroundPaint);
286 c->restore(); 286 c->restore();
287 c->setMatrix(ctm); 287 c->setMatrix(ctm);
288 } 288 }
289 289
290 } // namespace blink 290 } // namespace blink
291 291
292 #endif // BaseRenderingContext2D_h 292 #endif // BaseRenderingContext2D_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698