2011-01-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
authorlaszlo.1.gombos@nokia.com <laszlo.1.gombos@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jan 2011 02:50:44 +0000 (02:50 +0000)
committerlaszlo.1.gombos@nokia.com <laszlo.1.gombos@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jan 2011 02:50:44 +0000 (02:50 +0000)
        Reviewed by Csaba Osztrogonác.

        [Qt] Baseline qt_minimal configuration
        https://bugs.webkit.org/show_bug.cgi?id=51313

        * WebKit.pri: List the supported QT_NO_FEATURE flags
        under qt_minimal configuration.
2011-01-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Csaba Osztrogonác.

        [Qt] Baseline qt_minimal configuration
        https://bugs.webkit.org/show_bug.cgi?id=51313

        No new tests as there is no new functionality.

        * platform/graphics/qt/GraphicsLayerQt.cpp: Fix the location of the
        QT_NO_ANIMATION guard.

        * platform/qt/WheelEventQt.cpp:
        (WebCore::PlatformWheelEvent::applyDelta): Fix the location of the
        QT_NO_WHEELEVENT guard.
2011-01-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Csaba Osztrogonác.

        [Qt] Baseline qt_minimal configuration
        https://bugs.webkit.org/show_bug.cgi?id=51313

        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
        (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting): Add
        QT_NO_UNDOSTACK guard.

        * QtTestBrowser/launcherwindow.cpp:
        (LauncherWindow::createChrome): Add QT_NO_SHORTCUT and QT_NO_PRINTER
        guards.
        (LauncherWindow::applyZoom): Add QT_NO_ANIMATION guard.
        (LauncherWindow::screenshot): Add QT_NO_FILEDIALOG guard.
        (LauncherWindow::selectElements): Add QT_NO_INPUTDIALOG guard.
        (LauncherWindow::showUserAgentDialog): Add QT_NO_COMBOBOX guard.

        * QtTestBrowser/launcherwindow.h:
        * QtTestBrowser/locationedit.cpp: Add QT_NO_INPUTDIALOG guard.
        * QtTestBrowser/locationedit.h: Ditto.

        * QtTestBrowser/mainwindow.cpp:
        (MainWindow::buildUI): Add QT_NO_INPUTDIALOG, QT_NO_SHORTCUT and
        QT_NO_UNDOSTACK guards.
        (MainWindow::setAddressUrl): Add QT_NO_INPUTDIALOG guard.
        (MainWindow::changeLocation): Ditto.
        (MainWindow::openFile): Add QT_NO_FILEDIALOG guard.
        (MainWindow::openLocation): Add QT_NO_INPUTDIALOG guard.

        * QtTestBrowser/webpage.cpp:
        (WebPage::openUrlInDefaultBrowser): Add QT_NO_DESKTOPSERVICES guard.
        (WebPage::authenticationRequired): Add QT_NO_LINEEDIT guard.

        * QtTestBrowser/webview.cpp:
        (WebViewGraphicsBased::animatedFlip): Add QT_NO_ANIMATION guard.
        (WebViewGraphicsBased::animatedYFlip): Ditto.
2011-01-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Csaba Osztrogonác.

        [Qt] Baseline qt_minimal configuration
        https://bugs.webkit.org/show_bug.cgi?id=51313

        * WebCoreSupport/PopupMenuQt.cpp:
        (WebCore::PopupMenuQt::show): Add QT_NO_COMBOBOX guard.

        * WebCoreSupport/QtFallbackWebPopup.cpp:
        (WebCore::QtFallbackWebPopup::populate): Add QT_NO_TOOLTIP guard.

        * tests/qwebframe/tst_qwebframe.cpp: Add QT_NO_COMBOBOX guard.
        * tests/qwebpage/tst_qwebpage.cpp:
        (PluginPage::createPlugin): Add QT_NO_INPUTDIALOG guard.

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

20 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
Source/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
Source/WebCore/platform/qt/WheelEventQt.cpp
Tools/ChangeLog
Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
Tools/QtTestBrowser/launcherwindow.cpp
Tools/QtTestBrowser/launcherwindow.h
Tools/QtTestBrowser/locationedit.cpp
Tools/QtTestBrowser/locationedit.h
Tools/QtTestBrowser/mainwindow.cpp
Tools/QtTestBrowser/webpage.cpp
Tools/QtTestBrowser/webview.cpp
WebKit.pri
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

