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

Unified Diff: Source/core/frame/ImageBitmapTest.cpp

Issue 703783004: Use CanvasImageSource union type instead of overloading (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: don't append canvases to document.body Created 6 years, 1 month 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: Source/core/frame/ImageBitmapTest.cpp
diff --git a/Source/core/frame/ImageBitmapTest.cpp b/Source/core/frame/ImageBitmapTest.cpp
index d9e08db8963d87c5edfc9b23abe7a9c954054616..064c9ef74e8ce2433c81fe4572c72431c7ea15e9 100644
--- a/Source/core/frame/ImageBitmapTest.cpp
+++ b/Source/core/frame/ImageBitmapTest.cpp
@@ -32,6 +32,7 @@
#include "core/frame/ImageBitmap.h"
#include "SkPixelRef.h" // FIXME: qualify this skia header file.
+#include "bindings/core/v8/UnionTypesCore.h"
#include "core/dom/Document.h"
#include "core/fetch/ImageResource.h"
#include "core/fetch/MemoryCache.h"
@@ -39,6 +40,7 @@
#include "core/fetch/ResourcePtr.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLImageElement.h"
+#include "core/html/HTMLVideoElement.h"
#include "core/html/canvas/CanvasRenderingContext2D.h"
#include "platform/graphics/BitmapImage.h"
#include "platform/graphics/skia/NativeImageSkia.h"
@@ -207,7 +209,9 @@ TEST_F(ImageBitmapTest, ImageResourceLifetime)
}
CanvasRenderingContext* context = canvasElement->getContext("2d");
TrackExceptionState exceptionState;
- toCanvasRenderingContext2D(context)->drawImage(imageBitmapDerived.get(), 0, 0, exceptionState);
+ CanvasImageSourceUnion imageSource;
+ imageSource.setImageBitmap(imageBitmapDerived);
+ toCanvasRenderingContext2D(context)->drawImage(imageSource, 0, 0, exceptionState);
}
} // namespace
« no previous file with comments | « LayoutTests/fast/canvas/drawImage-with-broken-image-expected.txt ('k') | Source/core/html/canvas/CanvasRenderingContext2D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698