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

Unified Diff: Source/core/editing/Editor.cpp

Issue 389273002: Fix copyImage for WebGL elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: seperated negative test Created 6 years, 5 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: Source/core/editing/Editor.cpp
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index a37d08b81df42f73690eb54b36e034f9d7796f71..807a9daec420aeef6f15212928f278ee4fc9c903 100644
--- a/Source/core/editing/Editor.cpp
+++ b/Source/core/editing/Editor.cpp
@@ -450,8 +450,8 @@ static void writeImageNodeToPasteboard(Pasteboard* pasteboard, Node* node, const
ASSERT(pasteboard);
ASSERT(node);
- Image* image = imageFromNode(*node);
- if (!image)
+ RefPtrWillBeRawPtr<Image> image = imageFromNode(*node);
+ if (!image.get())
return;
// FIXME: This should probably be reconciled with HitTestResult::absoluteImageURL.
@@ -464,7 +464,7 @@ static void writeImageNodeToPasteboard(Pasteboard* pasteboard, Node* node, const
urlString = toElement(node)->imageSourceURL();
KURL url = urlString.isEmpty() ? KURL() : node->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
- pasteboard->writeImage(image, url, title);
+ pasteboard->writeImage(image.get(), url, title);
}
// Returns whether caller should continue with "the default processing", which is the same as

Powered by Google App Engine
This is Rietveld 408576698