index 52d462d9b06dc26230c074744b03cfe0087515e5..563a138e4fe82da53eddf14755ffc00cd3be16f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
+
+        Reviewed by Csaba Osztrogonác.
+
+        [Qt] Baseline qt_minimal configuration
+        https://bugs.webkit.org/show_bug.cgi?id=51313
+
+        * WebKit.pri: List the supported QT_NO_FEATURE flags
+        under qt_minimal configuration.
+
 2011-01-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Reviewed by Eric Seidel.
index 0e9a4f69b9ba27b9a0ce01383fab952be4ce8b87..9a5e9b74796b0b86d69e62a41664349252f8e5ce 100644 (file)
@@ -1,3 +1,19 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
+
+        Reviewed by Csaba Osztrogonác.
+
+        [Qt] Baseline qt_minimal configuration
+        https://bugs.webkit.org/show_bug.cgi?id=51313
+
+        No new tests as there is no new functionality.
+
+        * platform/graphics/qt/GraphicsLayerQt.cpp: Fix the location of the
+        QT_NO_ANIMATION guard.
+
+        * platform/qt/WheelEventQt.cpp:
+        (WebCore::PlatformWheelEvent::applyDelta): Fix the location of the
+        QT_NO_WHEELEVENT guard.
+
 2011-01-10  Joe Mason  <jmason@rim.com>
 
         Reviewed by Alexey Proskuryakov.
