Diff
Modified: trunk/ChangeLog (125376 => 125377)
--- trunk/ChangeLog 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/ChangeLog 2012-08-12 16:52:54 UTC (rev 125377)
@@ -1,3 +1,12 @@
+2012-08-12 Loïc Yhuel <[email protected]>
+
+ [Qt] Make it possible to build without QtTest/QtPrintSupport
+ https://bugs.webkit.org/show_bug.cgi?id=93492
+
+ Reviewed by Tor Arne Vestbø.
+
+ * Source/QtWebKit.pro: Disable tests if no testlib
+
2012-08-10 Rob Buis <[email protected]>
[BlackBerry] Enable relro link option for JSC executable
Modified: trunk/Source/QtWebKit.pro (125376 => 125377)
--- trunk/Source/QtWebKit.pro 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Source/QtWebKit.pro 2012-08-12 16:52:54 UTC (rev 125377)
@@ -26,8 +26,10 @@
contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += declarative
!no_webkit1 {
- tests.file = tests.pri
- SUBDIRS += tests
+ contains(DEFINES, HAVE_QTTESTLIB=1) {
+ tests.file = tests.pri
+ SUBDIRS += tests
+ }
examples.file = WebKit/qt/examples/examples.pro
examples.CONFIG += no_default_target
Modified: trunk/Source/WebKit/ChangeLog (125376 => 125377)
--- trunk/Source/WebKit/ChangeLog 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Source/WebKit/ChangeLog 2012-08-12 16:52:54 UTC (rev 125377)
@@ -1,3 +1,12 @@
+2012-08-12 Loïc Yhuel <[email protected]>
+
+ [Qt] Make it possible to build without QtTest/QtPrintSupport
+ https://bugs.webkit.org/show_bug.cgi?id=93492
+
+ Reviewed by Tor Arne Vestbø.
+
+ * WebKit1.pri: Optional printsupport
+
2012-08-10 Joshua Netterfield <[email protected]>
[WebGL] Add support for EXT_robustness
Modified: trunk/Source/WebKit/WebKit1.pri (125376 => 125377)
--- trunk/Source/WebKit/WebKit1.pri 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Source/WebKit/WebKit1.pri 2012-08-12 16:52:54 UTC (rev 125377)
@@ -39,8 +39,9 @@
plugin_backend_xlib: PKGCONFIG += x11
-QT += network widgets printsupport
+QT += network widgets
contains(DEFINES, HAVE_QTQUICK=1): QT += quick
+contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1)|contains(DEFINES, ENABLE_WEBGL=1) {
QT *= opengl
Modified: trunk/Source/WebKit/qt/Api/qwebframe.cpp (125376 => 125377)
--- trunk/Source/WebKit/qt/Api/qwebframe.cpp 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Source/WebKit/qt/Api/qwebframe.cpp 2012-08-12 16:52:54 UTC (rev 125377)
@@ -93,7 +93,9 @@
#include <qevent.h>
#include <qfileinfo.h>
#include <qpainter.h>
+#if HAVE(QTPRINTSUPPORT)
#include <qprinter.h>
+#endif
#include <qregion.h>
#include <qnetworkrequest.h>
@@ -1427,6 +1429,7 @@
*/
void QWebFrame::print(QPrinter *printer) const
{
+#if HAVE(QTPRINTSUPPORT)
QPainter painter;
if (!painter.begin(printer))
return;
@@ -1514,6 +1517,7 @@
}
printContext.end();
+#endif // HAVE(PRINTSUPPORT)
}
#endif // QT_NO_PRINTER
Modified: trunk/Source/WebKit/qt/Api/qwebview.cpp (125376 => 125377)
--- trunk/Source/WebKit/qt/Api/qwebview.cpp 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Source/WebKit/qt/Api/qwebview.cpp 2012-08-12 16:52:54 UTC (rev 125377)
@@ -30,7 +30,9 @@
#include "qbitmap.h"
#include "qevent.h"
#include "qpainter.h"
+#if HAVE(QTPRINTSUPPORT)
#include "qprinter.h"
+#endif
#include "qdir.h"
#include "qfile.h"
#ifndef QT_NO_ACCESSIBILITY
@@ -746,7 +748,7 @@
*/
void QWebView::print(QPrinter *printer) const
{
-#ifndef QT_NO_PRINTER
+#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
page()->mainFrame()->print(printer);
#endif
}
Modified: trunk/Source/WebKit/qt/ChangeLog (125376 => 125377)
--- trunk/Source/WebKit/qt/ChangeLog 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-08-12 16:52:54 UTC (rev 125377)
@@ -1,3 +1,15 @@
+2012-08-12 Loïc Yhuel <[email protected]>
+
+ [Qt] Make it possible to build without QtTest/QtPrintSupport
+ https://bugs.webkit.org/show_bug.cgi?id=93492
+
+ Reviewed by Tor Arne Vestbø.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::print): Does nothing if no printsupport
+ * Api/qwebview.cpp:
+ (QWebView::print): Does nothing if no printsupport
+
2012-08-11 Pierre Rossi <[email protected]>
[Qt] Add support for HTML5 state object history API in FrameLoaderClientQt
Modified: trunk/Tools/ChangeLog (125376 => 125377)
--- trunk/Tools/ChangeLog 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/ChangeLog 2012-08-12 16:52:54 UTC (rev 125377)
@@ -1,3 +1,23 @@
+2012-08-12 Loïc Yhuel <[email protected]>
+
+ [Qt] Make it possible to build without QtTest/QtPrintSupport
+ https://bugs.webkit.org/show_bug.cgi?id=93492
+
+ Reviewed by Tor Arne Vestbø.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro: Optional printsupport
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore):
+ (WebCore::DumpRenderTree::dryRunPrint): Does nothing if no printsupport
+ * QtTestBrowser/QtTestBrowser.pro: Optional printsupport
+ * QtTestBrowser/launcherwindow.cpp:
+ (LauncherWindow::createChrome): No print menu if no printsupport
+ (LauncherWindow::print): Does nothing if no printsupport
+ * QtTestBrowser/launcherwindow.h:
+ * Tools.pro: Disable DRT/WTR if QtTest not present
+ * qmake/mkspecs/features/default_pre.prf: printsupport no more mandatory
+ * qmake/mkspecs/features/features.prf: Qt module availability tests
+
2012-08-12 Csaba Osztrogonác <[email protected]>
master.cfg unittest cleanup: Show DeprecationWarnings with python >= 2.7 too
Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro (125376 => 125377)
--- trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro 2012-08-12 16:52:54 UTC (rev 125377)
@@ -18,7 +18,8 @@
$${ROOT_WEBKIT_DIR}/Source/WebKit/qt/WebCoreSupport \
$${ROOT_WEBKIT_DIR}/Source/WTF
-QT = core gui network testlib webkit widgets printsupport
+QT = core gui network testlib webkit widgets
+contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
macx: QT += xml
contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig
Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp (125376 => 125377)
--- trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp 2012-08-12 16:52:54 UTC (rev 125377)
@@ -57,7 +57,7 @@
#include <QNetworkRequest>
#include <QPaintDevice>
#include <QPaintEngine>
-#ifndef QT_NO_PRINTER
+#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
#include <QPrinter>
#endif
#include <QProgressBar>
@@ -110,7 +110,7 @@
#endif
-#ifndef QT_NO_PRINTER
+#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
class NullPrinter : public QPrinter {
public:
class NullPaintEngine : public QPaintEngine {
@@ -500,7 +500,7 @@
void DumpRenderTree::dryRunPrint(QWebFrame* frame)
{
-#ifndef QT_NO_PRINTER
+#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
NullPrinter printer;
frame->print(&printer);
#endif
Modified: trunk/Tools/QtTestBrowser/QtTestBrowser.pro (125376 => 125377)
--- trunk/Tools/QtTestBrowser/QtTestBrowser.pro 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/QtTestBrowser/QtTestBrowser.pro 2012-08-12 16:52:54 UTC (rev 125377)
@@ -42,7 +42,8 @@
DESTDIR = $$ROOT_BUILD_DIR/bin
-QT += network webkit printsupport widgets
+QT += network webkit widgets
+contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
macx:QT += xml
Modified: trunk/Tools/QtTestBrowser/launcherwindow.cpp (125376 => 125377)
--- trunk/Tools/QtTestBrowser/launcherwindow.cpp 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/QtTestBrowser/launcherwindow.cpp 2012-08-12 16:52:54 UTC (rev 125377)
@@ -51,6 +51,9 @@
#ifndef QT_NO_SHORTCUT
#include <QMenuBar>
#endif
+#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
+#include <QPrintPreviewDialog>
+#endif
#include <QSlider>
#include <QSplitter>
#include <QStatusBar>
@@ -237,7 +240,7 @@
fileMenu->addAction("Close Window", this, SLOT(close()), QKeySequence::Close);
fileMenu->addSeparator();
fileMenu->addAction("Take Screen Shot...", this, SLOT(screenshot()));
-#ifndef QT_NO_PRINTER
+#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
fileMenu->addAction(tr("Print..."), this, SLOT(print()), QKeySequence::Print);
#endif
fileMenu->addSeparator();
@@ -724,7 +727,7 @@
void LauncherWindow::print()
{
-#if !defined(QT_NO_PRINTER)
+#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
QPrintPreviewDialog dlg(this);
connect(&dlg, SIGNAL(paintRequested(QPrinter*)),
page()->mainFrame(), SLOT(print(QPrinter*)));
Modified: trunk/Tools/QtTestBrowser/launcherwindow.h (125376 => 125377)
--- trunk/Tools/QtTestBrowser/launcherwindow.h 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/QtTestBrowser/launcherwindow.h 2012-08-12 16:52:54 UTC (rev 125377)
@@ -39,10 +39,6 @@
#include <QtOpenGL/QGLWidget>
#endif
-#if !defined(QT_NO_PRINTER)
-#include <QPrintPreviewDialog>
-#endif
-
#include <QDebug>
#include <cstdio>
Modified: trunk/Tools/Tools.pro (125376 => 125377)
--- trunk/Tools/Tools.pro 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/Tools.pro 2012-08-12 16:52:54 UTC (rev 125377)
@@ -9,13 +9,13 @@
!no_webkit1 {
SUBDIRS += QtTestBrowser/QtTestBrowser.pro
- SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
+ contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
SUBDIRS += DumpRenderTree/qt/ImageDiff.pro
}
!no_webkit2 {
# WTR's InjectedBundle depends currently on WK1's DumpRenderTreeSupport
- !no_webkit1:contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
+ !no_webkit1:contains(DEFINES, HAVE_QTQUICK=1):contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
SUBDIRS += MiniBrowser/qt/raw/MiniBrowserRaw.pro
Modified: trunk/Tools/qmake/mkspecs/features/default_pre.prf (125376 => 125377)
--- trunk/Tools/qmake/mkspecs/features/default_pre.prf 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/qmake/mkspecs/features/default_pre.prf 2012-08-12 16:52:54 UTC (rev 125377)
@@ -78,8 +78,8 @@
!haveQt(5):!recursive_include: error("Building WebKit with Qt versions older than 5.0 is not supported.")
-!haveQtModule(widgets)|!haveQtModule(printsupport) {
- root_project_file: message("WebKit1 requires the QtWidgets and QtPrintSupport modules. Disabling WebKit1.")
+!haveQtModule(widgets) {
+ root_project_file: message("WebKit1 requires the QtWidgets module. Disabling WebKit1.")
CONFIG += no_webkit1
}
Modified: trunk/Tools/qmake/mkspecs/features/features.prf (125376 => 125377)
--- trunk/Tools/qmake/mkspecs/features/features.prf 2012-08-12 15:57:25 UTC (rev 125376)
+++ trunk/Tools/qmake/mkspecs/features/features.prf 2012-08-12 16:52:54 UTC (rev 125377)
@@ -48,6 +48,18 @@
haveQtModule(quick): DEFINES += HAVE_QTQUICK=1
}
+!contains(DEFINES, HAVE_QTPRINTSUPPORT=.) {
+ haveQtModule(printsupport): DEFINES += HAVE_QTPRINTSUPPORT=1
+}
+
+!contains(DEFINES, HAVE_QTTESTLIB=.) {
+ haveQtModule(testlib) {
+ DEFINES += HAVE_QTTESTLIB=1
+ } else {
+ message("Missing QtTest module, disabling DumpRenderTree, WebKitTestRunner and tests")
+ }
+}
+
# We need libxml2 config test to determine to use libxml2 or not
!contains(DEFINES, WTF_USE_LIBXML2=.) {
config_libxml2: DEFINES += WTF_USE_LIBXML2=1