Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: third_party/WebKit/Source/core/html/HTMLImageElement.cpp

Issue 1901153002: Implement createImageBitmap(SVG) of intrinsic size = 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: null check Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698