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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 2817093002: Revert of Adds SVGImageElement as a ImageBitmapSource (Closed)
Patch Set: Created 3 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/imagebitmap/ImageBitmapFactories.cpp
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index a3c4e95a195b0525a7cfc4babc0161fb42f12df8..f273bc8315d866418e241354cc91ac000b54ba68 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -45,7 +45,6 @@
#include "core/html/ImageData.h"
#include "core/imagebitmap/ImageBitmapOptions.h"
#include "core/offscreencanvas/OffscreenCanvas.h"
-#include "core/svg/SVGImageElement.h"
#include "core/svg/graphics/SVGImage.h"
#include "core/workers/WorkerGlobalScope.h"
#include "platform/CrossThreadFunctional.h"
@@ -64,16 +63,9 @@
ExceptionState& exception_state,
const ImageBitmapOptions& options,
bool has_crop_rect) {
- ImageElementBase* image_element = nullptr;
if (value.isHTMLImageElement()) {
- if (!(image_element = value.getAsHTMLImageElement()))
- return nullptr;
- } else if (value.isSVGImageElement()) {
- if (!(image_element = value.getAsSVGImageElement()))
- return nullptr;
- }
- if (image_element) {
- if (!image_element->CachedImage()) {
+ HTMLImageElement* image_element = value.getAsHTMLImageElement();
+ if (!image_element || !image_element->CachedImage()) {
exception_state.ThrowDOMException(
kInvalidStateError,
"No image can be retrieved from the provided element.");

Powered by Google App Engine
This is Rietveld 408576698