Changeset 62226 in webkit


Ignore:
Timestamp:
Jun 30, 2010 10:44:51 PM (14 years ago)
Author:
Martin Robinson
Message:

2010-06-30 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] Convert WebKitWebView's private draggingDataObjects member to a pointer
https://bugs.webkit.org/show_bug.cgi?id=40333

Convert draggingDataObjects to a pointer. The constructor and destructor of the
HashMap should be called explicitly. GObject memory allocation does not do this.

  • WebCoreSupport/DragClientGtk.cpp: (WebKit::DragClient::startDrag):
  • webkit/webkitprivate.h:
  • webkit/webkitwebview.cpp: (webkit_web_view_dispose): (webkit_web_view_drag_end): (webkit_web_view_drag_data_get): (webkit_web_view_init):
Location:
trunk/WebKit/gtk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r62198 r62226  
     12010-06-30  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Convert WebKitWebView's private draggingDataObjects member to a pointer
     6        https://bugs.webkit.org/show_bug.cgi?id=40333
     7
     8        Convert draggingDataObjects to a pointer. The constructor and destructor of the
     9        HashMap should be called explicitly. GObject memory allocation does not do this.
     10
     11        * WebCoreSupport/DragClientGtk.cpp:
     12        (WebKit::DragClient::startDrag):
     13        * webkit/webkitprivate.h:
     14        * webkit/webkitwebview.cpp:
     15        (webkit_web_view_dispose):
     16        (webkit_web_view_drag_end):
     17        (webkit_web_view_drag_data_get):
     18        (webkit_web_view_init):
     19
    1202010-06-30  Xan Lopez  <xlopez@igalia.com>
    221
  • trunk/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp

    r61288 r62226  
    7878
    7979    GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, currentEvent.get());
    80     webView->priv->draggingDataObjects.set(context, dataObject);
     80    webView->priv->draggingDataObjects->set(context, dataObject);
    8181
    8282    // A drag starting should prevent a double-click from happening. This might
  • trunk/WebKit/gtk/webkit/webkitprivate.h

    r61288 r62226  
    159159        guint32 previousClickTime;
    160160
    161         HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> > draggingDataObjects;
     161        HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> >* draggingDataObjects;
    162162    };
    163163
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r61388 r62226  
    11911191    }
    11921192
    1193     priv->draggingDataObjects.clear();
     1193    priv->draggingDataObjects->clear();
     1194    delete priv->draggingDataObjects;
    11941195
    11951196    G_OBJECT_CLASS(webkit_web_view_parent_class)->dispose(object);
     
    13101311    // This might happen if a drag is still in progress after a WebKitWebView
    13111312    // is disposed and before it is finalized.
    1312     if (!priv->draggingDataObjects.contains(context))
     1313    if (!priv->draggingDataObjects->contains(context))
    13131314        return;
    13141315
    1315     priv->draggingDataObjects.remove(context);
     1316    priv->draggingDataObjects->remove(context);
    13161317
    13171318    Frame* frame = core(webView)->focusController()->focusedOrMainFrame();
     
    13481349    // This might happen if a drag is still in progress after a WebKitWebView
    13491350    // is diposed and before it is finalized.
    1350     if (!priv->draggingDataObjects.contains(context))
     1351    if (!priv->draggingDataObjects->contains(context))
    13511352        return;
    13521353
    1353     pasteboardHelperInstance()->fillSelectionData(selectionData, info, priv->draggingDataObjects.get(context).get());
     1354    pasteboardHelperInstance()->fillSelectionData(selectionData, info, priv->draggingDataObjects->get(context).get());
    13541355}
    13551356
     
    29292930    priv->previousClickButton = 0;
    29302931    priv->previousClickTime = 0;
     2932
     2933    priv->draggingDataObjects = new HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> >();
    29312934}
    29322935
Note: See TracChangeset for help on using the changeset viewer.