[GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 18:58:12 +0000 (18:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 18:58:12 +0000 (18:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121782

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2013-09-24
Reviewed by Martin Robinson.

Disabled drag functions.

Source/WebCore:

* page/gtk/EventHandlerGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:

Source/WebKit/gtk:

* WebCoreSupport/DragClientGtk.cpp:
* WebCoreSupport/DragClientGtk.h:

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkit_web_view_base_class_init):
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156345 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/gtk/EventHandlerGtk.cpp
Source/WebCore/platform/gtk/PasteboardGtk.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp

index 2cd0eb1db55264ac24331f651bd4dd778a1bb0c7..27e0d9b62f401602c06c32b85402bb64111d0940 100644 (file)
@@ -1,3 +1,15 @@
+2013-09-24  Lorenzo Tilve  <ltilve@igalia.com>
+
+        [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
+        https://bugs.webkit.org/show_bug.cgi?id=121782
+
+        Reviewed by Martin Robinson.
+
+        Disabled drag functions.
+
+        * page/gtk/EventHandlerGtk.cpp:
+        * platform/gtk/PasteboardGtk.cpp:
+
 2013-09-24  Samuel White  <samuel_white@apple.com>
 
         AX: Replace AXObjectCache postNotification method boolean arguments with enum values.
index 9eccbc0ede40ec4013063d2eb010d3f5231c221e..e6e45625c12899035138f3854d871500e2ff364c 100644 (file)
@@ -42,7 +42,9 @@
 
 namespace WebCore {
 
+#if ENABLE(DRAG_SUPPORT)
 const double EventHandler::TextDragDelay = 0.0;
+#endif
 
 bool EventHandler::tabsToAllFormControls(KeyboardEvent* event) const
 {
@@ -94,10 +96,12 @@ bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& event, Widge
     return toFrameView(widget)->frame().eventHandler().handleWheelEvent(event);
 }
 
+#if ENABLE(DRAG_SUPPORT)
 PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
 {
     return Clipboard::createForDragAndDrop();
 }
+#endif
 
 bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
 {
index 2a35eb4e4bc0b4ed77a48153c93435a8a5628803..aca51323edff147fd8c3a7fb1bfa027b87c66226 100644 (file)
@@ -78,6 +78,7 @@ PassOwnPtr<Pasteboard> Pasteboard::createPrivate()
     return create(DataObjectGtk::create());
 }
 
+#if ENABLE(DRAG_SUPPORT)
 PassOwnPtr<Pasteboard> Pasteboard::createForDragAndDrop()
 {
     return create(DataObjectGtk::create());
@@ -87,6 +88,7 @@ PassOwnPtr<Pasteboard> Pasteboard::createForDragAndDrop(const DragData& dragData
 {
     return create(dragData.platformData());
 }
+#endif
 
 Pasteboard::Pasteboard(PassRefPtr<DataObjectGtk> dataObject)
     : m_dataObject(dataObject)
@@ -294,9 +296,11 @@ bool Pasteboard::canSmartReplace()
     return m_gtkClipboard && PasteboardHelper::defaultPasteboardHelper()->clipboardContentSupportsSmartReplace(m_gtkClipboard);
 }
 
+#if ENABLE(DRAG_SUPPORT)
 void Pasteboard::setDragImage(DragImageRef, const IntPoint& hotSpot)
 {
 }
+#endif
 
 PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context,
                                                           bool allowPlainText, bool& chosePlainText)
index eb373e1da13e8a5b58ead527dadee9e30ecdff6b..7f530f63611d38dcde4691384926ac7d6cbdfb5b 100644 (file)
@@ -1,3 +1,15 @@
+2013-09-24  Lorenzo Tilve  <ltilve@igalia.com>
+
+        [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
+        https://bugs.webkit.org/show_bug.cgi?id=121782
+
+        Reviewed by Martin Robinson.
+
+        Disabled drag functions.
+
+        * WebCoreSupport/DragClientGtk.cpp:
+        * WebCoreSupport/DragClientGtk.h:
+
 2013-09-24  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Fix accelerated compositing disabling under Wayland displays
index e39b470e27d02e81d89c249da3d75bf8695d7baf..fa03c65264e2150ffea9d5a671799c6ac3df585d 100644 (file)
@@ -19,6 +19,8 @@
 #include "config.h"
 #include "DragClientGtk.h"
 
+#if ENABLE(DRAG_SUPPORT)
+
 #include "Clipboard.h"
 #include "ClipboardUtilitiesGtk.h"
 #include "DataObjectGtk.h"
@@ -100,3 +102,5 @@ void DragClient::dragControllerDestroyed()
     delete this;
 }
 }
+
+#endif // ENABLE(DRAG_SUPPORT)
index 76c7596019536026070a45995354d38bf5bf2f8d..08b794b7c376a34d00bab6596a9a937109876276 100644 (file)
@@ -27,6 +27,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if ENABLE(DRAG_SUPPORT)
+
 #ifndef DragClientGtk_h
 #define DragClientGtk_h
 
@@ -61,3 +63,5 @@ namespace WebKit {
 }
 
 #endif
+
+#endif // ENABLE(DRAG_SUPPORT)
index 5fd6b3880d6a5428a09f9ed3c455c9858a05a663..400aca5658b35f6b603a7c20324999723d1198bf 100644 (file)
@@ -1,3 +1,16 @@
+2013-09-24  Lorenzo Tilve  <ltilve@igalia.com>
+
+        [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
+        https://bugs.webkit.org/show_bug.cgi?id=121782
+
+        Reviewed by Martin Robinson.
+
+        Disabled drag functions.
+
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkit_web_view_base_class_init):
+        * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
+
 2013-09-24  Anders Carlsson  <andersca@apple.com>
 
         Begin adopting std::tuple for IPC decoding
index 4f0f1e512be6bc07407c28ef0c5ed6623c30af40..0078d73451c3dc63bba8a220c7bee3d52a7cf500 100644 (file)
@@ -692,6 +692,7 @@ static gboolean webkitWebViewBaseQueryTooltip(GtkWidget* widget, gint x, gint y,
     return TRUE;
 }
 
+#if ENABLE(DRAG_SUPPORT)
 static void webkitWebViewBaseDragDataGet(GtkWidget* widget, GdkDragContext* context, GtkSelectionData* selectionData, guint info, guint time)
 {
     WEBKIT_WEB_VIEW_BASE(widget)->priv->dragAndDropHelper.handleGetDragData(context, selectionData, info);
@@ -726,6 +727,7 @@ static void webkitWebViewBaseDragDataReceived(GtkWidget* widget, GdkDragContext*
     DragOperation operation = webViewBase->priv->pageProxy->dragSession().operation;
     gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time);
 }
+#endif // ENABLE(DRAG_SUPPORT)
 
 static AtkObject* webkitWebViewBaseGetAccessible(GtkWidget* widget)
 {
@@ -755,6 +757,7 @@ static AtkObject* webkitWebViewBaseGetAccessible(GtkWidget* widget)
     return priv->accessible.get();
 }
 
+#if ENABLE(DRAG_SUPPORT)
 static gboolean webkitWebViewBaseDragMotion(GtkWidget* widget, GdkDragContext* context, gint x, gint y, guint time)
 {
     WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
@@ -802,6 +805,7 @@ static gboolean webkitWebViewBaseDragDrop(GtkWidget* widget, GdkDragContext* con
     gtk_drag_finish(context, TRUE, FALSE, time);
     return TRUE;
 }
+#endif // ENABLE(DRAG_SUPPORT)
 
 static void webkitWebViewBaseParentSet(GtkWidget* widget, GtkWidget* oldParent)
 {
@@ -850,12 +854,14 @@ static void webkit_web_view_base_class_init(WebKitWebViewBaseClass* webkitWebVie
     widgetClass->scroll_event = webkitWebViewBaseScrollEvent;
     widgetClass->motion_notify_event = webkitWebViewBaseMotionNotifyEvent;
     widgetClass->query_tooltip = webkitWebViewBaseQueryTooltip;
+#if ENABLE(DRAG_SUPPORT)
     widgetClass->drag_end = webkitWebViewBaseDragEnd;
     widgetClass->drag_data_get = webkitWebViewBaseDragDataGet;
     widgetClass->drag_motion = webkitWebViewBaseDragMotion;
     widgetClass->drag_leave = webkitWebViewBaseDragLeave;
     widgetClass->drag_drop = webkitWebViewBaseDragDrop;
     widgetClass->drag_data_received = webkitWebViewBaseDragDataReceived;
+#endif // ENABLE(DRAG_SUPPORT)
     widgetClass->get_accessible = webkitWebViewBaseGetAccessible;
     widgetClass->parent_set = webkitWebViewBaseParentSet;
     widgetClass->destroy = webkitWebViewBaseDestroy;
@@ -941,6 +947,7 @@ void webkitWebViewBaseSetTooltipArea(WebKitWebViewBase* webViewBase, const IntRe
     webViewBase->priv->tooltipArea = tooltipArea;
 }
 
+#if ENABLE(DRAG_SUPPORT)
 void webkitWebViewBaseStartDrag(WebKitWebViewBase* webViewBase, const DragData& dragData, PassRefPtr<ShareableBitmap> dragImage)
 {
     WebKitWebViewBasePrivate* priv = webViewBase->priv;
@@ -967,6 +974,7 @@ void webkitWebViewBaseStartDrag(WebKitWebViewBase* webViewBase, const DragData&
     } else
         gtk_drag_set_icon_default(context);
 }
+#endif // ENABLE(DRAG_SUPPORT)
 
 void webkitWebViewBaseForwardNextKeyEvent(WebKitWebViewBase* webkitWebViewBase)
 {
index 406f0ea3556ca57747c2a910cfa322adacce86a3..4c65892e82940b7896e3be57c1ede63c794db42e 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "WebDragClient.h"
 
+#if ENABLE(DRAG_SUPPORT)
+
 #include "ArgumentCodersGtk.h"
 #include "ShareableBitmap.h"
 #include "WebPage.h"
@@ -69,3 +71,5 @@ void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosi
 }
 
 }; // namespace WebKit.
+
+#endif // ENABLE(DRAG_SUPPORT)