index f31844a724386999e0a1e8fce442b2714e74568d..cfb9059cd46191c8cafb76830282a9ba74b845fc 100644 (file)
@@ -1375,6 +1375,7 @@ static inline qreal applyTimingFunction(const TimingFunction* timingFunction, qr
 
 // Helper functions to safely get a value out of WebCore's AnimationValue*.
 
+#ifndef QT_NO_ANIMATION
 static void webkitAnimationToQtAnimationValue(const AnimationValue* animationValue, TransformOperations& transformOperations)
 {
     transformOperations = TransformOperations();
@@ -1390,7 +1391,6 @@ static void webkitAnimationToQtAnimationValue(const AnimationValue* animationVal
     realValue = animationValue ? static_cast<const FloatAnimationValue*>(animationValue)->value() : 0;
 }
 
-#ifndef QT_NO_ANIMATION
 // We put a bit of the functionality in a base class to allow casting and to save some code size.
 
 class AnimationQtBase : public QAbstractAnimation {
index 959e74a20b23a6805065c46d3902e60ccfcb460d..f3e70233c6f0ae93559a7cc1c6bd25fc42d58880 100644 (file)
@@ -91,6 +91,6 @@ void NetworkStateNotifier::setNetworkAccessAllowed(bool isAllowed)
 
 } // namespace WebCore
 
-#endif
-
 #include "moc_NetworkStateNotifierPrivate.cpp"
+
+#endif
index 57a7ebcd826b78f40cd629b691f72206f469951a..aa61d9190be3b83bb15cada995a96e877163855f 100644 (file)
@@ -48,10 +48,10 @@ void PlatformWheelEvent::applyDelta(int delta, Qt::Orientation orientation)
     m_wheelTicksX = m_deltaX;
     m_wheelTicksY = m_deltaY;
 
+#ifndef QT_NO_WHEELEVENT
     // Use the same single scroll step as QTextEdit
     // (in QTextEditPrivate::init [h,v]bar->setSingleStep)
     static const float cDefaultQtScrollStep = 20.f;
-#ifndef QT_NO_WHEELEVENT
     m_deltaX *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
     m_deltaY *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
 #endif
index 538368caebb93dd650a9863bd5b31f7d7387f611..7a3a620c422ccea73e45de98aaceb38ebdc61842 100644 (file)
@@ -1,3 +1,42 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
+
+        Reviewed by Csaba Osztrogonác.
+
+        [Qt] Baseline qt_minimal configuration
+        https://bugs.webkit.org/show_bug.cgi?id=51313
+
+        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+        (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting): Add
+        QT_NO_UNDOSTACK guard.
+
+        * QtTestBrowser/launcherwindow.cpp:
+        (LauncherWindow::createChrome): Add QT_NO_SHORTCUT and QT_NO_PRINTER
+        guards.
+        (LauncherWindow::applyZoom): Add QT_NO_ANIMATION guard.
+        (LauncherWindow::screenshot): Add QT_NO_FILEDIALOG guard.
+        (LauncherWindow::selectElements): Add QT_NO_INPUTDIALOG guard.
+        (LauncherWindow::showUserAgentDialog): Add QT_NO_COMBOBOX guard.
+
+        * QtTestBrowser/launcherwindow.h:
+        * QtTestBrowser/locationedit.cpp: Add QT_NO_INPUTDIALOG guard.
+        * QtTestBrowser/locationedit.h: Ditto.
+
+        * QtTestBrowser/mainwindow.cpp:
+        (MainWindow::buildUI): Add QT_NO_INPUTDIALOG, QT_NO_SHORTCUT and
+        QT_NO_UNDOSTACK guards.
+        (MainWindow::setAddressUrl): Add QT_NO_INPUTDIALOG guard.
+        (MainWindow::changeLocation): Ditto.
+        (MainWindow::openFile): Add QT_NO_FILEDIALOG guard.
+        (MainWindow::openLocation): Add QT_NO_INPUTDIALOG guard.
+
+        * QtTestBrowser/webpage.cpp:
+        (WebPage::openUrlInDefaultBrowser): Add QT_NO_DESKTOPSERVICES guard.
+        (WebPage::authenticationRequired): Add QT_NO_LINEEDIT guard.
+
+        * QtTestBrowser/webview.cpp:
+        (WebViewGraphicsBased::animatedFlip): Add QT_NO_ANIMATION guard.
+        (WebViewGraphicsBased::animatedYFlip): Ditto.
+
 2011-01-10  Sam Weinig  <sam@webkit.org>
 
         Fix build.
index 935a307a15bf703df0bf6f046e60d89b0c87f7c6..5fcc6020c8e769880efd48197be16370e46e7677 100644 (file)
@@ -540,7 +540,9 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting()
     closeRemainingWindows();
 
     m_page->resetSettings();
+#ifndef QT_NO_UNDOSTACK
     m_page->undoStack()->clear();
+#endif
     m_page->mainFrame()->setZoomFactor(1.0);
     clearHistory(m_page);
     DumpRenderTreeSupportQt::clearFrameName(m_page->mainFrame());
index 1a4d28f670837cd6fc1a826990f6c93c6eab2740..8a4b884a8e18a5bffe68fc87c215143b5ebca198 100644 (file)
@@ -163,6 +163,7 @@ void LauncherWindow::applyPrefs()
 
 void LauncherWindow::createChrome()
 {
+#ifndef QT_NO_SHORTCUT
     QMenu* fileMenu = menuBar()->addMenu("&File");
     fileMenu->addAction("New Window", this, SLOT(newWindow()), QKeySequence::New);
     fileMenu->addAction(tr("Open File..."), this, SLOT(openFile()), QKeySequence::Open);
@@ -170,7 +171,9 @@ void LauncherWindow::createChrome()
     fileMenu->addAction("Close Window", this, SLOT(close()), QKeySequence::Close);
     fileMenu->addSeparator();
     fileMenu->addAction("Take Screen Shot...", this, SLOT(screenshot()));
+#ifndef QT_NO_PRINTER
     fileMenu->addAction(tr("Print..."), this, SLOT(print()), QKeySequence::Print);
+#endif
     fileMenu->addSeparator();
     fileMenu->addAction("Quit", QApplication::instance(), SLOT(closeAllWindows()), QKeySequence(Qt::CTRL | Qt::Key_Q));
 
@@ -368,6 +371,7 @@ void LauncherWindow::createChrome()
     showFPS->setEnabled(isGraphicsBased());
     showFPS->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
     showFPS->setChecked(m_windowOptions.showFrameRate);
+#endif
 }
 
 bool LauncherWindow::isGraphicsBased() const
@@ -547,6 +551,7 @@ void LauncherWindow::zoomAnimationFinished()
 
 void LauncherWindow::applyZoom()
 {
+#ifndef QT_NO_ANIMATION
     if (isGraphicsBased() && page()->settings()->testAttribute(QWebSettings::TiledBackingStoreEnabled)) {
         QGraphicsWebView* view = static_cast<WebViewGraphicsBased*>(m_view)->graphicsWebView();
         view->setTiledBackingStoreFrozen(true);
@@ -564,6 +569,7 @@ void LauncherWindow::applyZoom()
         m_zoomAnimation->start();
         return;
     }
+#endif
     page()->mainFrame()->setZoomFactor(qreal(m_currentZoom) / 100.0);
 }
 
@@ -620,12 +626,14 @@ void LauncherWindow::screenshot()
     label->show();
 #endif
 
+#ifndef QT_NO_FILEDIALOG
     QString fileName = QFileDialog::getSaveFileName(label, "Screenshot");
     if (!fileName.isEmpty()) {
         pixmap.save(fileName, "png");
         if (label)
             label->setWindowTitle(QString("Screenshot - Saved at %1").arg(fileName));
     }
+#endif
 
 #if defined(QT_CONFIGURED_WITH_OPENGL)
     toggleQGLWidgetViewport(m_windowOptions.useQGLWidgetViewport);
@@ -657,6 +665,7 @@ void LauncherWindow::dumpHtml()
 
 void LauncherWindow::selectElements()
 {
+#ifndef QT_NO_INPUTDIALOG
     bool ok;
     QString str = QInputDialog::getText(this, "Select elements", "Choose elements",
                                         QLineEdit::Normal, "a", &ok);
@@ -669,6 +678,7 @@ void LauncherWindow::selectElements()
         statusBar()->showMessage(QString("%1 element(s) selected").arg(result.count()), 5000);
 #endif
     }
+#endif
 }
 
 void LauncherWindow::setTouchMocking(bool on)
@@ -821,6 +831,7 @@ void LauncherWindow::showUserAgentDialog()
     QVBoxLayout* layout = new QVBoxLayout(dialog);
     dialog->setLayout(layout);
 
+#ifndef QT_NO_COMBOBOX
     QComboBox* combo = new QComboBox(dialog);
     combo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
     combo->setEditable(true);
@@ -829,6 +840,7 @@ void LauncherWindow::showUserAgentDialog()
 
     int index = combo->findText(page()->userAgentForUrl(QUrl()));
     combo->setCurrentIndex(index);
+#endif
 
     QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
             | QDialogButtonBox::Cancel, Qt::Horizontal, dialog);
