Title: [174328] trunk/Source
Revision
174328
Author
[email protected]
Date
2014-10-05 04:28:30 -0700 (Sun, 05 Oct 2014)

Log Message

[GTK] Fix build when DRAG_SUPPORT is disabled
https://bugs.webkit.org/show_bug.cgi?id=137361

Patch by Lorenzo Tilve <[email protected]> on 2014-10-05
Reviewed by Carlos Garcia Campos.

Flag out unbuildable code without DRAG_SUPPORT.

Source/WebCore:

* platform/gtk/GtkDragAndDropHelper.cpp:
* platform/gtk/GtkDragAndDropHelper.h:

Source/WebKit2:

* Shared/gtk/ArgumentCodersGtk.cpp:
* Shared/gtk/ArgumentCodersGtk.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* UIProcess/PageClient.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (174327 => 174328)


--- trunk/Source/WebCore/ChangeLog	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebCore/ChangeLog	2014-10-05 11:28:30 UTC (rev 174328)
@@ -1,3 +1,15 @@
+2014-10-05  Lorenzo Tilve  <[email protected]>
+
+        [GTK] Fix build when DRAG_SUPPORT is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=137361
+
+        Reviewed by Carlos Garcia Campos.
+
+        Flag out unbuildable code without DRAG_SUPPORT.
+
+        * platform/gtk/GtkDragAndDropHelper.cpp:
+        * platform/gtk/GtkDragAndDropHelper.h:
+
 2014-10-05  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Do not generate a symlink in derived sources for every header in WebCore/bindings/gobject

Modified: trunk/Source/WebCore/platform/gtk/GtkDragAndDropHelper.cpp (174327 => 174328)


--- trunk/Source/WebCore/platform/gtk/GtkDragAndDropHelper.cpp	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebCore/platform/gtk/GtkDragAndDropHelper.cpp	2014-10-05 11:28:30 UTC (rev 174328)
@@ -19,6 +19,8 @@
 #include "config.h"
 #include "GtkDragAndDropHelper.h"
 
+#if ENABLE(DRAG_SUPPORT)
+
 #include "ClipboardUtilitiesGtk.h"
 #include "DragData.h"
 #include "GtkUtilities.h"
@@ -166,3 +168,5 @@
 }
 
 } // namespace WebCore
+
+#endif // ENABLE(DRAG_SUPPORT)

Modified: trunk/Source/WebCore/platform/gtk/GtkDragAndDropHelper.h (174327 => 174328)


--- trunk/Source/WebCore/platform/gtk/GtkDragAndDropHelper.h	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebCore/platform/gtk/GtkDragAndDropHelper.h	2014-10-05 11:28:30 UTC (rev 174328)
@@ -19,6 +19,8 @@
 #ifndef GtkDragAndDropHelper_h
 #define GtkDragAndDropHelper_h
 
+#if ENABLE(DRAG_SUPPORT)
+
 #include "DataObjectGtk.h"
 #include <wtf/FastMalloc.h>
 #include <wtf/Noncopyable.h>
@@ -57,4 +59,6 @@
 
 }
 
+#endif // ENABLE(DRAG_SUPPORT)
+
 #endif // DataObjectGtk_h

Modified: trunk/Source/WebKit2/ChangeLog (174327 => 174328)


--- trunk/Source/WebKit2/ChangeLog	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebKit2/ChangeLog	2014-10-05 11:28:30 UTC (rev 174328)
@@ -1,3 +1,20 @@
+2014-10-05  Lorenzo Tilve  <[email protected]>
+
+        [GTK] Fix build when DRAG_SUPPORT is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=137361
+
+        Reviewed by Carlos Garcia Campos.
+
+        Flag out unbuildable code without DRAG_SUPPORT.
+
+        * Shared/gtk/ArgumentCodersGtk.cpp:
+        * Shared/gtk/ArgumentCodersGtk.h:
+        * UIProcess/API/gtk/PageClientImpl.cpp:
+        * UIProcess/API/gtk/PageClientImpl.h:
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewBaseConstructed):
+        * UIProcess/PageClient.h:
+
 2014-10-05  Carlos Garcia Campos  <[email protected]>
 
         [GTK] The new web inspector can't be docked again once undocked

