| Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| index 655442579b0afbc4d611446376ec62f42f9455c4..9fd7e8d3d938529fff7db558d1ea3227f7c1d8e2 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| @@ -177,27 +177,10 @@ Node::InsertionNotificationRequest HTMLCanvasElement::insertedInto(
|
| }
|
|
|
| void HTMLCanvasElement::setHeight(int value, ExceptionState& exceptionState) {
|
| - if (surfaceLayerBridge()) {
|
| - // The existence of surfaceLayerBridge indicates that
|
| - // canvas.transferControlToOffscreen has been called.
|
| - exceptionState.throwDOMException(InvalidStateError,
|
| - "Resizing is not allowed for a canvas "
|
| - "that has transferred its control to "
|
| - "offscreen.");
|
| - return;
|
| - }
|
| setIntegralAttribute(heightAttr, value);
|
| }
|
|
|
| void HTMLCanvasElement::setWidth(int value, ExceptionState& exceptionState) {
|
| - if (surfaceLayerBridge()) {
|
| - // Same comment as above.
|
| - exceptionState.throwDOMException(InvalidStateError,
|
| - "Resizing is not allowed for a canvas "
|
| - "that has transferred its control to "
|
| - "offscreen.");
|
| - return;
|
| - }
|
| setIntegralAttribute(widthAttr, value);
|
| }
|
|
|
| @@ -1266,6 +1249,8 @@ FloatSize HTMLCanvasElement::elementSize(const FloatSize&) const {
|
| return FloatSize(image->width(), image->height());
|
| return FloatSize(0, 0);
|
| }
|
| + if (placeholderFrame())
|
| + return FloatSize(placeholderFrame()->size());
|
| return FloatSize(width(), height());
|
| }
|
|
|
|
|