@@ -836,11 +848,13 @@ void LauncherWindow::showUserAgentDialog()
     connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));
     layout->addWidget(buttonBox);
 
+#ifndef QT_NO_COMBOBOX
     if (dialog->exec() && !combo->currentText().isEmpty()) {
         page()->setUserAgent(combo->currentText());
         if (!items.contains(combo->currentText()))
             settings.setValue("CustomUserAgent", combo->currentText());
     }
+#endif
 
     delete dialog;
 }
index e35e7fdadb46911727256e539fa2af2169c6d082..f39faef0016809fd57608a49cfab15e1c74a1d4e 100644 (file)
@@ -75,6 +75,8 @@
 #undef KeyPress
 #endif
 
+class QPropertyAnimation;
+
 class WindowOptions {
 public:
     WindowOptions()
index a97f148523a20d3fd6a3563821c09ab374d84404..85bd2223dc585f3f0af21bb9778013adc37a9f04 100644 (file)
@@ -27,6 +27,8 @@
 
 #include "locationedit.h"
 
+#ifndef QT_NO_INPUTDIALOG
+
 LocationEdit::LocationEdit(QWidget* parent)
     : QLineEdit(parent)
     , m_progress(0)
@@ -78,3 +80,5 @@ void LocationEdit::focusInEvent(QFocusEvent* ev)
     QTimer::singleShot(0, this, SLOT(selectAll()));
 #endif
 }
+
+#endif
index e82920c1801e6541287b95c9d4e371bdda148685..752497e5ae3055d42dc048c0d6d332ad490f51bb 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef locationedit_h
 #define locationedit_h
 
+#ifndef QT_NO_INPUTDIALOG
 #include <QtGui>
 
 class LocationEdit : public QLineEdit {
@@ -52,3 +53,4 @@ private:
 };
 
 #endif
