Changeset 60008 in webkit


Ignore:
Timestamp:
May 22, 2010 11:14:29 AM (14 years ago)
Author:
Martin Robinson
Message:

2010-05-22 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] WebKit/gtk/WebCoreSupport/DragClientGtk::startDrag should use the Clipboard::sourceOperation
https://bugs.webkit.org/show_bug.cgi?id=39459

Add ClipboardUtilitiesGtk, a container for GTK+/WebCore clipboard utility functions.
Initially add a function which converts a WebCore::DragOperation to a bitmask of
GdkDragActions.

No new tests, because behavior has not changed.

  • GNUmakefile.am:
  • platform/gtk/ClipboardUtilitiesGtk.cpp: Added. (WebCore::dragOperationToGdkDragActions): Added.
  • platform/gtk/ClipboardUtilitiesGtk.h: Added.

2010-05-22 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] WebKit/gtk/WebCoreSupport/DragClientGtk::startDrag should use the Clipboard::sourceOperation
https://bugs.webkit.org/show_bug.cgi?id=39459

  • WebCoreSupport/DragClientGtk.cpp: (WebKit::DragClient::startDrag): Use Clipboard::sourceOperation instead of trying to figure out the GdkDragAction manually. The DOM may have changed the appropriate list of actions anyhow.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60001 r60008  
     12010-05-22  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] WebKit/gtk/WebCoreSupport/DragClientGtk::startDrag should use the Clipboard::sourceOperation
     6        https://bugs.webkit.org/show_bug.cgi?id=39459
     7
     8        Add ClipboardUtilitiesGtk, a container for GTK+/WebCore clipboard utility functions.
     9        Initially add a function which converts a WebCore::DragOperation to a bitmask of
     10        GdkDragActions.
     11
     12        No new tests, because behavior has not changed.
     13
     14        * GNUmakefile.am:
     15        * platform/gtk/ClipboardUtilitiesGtk.cpp: Added.
     16        (WebCore::dragOperationToGdkDragActions): Added.
     17        * platform/gtk/ClipboardUtilitiesGtk.h: Added.
     18
    1192010-05-21  Adam Barth  <abarth@webkit.org>
    220
  • trunk/WebCore/GNUmakefile.am

    r59935 r60008  
    21102110        WebCore/platform/gtk/ClipboardGtk.cpp \
    21112111        WebCore/platform/gtk/ClipboardGtk.h \
     2112        WebCore/platform/gtk/ClipboardUtilitiesGtk.cpp \
     2113        WebCore/platform/gtk/ClipboardUtilitiesGtk.h \
    21122114        WebCore/platform/gtk/ContextMenuGtk.cpp \
    21132115        WebCore/platform/gtk/ContextMenuItemGtk.cpp \
  • trunk/WebKit/gtk/ChangeLog

    r59935 r60008  
     12010-05-22  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] WebKit/gtk/WebCoreSupport/DragClientGtk::startDrag should use the Clipboard::sourceOperation
     6        https://bugs.webkit.org/show_bug.cgi?id=39459
     7
     8        * WebCoreSupport/DragClientGtk.cpp:
     9        (WebKit::DragClient::startDrag):
     10        Use Clipboard::sourceOperation instead of trying to figure out the GdkDragAction
     11        manually. The DOM may have changed the appropriate list of actions anyhow.
     12
    1132010-05-21  Steve Block  <steveblock@google.com>
    214
  • trunk/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp

    r59714 r60008  
    2121
    2222#include "ClipboardGtk.h"
     23#include "ClipboardUtilitiesGtk.h"
    2324#include "DataObjectGtk.h"
    2425#include "Document.h"
     26#include "DragController.h"
    2527#include "Element.h"
    2628#include "Frame.h"
     
    7274    ClipboardGtk* clipboardGtk = reinterpret_cast<ClipboardGtk*>(clipboard);
    7375
    74     GdkDragAction dragAction = GDK_ACTION_COPY;
    75     if (linkDrag)
    76         dragAction = (GdkDragAction) (dragAction | GDK_ACTION_LINK);
    77 
    7876    WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame));
    7977    RefPtr<DataObjectGtk> dataObject = clipboardGtk->dataObject();
     
    8583    event->button.time = GDK_CURRENT_TIME;
    8684
    87     GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragAction, 1, event);
     85    GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, event);
    8886    webView->priv->draggingDataObjects.set(context, dataObject);
    8987
Note: See TracChangeset for help on using the changeset viewer.