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 5c79e60b9f4ebeb96bae1c5087c1fb0a58de3415..ff3b1017fc921d60d67e9ac3f59a75181aca43ca 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
@@ -685,17 +685,6 @@ void HTMLImageElement::forceReload() const |
ScriptPromise HTMLImageElement::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, int sx, int sy, int sw, int sh, const ImageBitmapOptions& options, ExceptionState& exceptionState) |
{ |
ASSERT(eventTarget.toLocalDOMWindow()); |
- if (!cachedImage()) { |
- exceptionState.throwDOMException(InvalidStateError, "No image can be retrieved from the provided element."); |
- return ScriptPromise(); |
- } |
- if (cachedImage()->getImage()->isSVGImage()) { |
- 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")); |
return ScriptPromise(); |