+#endif
index 756c3c2a06397521f270acfbde438f8544b671d0..9f4aec50a8642e8f16b581b57395456cb45dd18d 100644 (file)
@@ -66,6 +66,7 @@ void MainWindow::buildUI()
     m_toolBar->addAction(reloadAction);
     m_toolBar->addAction(page()->action(QWebPage::Stop));
 
+#ifndef QT_NO_INPUTDIALOG
     urlEdit = new LocationEdit(m_toolBar);
     urlEdit->setSizePolicy(QSizePolicy::Expanding, urlEdit->sizePolicy().verticalPolicy());
     connect(urlEdit, SIGNAL(returnPressed()), SLOT(changeLocation()));
@@ -79,19 +80,24 @@ void MainWindow::buildUI()
     m_toolBar->addWidget(urlEdit);
 #endif
 
-    connect(page()->mainFrame(), SIGNAL(titleChanged(const QString&)),
-            this, SLOT(setWindowTitle(const QString&)));
     connect(page()->mainFrame(), SIGNAL(urlChanged(QUrl)), this, SLOT(setAddressUrl(QUrl)));
     connect(page(), SIGNAL(loadProgress(int)), urlEdit, SLOT(setProgress(int)));
+#endif
+
+    connect(page()->mainFrame(), SIGNAL(titleChanged(const QString&)),
+                this, SLOT(setWindowTitle(const QString&)));
     connect(page(), SIGNAL(windowCloseRequested()), this, SLOT(close()));
 
+#ifndef QT_NO_SHORTCUT
     // short-cuts
     page()->action(QWebPage::Back)->setShortcut(QKeySequence::Back);
     page()->action(QWebPage::Stop)->setShortcut(Qt::Key_Escape);
     page()->action(QWebPage::Forward)->setShortcut(QKeySequence::Forward);
     page()->action(QWebPage::Reload)->setShortcut(QKeySequence::Refresh);
+#ifndef QT_NO_UNDOSTACK
     page()->action(QWebPage::Undo)->setShortcut(QKeySequence::Undo);
     page()->action(QWebPage::Redo)->setShortcut(QKeySequence::Redo);
+#endif
     page()->action(QWebPage::Cut)->setShortcut(QKeySequence::Cut);
     page()->action(QWebPage::Copy)->setShortcut(QKeySequence::Copy);
     page()->action(QWebPage::Paste)->setShortcut(QKeySequence::Paste);
@@ -100,6 +106,7 @@ void MainWindow::buildUI()
     page()->action(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
     page()->action(QWebPage::ToggleItalic)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
     page()->action(QWebPage::ToggleUnderline)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_U));
+#endif
 }
 
 void MainWindow::setPage(WebPage* page)
@@ -125,8 +132,10 @@ void MainWindow::setAddressUrl(const QUrl& url)
 
 void MainWindow::setAddressUrl(const QString& url)
 {
+#ifndef QT_NO_INPUTDIALOG
     if (!url.contains("about:"))
         urlEdit->setText(url);
+#endif
 }
 
 void MainWindow::addCompleterEntry(const QUrl& url)
@@ -164,6 +173,7 @@ void MainWindow::load(const QUrl& url)
 
 void MainWindow::changeLocation()
 {
+#ifndef QT_NO_INPUTDIALOG
     QString string = urlEdit->text();
     QUrl mainFrameURL = page()->mainFrame()->url();
 
@@ -173,10 +183,12 @@ void MainWindow::changeLocation()
     }
 
     load(string);
+#endif
 }
 
 void MainWindow::openFile()
 {
+#ifndef QT_NO_FILEDIALOG
     static const QString filter("HTML Files (*.htm *.html);;Text Files (*.txt);;Image Files (*.gif *.jpg *.png);;All Files (*)");
 
     QFileDialog fileDialog(this, tr("Open"), QString(), filter);
@@ -189,10 +201,13 @@ void MainWindow::openFile()
         if (!selectedFile.isEmpty())
             load(QUrl::fromLocalFile(selectedFile));
     }
+#endif
 }
 
 void MainWindow::openLocation()
 {
+#ifndef QT_NO_INPUTDIALOG
     urlEdit->selectAll();
     urlEdit->setFocus();
+#endif
 }
