[GTK] Get rid of use of deleteAllValues in GtkDragAndDropHelper
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Oct 2013 00:43:55 +0000 (00:43 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Oct 2013 00:43:55 +0000 (00:43 +0000)
commit3234fa99625406758c635a1a918a28640d29deb3
tree66819a7acc8f13c2b5cc739c0aba219f31f66d68
parent381f602285e1b33387f693b95bca89464801aaba
[GTK] Get rid of use of deleteAllValues in GtkDragAndDropHelper
https://bugs.webkit.org/show_bug.cgi?id=122417

Reviewed by Andreas Kling.

* platform/gtk/GtkDragAndDropHelper.cpp: Removed unneeded typedefs.
(WebCore::GtkDragAndDropHelper::~GtkDragAndDropHelper): Removed call to
deleteAllValues.
(WebCore::GtkDragAndDropHelper::handleDragEnd): Use remove directly instead
of using find then remove. I believe this fixes a storage leak.
(WebCore::GtkDragAndDropHelper::handleGetDragData): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragLeaveLater): Remove the explicit
delete since remove will automatically delete.
(WebCore::GtkDragAndDropHelper::handleDragLeave): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragMotion): Use add instead of a
combination of find and set. Also user nullptr instead of 0.
(WebCore::GtkDragAndDropHelper::handleDragDataReceived): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragDrop): Use get instead of find.

* platform/gtk/GtkDragAndDropHelper.h: Use nullptr instead of 0. Change value
type of m_droppingContexts to be a std::unique_ptr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/GtkDragAndDropHelper.cpp
Source/WebCore/platform/gtk/GtkDragAndDropHelper.h