Skip to content
  • mrobinson@webkit.org's avatar
    2011-05-28 Martin Robinson <mrobinson@igalia.com> · 49819faf
    mrobinson@webkit.org authored
            Reviewed by Gustavo Noronha Silva.
    
            [GTK] Remove PasteboardHelperGtk
            https://bugs.webkit.org/show_bug.cgi?id=61690
    
            Remove the virtual methods from PasteboardHelper, so that PasteboardHelperGtk
            can be removed. Since the GtkClipboard IDs are verified to be the same between
            WebKit and WebCore we no longer need to communicate from WebCore to WebKit to
            get them.
    
            No new tests. This is just a code refactor.
    
            * platform/Pasteboard.h: Remove GTK+ specific methods. They are no longer needed.
            * platform/gtk/ClipboardGtk.cpp: Remove the m_helper member and access the
            PasteboardHelper singleton directly.
            * platform/gtk/ClipboardGtk.h: Ditto.
            * platform/gtk/PasteboardGtk.cpp: Ditto.
            * platform/gtk/PasteboardHelper.cpp:
            (WebCore::removeMarkupPrefix): Remove an extra line.
            (WebCore::PasteboardHelper::defaultPasteboardHelper): Added this static getter
            for the singleton.
            (WebCore::PasteboardHelper::PasteboardHelper): Moved the contents of initTargetList here.
            (WebCore::PasteboardHelper::getCurrentClipboard): Instead of talking with WebKit to determine
            whether or not to use the primary selection clipboard, just use our new member.
            (WebCore::PasteboardHelper::fillSelectionData): Use our local enum to get the ID.
            (WebCore::PasteboardHelper::targetListForDataObject): Ditto.
            (WebCore::PasteboardHelper::dropAtomsForContext): Ditto.
            (WebCore::getClipboardContentsCallback): Ditto.
            * platform/gtk/PasteboardHelper.h: PasteboardHelper now keeps track of whether or
            not to use the primary selection clipboard internally.
            (WebCore::PasteboardHelper::setUsePrimarySelectionClipboard): Added.
            (WebCore::PasteboardHelper::usePrimarySelectionClipboard): Added.
    2011-05-28  Martin Robinson  <mrobinson@igalia.com>
    
            Reviewed by Gustavo Noronha Silva.
    
            [GTK] Remove PastboardHelperGtk
            https://bugs.webkit.org/show_bug.cgi?id=61690
    
            Remove PasteboardHelperGtk and talk directly to WebCore for pasteboard
            activity. This change moves the PasteboardHelper singleton from WebKit
            to WebCore.
    
            * GNUmakefile.am: Remove PasteboardHelperGtk from the source list.
            * WebCoreSupport/AssertMatchingEnums.cpp: Added assertions verifying that the
            WebCore versions of the GtkClipboard enums match those in the WebKit API.
            * WebCoreSupport/DragClientGtk.cpp:
            (WebKit::DragClient::startDrag): Access the pasteboard helper via a static method.
            * WebCoreSupport/EditorClientGtk.cpp:
            (WebKit::setSelectionPrimaryClipboardIfNeeded): Ditto. Call into the helper to specify
            that the current clipboard is selection primary now.
            * WebCoreSupport/PasteboardHelperGtk.cpp: Removed.
            * webkit/webkitglobals.cpp: Remove function to set and get the pasteboard helper.
            * webkit/webkitglobalsprivate.h: Ditto.
            * webkit/webkitwebview.cpp:
            (webkit_web_view_button_press_event): Access the pasteboard helper via a static method.
            (webkit_web_view_drag_data_get): Ditto.
            (webkit_web_view_drag_motion): Ditto.
            (webkit_web_view_drag_data_received): Ditto.
            (webkit_web_view_init): Ditto.
            (webkit_web_view_get_copy_target_list): Ditto.
            (webkit_web_view_get_paste_target_list): Ditto.
            * webkit/webkitwebviewprivate.h: Ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    49819faf