| Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| index 04ae3c0f4c4b88d04dc13ea5d87e69732cfcd376..40c6f294cc6dc968b0e6b9bba9c938da03f92c5b 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| @@ -338,10 +338,10 @@ ScriptPromise HTMLVideoElement::createImageBitmap(ScriptState* scriptState, Even
|
| exceptionState.throwDOMException(InvalidStateError, "The provided element's player has no current data.");
|
| return ScriptPromise();
|
| }
|
| - if (!sw || !sh) {
|
| - exceptionState.throwDOMException(IndexSizeError, String::format("The source %s provided is 0.", sw ? "height" : "width"));
|
| + if (!ImageBitmap::isSWSHValid(sw, sh, exceptionState))
|
| + return ScriptPromise();
|
| + if (!ImageBitmap::isResizeOptionValid(options, exceptionState))
|
| return ScriptPromise();
|
| - }
|
| return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::create(this, IntRect(sx, sy, sw, sh), eventTarget.toLocalDOMWindow()->document(), options));
|
| }
|
|
|
|
|