| Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| index f389f1c896feb67db1e795a1258b107e610022bf..44ca9670c7dbe11f427a6b4e190b5ae58edbdbcc 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| @@ -690,8 +690,11 @@ ScriptPromise HTMLImageElement::createImageBitmap(ScriptState* scriptState, Even
|
| return ScriptPromise();
|
| }
|
| if (cachedImage()->getImage()->isSVGImage()) {
|
| - exceptionState.throwDOMException(InvalidStateError, "The image element contains an SVG image, which is unsupported.");
|
| - return ScriptPromise();
|
| + SVGImage* image = toSVGImage(cachedImage()->getImage());
|
| + if (!image->hasIntrinsicDimensions()) {
|
| + exceptionState.throwDOMException(InvalidStateError, "The image element contains an SVG image without intrinsic dimensions.");
|
| + return ScriptPromise();
|
| + }
|
| }
|
| if (!sw || !sh) {
|
| exceptionState.throwDOMException(IndexSizeError, String::format("The source %s provided is 0.", sw ? "height" : "width"));
|
|
|