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

Unified Diff: Source/core/clipboard/Clipboard.cpp

Issue 302133002: Fix a document memory leak in drag-and-drop. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed the comment Created 6 years, 7 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
« no previous file with comments | « Source/core/clipboard/Clipboard.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/clipboard/Clipboard.cpp
diff --git a/Source/core/clipboard/Clipboard.cpp b/Source/core/clipboard/Clipboard.cpp
index a05a87fa062678402b3cee6e91eb7a2a9dfa155d..c80250cd23e82bebc153018b8dfca69fec319ca8 100644
--- a/Source/core/clipboard/Clipboard.cpp
+++ b/Source/core/clipboard/Clipboard.cpp
@@ -228,6 +228,16 @@ void Clipboard::setDragImage(Element* image, int x, int y, ExceptionState& excep
setDragImageElement(image, location);
}
+void Clipboard::clearDragImage()
+{
+ if (!canSetDragImage())
+ return;
+
+ m_dragImage = 0;
+ m_dragLoc = IntPoint();
+ m_dragImageElement = nullptr;
+}
+
void Clipboard::setDragImageResource(ImageResource* img, const IntPoint& loc)
{
setDragImage(img, 0, loc);
« no previous file with comments | « Source/core/clipboard/Clipboard.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698