Modified: trunk/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp (174327 => 174328)


--- trunk/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp	2014-10-05 11:28:30 UTC (rev 174328)
@@ -187,6 +187,7 @@
     return true;
 }
 
+#if ENABLE(DRAG_SUPPORT)
 void ArgumentCoder<DragData>::encode(ArgumentEncoder& encoder, const DragData& dragData)
 {
     encoder << dragData.clientPosition();
@@ -233,6 +234,7 @@
 
     return true;
 }
+#endif // ENABLE(DRAG_SUPPORT)
 
 static void encodeGKeyFile(ArgumentEncoder& encoder, GKeyFile* keyFile)
 {

Modified: trunk/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.h (174327 => 174328)


--- trunk/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.h	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.h	2014-10-05 11:28:30 UTC (rev 174328)
@@ -39,10 +39,12 @@
 
 namespace IPC {
 
+#if ENABLE(DRAG_SUPPORT)
 template<> struct ArgumentCoder<WebCore::DragData> {
     static void encode(ArgumentEncoder&, const WebCore::DragData&);
     static bool decode(ArgumentDecoder&, WebCore::DragData&);
 };
+#endif
 
 void encode(ArgumentEncoder&, GtkPrintSettings*);
 bool decode(ArgumentDecoder&, GRefPtr<GtkPrintSettings>&);

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (174327 => 174328)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2014-10-05 11:28:30 UTC (rev 174328)
@@ -268,10 +268,12 @@
     webkitWebViewBaseUpdateTextInputState(WEBKIT_WEB_VIEW_BASE(m_viewWidget));
 }
 
+#if ENABLE(DRAG_SUPPORT)
 void PageClientImpl::startDrag(const WebCore::DragData& dragData, PassRefPtr<ShareableBitmap> dragImage)
 {
     webkitWebViewBaseStartDrag(WEBKIT_WEB_VIEW_BASE(m_viewWidget), dragData, dragImage);
 }
+#endif
 
 void PageClientImpl::handleDownloadRequest(DownloadProxy* download)
 {

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (174327 => 174328)


--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2014-10-05 11:28:30 UTC (rev 174328)
@@ -96,7 +96,9 @@
     virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate) override;
     virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, const AtomicString&, Vector<WTF::String>&) override;
     virtual void updateTextInputState() override;
+#if ENABLE(DRAG_SUPPORT)
     virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage) override;
+#endif
 
     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&) override;
     virtual void exitAcceleratedCompositingMode() override;

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (174327 => 174328)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-10-05 11:28:30 UTC (rev 174328)
@@ -101,7 +101,9 @@
     GtkClickCounter clickCounter;
     CString tooltipText;
     IntRect tooltipArea;
+#if ENABLE(DRAG_SUPPORT)
     GtkDragAndDropHelper dragAndDropHelper;
+#endif
     DragIcon dragIcon;
 #if !GTK_CHECK_VERSION(3, 13, 4)
     IntSize resizerSize;
@@ -423,7 +425,9 @@
 
     WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(object)->priv;
     priv->pageClient = PageClientImpl::create(viewWidget);
+#if ENABLE(DRAG_SUPPORT)
     priv->dragAndDropHelper.setWidget(viewWidget);
+#endif
 
 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(X11)
     GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());

Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (174327 => 174328)


--- trunk/Source/WebKit2/UIProcess/PageClient.h	2014-10-05 08:17:51 UTC (rev 174327)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h	2014-10-05 11:28:30 UTC (rev 174328)
@@ -158,7 +158,7 @@
     virtual void didChangeContentSize(const WebCore::IntSize&) = 0;
 #endif
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
     virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage) = 0;
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to