| Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.h
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
|
| index d7fab2e7e84c881d6c20604a522b12cfab10edc2..027358b215260695c801c97b43e4983ac943b0d2 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
|
| @@ -88,10 +88,19 @@
|
|
|
| const IntSize& size() const { return m_size; }
|
|
|
| - void setWidth(int, ExceptionState&);
|
| - void setHeight(int, ExceptionState&);
|
| -
|
| - void setSize(const IntSize& newSize);
|
| + void setWidth(int);
|
| + void setHeight(int);
|
| +
|
| + void setSize(const IntSize& newSize)
|
| + {
|
| + if (newSize == size())
|
| + return;
|
| + m_ignoreReset = true;
|
| + setWidth(newSize.width());
|
| + setHeight(newSize.height());
|
| + m_ignoreReset = false;
|
| + reset();
|
| + }
|
|
|
| // Called by Document::getCSSCanvasContext as well as above getContext().
|
| CanvasRenderingContext* getCanvasRenderingContext(const String&, const CanvasContextCreationAttributes&);
|
|
|