Title: [166779] trunk/Source/WebKit2
- Revision
- 166779
- Author
- [email protected]
- Date
- 2014-04-04 05:35:47 -0700 (Fri, 04 Apr 2014)
Log Message
[GTK][CMake] Use a stricter check for the HAVE_GTK_UNIX_PRINTING define
https://bugs.webkit.org/show_bug.cgi?id=131226
Reviewed by Carlos Garcia Campos.
#cmakedefine01 will define HAVE_GTK_UNIX_PRINTING to 0 instead of #undef'ining it. This
means that simple checks like #ifdef HAVE_GTK_UNIX_PRINTING will always be true -- we
actually need to check if the value is set to 1, which is precisely what the HAVE() macro
does, so start using it.
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print):
* WebProcess/WebPage/gtk/PrinterListGtk.cpp:
* WebProcess/WebPage/gtk/PrinterListGtk.h:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::create):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (166778 => 166779)
--- trunk/Source/WebKit2/ChangeLog 2014-04-04 10:53:21 UTC (rev 166778)
+++ trunk/Source/WebKit2/ChangeLog 2014-04-04 12:35:47 UTC (rev 166779)
@@ -1,3 +1,23 @@
+2014-04-04 Raphael Kubo da Costa <[email protected]>
+
+ [GTK][CMake] Use a stricter check for the HAVE_GTK_UNIX_PRINTING define
+ https://bugs.webkit.org/show_bug.cgi?id=131226
+
+ Reviewed by Carlos Garcia Campos.
+
+ #cmakedefine01 will define HAVE_GTK_UNIX_PRINTING to 0 instead of #undef'ining it. This
+ means that simple checks like #ifdef HAVE_GTK_UNIX_PRINTING will always be true -- we
+ actually need to check if the value is set to 1, which is precisely what the HAVE() macro
+ does, so start using it.
+
+ * UIProcess/API/gtk/WebKitPrintOperation.cpp:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::print):
+ * WebProcess/WebPage/gtk/PrinterListGtk.cpp:
+ * WebProcess/WebPage/gtk/PrinterListGtk.h:
+ * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
+ (WebKit::WebPrintOperationGtk::create):
+
2014-04-03 Chris Fleizach <[email protected]>
AX: iOS does not need to spin the run loop on synchronous message calls
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp (166778 => 166779)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp 2014-04-04 10:53:21 UTC (rev 166778)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp 2014-04-04 12:35:47 UTC (rev 166779)
@@ -31,7 +31,7 @@
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
-#ifdef HAVE_GTK_UNIX_PRINTING
+#if HAVE(GTK_UNIX_PRINTING)
#include <gtk/gtkunixprint.h>
#endif
@@ -207,7 +207,7 @@
G_TYPE_POINTER);
}
-#ifdef HAVE_GTK_UNIX_PRINTING
+#if HAVE(GTK_UNIX_PRINTING)
static WebKitPrintOperationResponse webkitPrintOperationRunDialog(WebKitPrintOperation* printOperation, GtkWindow* parent)
{
GtkPrintUnixDialog* printDialog = GTK_PRINT_UNIX_DIALOG(gtk_print_unix_dialog_new(0, parent));
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (166778 => 166779)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-04-04 10:53:21 UTC (rev 166778)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-04-04 12:35:47 UTC (rev 166779)
@@ -593,7 +593,7 @@
WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);
ASSERT(webFrame);
-#if PLATFORM(GTK) && defined(HAVE_GTK_UNIX_PRINTING)
+#if PLATFORM(GTK) && HAVE(GTK_UNIX_PRINTING)
// When printing synchronously in GTK+ we need to make sure that we have a list of Printers before starting the print operation.
// Getting the list of printers is done synchronously by GTK+, but using a nested main loop that might process IPC messages
// comming from the UI process like EndPrinting. When the EndPriting message is received while the printer list is being populated,
Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.cpp (166778 => 166779)
--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.cpp 2014-04-04 10:53:21 UTC (rev 166778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.cpp 2014-04-04 12:35:47 UTC (rev 166779)
@@ -26,7 +26,7 @@
#include "config.h"
#include "PrinterListGtk.h"
-#ifdef HAVE_GTK_UNIX_PRINTING
+#if HAVE(GTK_UNIX_PRINTING)
#include <gtk/gtkunixprint.h>
@@ -81,4 +81,4 @@
} // namespace WebKit
-#endif // HAVE_GTK_UNIX_PRINTING
+#endif // HAVE(GTK_UNIX_PRINTING)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.h (166778 => 166779)
--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.h 2014-04-04 10:53:21 UTC (rev 166778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.h 2014-04-04 12:35:47 UTC (rev 166779)
@@ -26,7 +26,7 @@
#ifndef PrinterListGtk_h
#define PrinterListGtk_h
-#ifdef HAVE_GTK_UNIX_PRINTING
+#if HAVE(GTK_UNIX_PRINTING)
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
@@ -57,6 +57,6 @@
} // namespace WebKit
-#endif // HAVE_GTK_UNIX_PRINTING
+#endif // HAVE(GTK_UNIX_PRINTING)
#endif // WebPrintOperationGtk_h
Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp (166778 => 166779)
--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp 2014-04-04 10:53:21 UTC (rev 166778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp 2014-04-04 12:35:47 UTC (rev 166779)
@@ -44,7 +44,7 @@
#include <wtf/Vector.h>
#include <wtf/gobject/GUniquePtr.h>
-#ifdef HAVE_GTK_UNIX_PRINTING
+#if HAVE(GTK_UNIX_PRINTING)
#include "PrinterListGtk.h"
#include <cairo-pdf.h>
#include <cairo-ps.h>
@@ -53,7 +53,7 @@
namespace WebKit {
-#ifdef HAVE_GTK_UNIX_PRINTING
+#if HAVE(GTK_UNIX_PRINTING)
class WebPrintOperationGtkUnix final: public WebPrintOperationGtk {
public:
WebPrintOperationGtkUnix(WebPage* page, const PrintInfo& printInfo)
@@ -380,7 +380,7 @@
PassRefPtr<WebPrintOperationGtk> WebPrintOperationGtk::create(WebPage* page, const PrintInfo& printInfo)
{
-#ifdef HAVE_GTK_UNIX_PRINTING
+#if HAVE(GTK_UNIX_PRINTING)
return adoptRef(new WebPrintOperationGtkUnix(page, printInfo));
#elif defined(G_OS_WIN32)
return adoptRef(new WebPrintOperationGtkWin32(page, printInfo));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes