Index: Source/core/editing/Editor.cpp |
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp |
index 4f4ec160fb6318e2341d6162f0d024f826598bb8..5377afef5d258f07fa915d18c47da1473f322623 100644 |
--- a/Source/core/editing/Editor.cpp |
+++ b/Source/core/editing/Editor.cpp |
@@ -72,6 +72,7 @@ |
#include "core/html/HTMLImageElement.h" |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLTextAreaElement.h" |
+#include "core/html/HTMLVideoElement.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
#include "core/loader/EmptyClients.h" |
#include "core/page/EditorClient.h" |
@@ -442,6 +443,11 @@ static Image* imageFromNode(const Node& node) |
return cachedImage->imageForRenderer(renderImage); |
} |
+ if (renderer->isMedia()) { |
+ SourceImageStatus status; |
+ return toHTMLVideoElement(node).getSourceImageForCanvas(CopySourceImageIfVolatile, &status).leakRef(); |
+ } |
+ |
return nullptr; |
} |