[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

laszlo.1.gombos at nokia.com laszlo.1.gombos at nokia.com
Sun Feb 20 22:45:47 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit ddc9f88a14987bbf2836f49e2f0c8ca93110cd93
Author: laszlo.1.gombos at nokia.com <laszlo.1.gombos at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 11 02:50:44 2011 +0000

    2011-01-10  Laszlo Gombos  <laszlo.1.gombos at 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  Laszlo Gombos  <laszlo.1.gombos at 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 at 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 at 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

diff --git a/ChangeLog b/ChangeLog
index 52d462d..563a138 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos at 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 at samsung.com>
 
         Reviewed by Eric Seidel.
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 0e9a4f6..9a5e9b7 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos at 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 at rim.com>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index f31844a..cfb9059 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -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 {
diff --git a/Source/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp b/Source/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
index 959e74a..f3e7023 100644
--- a/Source/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
+++ b/Source/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
@@ -91,6 +91,6 @@ void NetworkStateNotifier::setNetworkAccessAllowed(bool isAllowed)
 
 } // namespace WebCore
 
-#endif
-
 #include "moc_NetworkStateNotifierPrivate.cpp"
+
+#endif
diff --git a/Source/WebCore/platform/qt/WheelEventQt.cpp b/Source/WebCore/platform/qt/WheelEventQt.cpp
index 57a7ebc..aa61d91 100644
--- a/Source/WebCore/platform/qt/WheelEventQt.cpp
+++ b/Source/WebCore/platform/qt/WheelEventQt.cpp
@@ -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
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 538368c..7a3a620 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,42 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos at 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 at webkit.org>
 
         Fix build.
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 935a307..5fcc602 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -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());
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index 1a4d28f..8a4b884 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -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;
 }
diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h
index e35e7fd..f39faef 100644
--- a/Tools/QtTestBrowser/launcherwindow.h
+++ b/Tools/QtTestBrowser/launcherwindow.h
@@ -75,6 +75,8 @@
 #undef KeyPress
 #endif
 
+class QPropertyAnimation;
+
 class WindowOptions {
 public:
     WindowOptions()
diff --git a/Tools/QtTestBrowser/locationedit.cpp b/Tools/QtTestBrowser/locationedit.cpp
index a97f148..85bd222 100644
--- a/Tools/QtTestBrowser/locationedit.cpp
+++ b/Tools/QtTestBrowser/locationedit.cpp
@@ -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
diff --git a/Tools/QtTestBrowser/locationedit.h b/Tools/QtTestBrowser/locationedit.h
index e82920c..752497e 100644
--- a/Tools/QtTestBrowser/locationedit.h
+++ b/Tools/QtTestBrowser/locationedit.h
@@ -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
diff --git a/Tools/QtTestBrowser/mainwindow.cpp b/Tools/QtTestBrowser/mainwindow.cpp
index 756c3c2..9f4aec5 100644
--- a/Tools/QtTestBrowser/mainwindow.cpp
+++ b/Tools/QtTestBrowser/mainwindow.cpp
@@ -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
 }
diff --git a/Tools/QtTestBrowser/webpage.cpp b/Tools/QtTestBrowser/webpage.cpp
index 9e0c49e..400355e 100644
--- a/Tools/QtTestBrowser/webpage.cpp
+++ b/Tools/QtTestBrowser/webpage.cpp
@@ -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;
diff --git a/Tools/QtTestBrowser/webview.cpp b/Tools/QtTestBrowser/webview.cpp
index 2a541fb..8e33620 100644
--- a/Tools/QtTestBrowser/webview.cpp
+++ b/Tools/QtTestBrowser/webview.cpp
@@ -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)
diff --git a/WebKit.pri b/WebKit.pri
index 1fd26c6..b0b0f32 100644
--- a/WebKit.pri
+++ b/WebKit.pri
@@ -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
+}
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index a730b25..2818bff 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-10  Laszlo Gombos  <laszlo.1.gombos at 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 at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp b/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
index 9b34955..0c0f2d7 100644
--- a/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
+++ b/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
@@ -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()
diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
index 3f69a47..afa6492 100644
--- a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
+++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -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;
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 2ae85e4..6b0b58d 100644
--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -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;
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index d4eed21..e0662b3 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -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)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list