index 9e0c49e69d891ad071968c07a1ed276cad7b6464..400355e088fe946138a783ad2f1b1dcb60f7eb61 100644 (file)
@@ -107,10 +107,12 @@ bool WebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& r
 
 void WebPage::openUrlInDefaultBrowser(const QUrl& url)
 {
+#ifndef QT_NO_DESKTOPSERVICES
     if (QAction* action = qobject_cast<QAction*>(sender()))
         QDesktopServices::openUrl(action->data().toUrl());
     else
         QDesktopServices::openUrl(url);
+#endif
 }
 
 QString WebPage::userAgentForUrl(const QUrl& url) const
@@ -165,6 +167,7 @@ void WebPage::authenticationRequired(QNetworkReply* reply, QAuthenticator* authe
     messageLabel->setText(messageStr.arg(reply->url().toString()));
     layout->addWidget(messageLabel, 0, 1);
 
+#ifndef QT_NO_LINEEDIT
     QLabel* userLabel = new QLabel("Username:", dialog);
     layout->addWidget(userLabel, 1, 0);
     QLineEdit* userInput = new QLineEdit(dialog);
@@ -175,6 +178,7 @@ void WebPage::authenticationRequired(QNetworkReply* reply, QAuthenticator* authe
     QLineEdit* passInput = new QLineEdit(dialog);
     passInput->setEchoMode(QLineEdit::Password);
     layout->addWidget(passInput, 2, 1);
+#endif
 
     QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
             | QDialogButtonBox::Cancel, Qt::Horizontal, dialog);
@@ -183,8 +187,10 @@ void WebPage::authenticationRequired(QNetworkReply* reply, QAuthenticator* authe
     layout->addWidget(buttonBox, 3, 1);
 
     if (dialog->exec() == QDialog::Accepted) {
+#ifndef QT_NO_LINEEDIT
         authenticator->setUser(userInput->text());
         authenticator->setPassword(passInput->text());
+#endif
     }
 
     delete dialog;
index 2a541fb6831253efc0dd6850f3dc81517dc556f2..8e336203ad5a429ae733eddfad8e2aec07f90dd8 100644 (file)
@@ -169,6 +169,7 @@ void WebViewGraphicsBased::updateFrameRate()
 
 void WebViewGraphicsBased::animatedFlip()
 {
+#ifndef QT_NO_ANIMATION
     QSizeF center = graphicsWebView()->boundingRect().size() / 2;
     QPointF centerPoint = QPointF(center.width(), center.height());
     graphicsWebView()->setTransformOriginPoint(centerPoint);
@@ -182,10 +183,12 @@ void WebViewGraphicsBased::animatedFlip()
     animation->setEndValue(rotation + 180 - (rotation % 180));
 
     animation->start(QAbstractAnimation::DeleteWhenStopped);
+#endif
 }
 
 void WebViewGraphicsBased::animatedYFlip()
 {
+#ifndef QT_NO_ANIMATION
     if (!m_machine) {
         m_machine = new QStateMachine(this);
 
@@ -217,6 +220,7 @@ void WebViewGraphicsBased::animatedYFlip()
     }
 
     m_machine->start();
+#endif
 }
 
 void WebViewGraphicsBased::paintEvent(QPaintEvent* event)
index 1fd26c6aec3ed5efd58cd70216a9fe300fa39d43..b0b0f32922dc34a5cf445adf8a37a58b21080adc 100644 (file)
@@ -109,3 +109,30 @@ contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
 # disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
 win32-msvc*|wince*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
 
+CONFIG(qt_minimal) {
+    DEFINES *= QT_NO_ANIMATION
+    DEFINES *= QT_NO_BEARERMANAGEMENT
+    DEFINES *= QT_NO_CLIPBOARD
+    DEFINES *= QT_NO_COMBOBOX
+    DEFINES *= QT_NO_CRASHHANDLER
+    DEFINES *= QT_NO_CURSOR
+    DEFINES *= QT_NO_DESKTOPSERVICES
+    DEFINES *= QT_NO_FILEDIALOG
+    DEFINES *= QT_NO_GRAPHICSEFFECT
+    DEFINES *= QT_NO_IM
+    DEFINES *= QT_NO_INPUTDIALOG
+    DEFINES *= QT_NO_LINEEDIT
+    DEFINES *= QT_NO_MESSAGEBOX
+    DEFINES *= QT_NO_OPENSSL
+    DEFINES *= QT_NO_PRINTER
+    DEFINES *= QT_NO_QUUID_STRING
+    DEFINES *= QT_NO_SHORTCUT
+    DEFINES *= QT_NO_STYLE_STYLESHEET
+    DEFINES *= QT_NO_SYSTEMTRAYICON
+    DEFINES *= QT_NO_TEMPORARYFILE
+    DEFINES *= QT_NO_TOOLTIP
+    DEFINES *= QT_NO_UITOOLS
+    DEFINES *= QT_NO_UNDOCOMMAND
+    DEFINES *= QT_NO_UNDOSTACK
+    DEFINES *= QT_NO_XRENDER
+}
index a730b25954c790008126644f6fd354ad3574027a..2818bffa7c1f10d423a608f26da777e16c955e4d 100644 (file)
@@ -1,3 +1,20 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
+
+        Reviewed by Csaba Osztrogonác.
+
+        [Qt] Baseline qt_minimal configuration
+        https://bugs.webkit.org/show_bug.cgi?id=51313
+
+        * WebCoreSupport/PopupMenuQt.cpp:
+        (WebCore::PopupMenuQt::show): Add QT_NO_COMBOBOX guard.
+
+        * WebCoreSupport/QtFallbackWebPopup.cpp:
+        (WebCore::QtFallbackWebPopup::populate): Add QT_NO_TOOLTIP guard.
+
+        * tests/qwebframe/tst_qwebframe.cpp: Add QT_NO_COMBOBOX guard.
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (PluginPage::createPlugin): Add QT_NO_INPUTDIALOG guard.
+
 2011-01-10  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Darin Adler.
index 9b349555c6e4893312362615fdd93188a9ab9f5f..0c0f2d70a5d68db32448f95e8c27f3045ba71e6f 100644 (file)
@@ -97,6 +97,7 @@ void PopupMenuQt::disconnectClient()
 
 void PopupMenuQt::show(const IntRect& rect, FrameView* view, int index)
 {
+#ifndef QT_NO_COMBOBOX
     if (!m_popupClient)
         return;
 
@@ -117,6 +118,7 @@ void PopupMenuQt::show(const IntRect& rect, FrameView* view, int index)
         delete m_selectData;
     m_selectData = new SelectData(m_popupClient);
     m_popup->show(*m_selectData);
+#endif
 }
 
 void PopupMenuQt::didHide()
index 3f69a4714a5638f4503e90137c9efe0ca5a0c4a0..afa649258ccdab5656e13755b30ad816ed4cc00c 100644 (file)
@@ -232,7 +232,9 @@ void QtFallbackWebPopup::populate(const QWebSelectData& data)
         case QWebSelectData::Option:
             m_combo->insertItem(i, data.itemText(i));
             model->item(i)->setEnabled(data.itemIsEnabled(i));
+#ifndef QT_NO_TOOLTIP
             model->item(i)->setToolTip(data.itemToolTip(i));
+#endif
             if (data.itemIsSelected(i))
                 currentIndex = i;
             break;
index 2ae85e41d2ad71d6e8580dc6eadbd323374579c8..6b0b58d57d8c5d432b595a843bed4bb2668f63b3 100644 (file)
@@ -603,7 +603,7 @@ private slots:
     void setHtmlWithJSAlert();
     void ipv6HostEncoding();
     void metaData();
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_COMBOBOX)
     // as maemo 5 && symbian do not use QComboBoxes to implement the popups
     // this test does not make sense for it.
     void popupFocus();
@@ -2590,7 +2590,7 @@ void tst_QWebFrame::metaData()
     QCOMPARE(metaData.value("nonexistant"), QString());
 }
 
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN) && !defined(QT_NO_COMBOBOX)
 void tst_QWebFrame::popupFocus()
 {
     QWebView view;
index d4eed21a770af4233508487088aecc8cee75106f..e0662b368b6db219b63357b1ac21d6f1661f9560 100644 (file)
@@ -589,8 +589,10 @@ protected:
         QObject *result = 0;
         if (classid == "pushbutton")
             result = new QPushButton();
+#ifndef QT_NO_INPUTDIALOG
         else if (classid == "lineedit")
             result = new QLineEdit();
+#endif
         else if (classid == "graphicswidget")
             result = new QGraphicsWidget();
         if (result)