[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

benjamin.poulain at nokia.com benjamin.poulain at nokia.com
Wed Dec 22 13:51:38 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 20e861abbe26df7f1e9c56bb2fbc666d4755c916
Author: benjamin.poulain at nokia.com <benjamin.poulain at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 28 14:40:39 2010 +0000

    2010-09-28  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] Remove support for Qt 4.5
            https://bugs.webkit.org/show_bug.cgi?id=46718
    
            Remove the code for versions of Qt prior to 4.6.
    
            * DumpRenderTree/qt/EventSenderQt.cpp:
            (EventSender::addTouchPoint):
            (EventSender::updateTouchPoint):
            (EventSender::setTouchModifier):
            (EventSender::touchStart):
            (EventSender::touchMove):
            (EventSender::touchEnd):
            (EventSender::clearTouchPoints):
            (EventSender::releaseTouchPoint):
            (EventSender::sendTouchEvent):
            * DumpRenderTree/qt/EventSenderQt.h:
            * DumpRenderTree/qt/TextInputControllerQt.cpp:
            (TextInputController::setMarkedText):
            * QtTestBrowser/launcherwindow.cpp:
            (LauncherWindow::LauncherWindow):
            (LauncherWindow::initializeView):
            (LauncherWindow::createChrome):
            (LauncherWindow::sendTouchEvent):
            (LauncherWindow::eventFilter):
            (LauncherWindow::applyZoom):
            (LauncherWindow::setTouchMocking):
            * QtTestBrowser/launcherwindow.h:
            * QtTestBrowser/utils.cpp:
            (urlFromUserInput):
            * QtTestBrowser/webview.cpp:
            (WebViewGraphicsBased::animatedFlip):
            (WebViewGraphicsBased::animatedYFlip):
            * QtTestBrowser/webview.h:
            (WebViewGraphicsBased::setYRotation):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 5012903..063dca9 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,42 @@
+2010-09-28  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Remove support for Qt 4.5
+        https://bugs.webkit.org/show_bug.cgi?id=46718
+
+        Remove the code for versions of Qt prior to 4.6.
+
+        * DumpRenderTree/qt/EventSenderQt.cpp:
+        (EventSender::addTouchPoint):
+        (EventSender::updateTouchPoint):
+        (EventSender::setTouchModifier):
+        (EventSender::touchStart):
+        (EventSender::touchMove):
+        (EventSender::touchEnd):
+        (EventSender::clearTouchPoints):
+        (EventSender::releaseTouchPoint):
+        (EventSender::sendTouchEvent):
+        * DumpRenderTree/qt/EventSenderQt.h:
+        * DumpRenderTree/qt/TextInputControllerQt.cpp:
+        (TextInputController::setMarkedText):
+        * QtTestBrowser/launcherwindow.cpp:
+        (LauncherWindow::LauncherWindow):
+        (LauncherWindow::initializeView):
+        (LauncherWindow::createChrome):
+        (LauncherWindow::sendTouchEvent):
+        (LauncherWindow::eventFilter):
+        (LauncherWindow::applyZoom):
+        (LauncherWindow::setTouchMocking):
+        * QtTestBrowser/launcherwindow.h:
+        * QtTestBrowser/utils.cpp:
+        (urlFromUserInput):
+        * QtTestBrowser/webview.cpp:
+        (WebViewGraphicsBased::animatedFlip):
+        (WebViewGraphicsBased::animatedYFlip):
+        * QtTestBrowser/webview.h:
+        (WebViewGraphicsBased::setYRotation):
+
 2010-09-28  İsmail Dönmez  <ismail at namtrac.org>
 
         Reviewed by Andreas Kling.
diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
index 63dbd2a..fd7c925 100644
--- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
@@ -381,7 +381,6 @@ void EventSender::scheduleAsynchronousClick()
 
 void EventSender::addTouchPoint(int x, int y)
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     // Use index to refer to the position in the vector that this touch
     // is stored. We then create a unique id for the touch that will be
     // passed into WebCore.
@@ -391,24 +390,20 @@ void EventSender::addTouchPoint(int x, int y)
     m_touchPoints.append(point);
     updateTouchPoint(index, x, y);
     m_touchPoints[index].setState(Qt::TouchPointPressed);
-#endif
 }
 
 void EventSender::updateTouchPoint(int index, int x, int y)
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     if (index < 0 || index >= m_touchPoints.count())
         return;
 
     QTouchEvent::TouchPoint &p = m_touchPoints[index];
     p.setPos(QPointF(x, y));
     p.setState(Qt::TouchPointMoved);
-#endif
 }
 
 void EventSender::setTouchModifier(const QString &modifier, bool enable)
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     Qt::KeyboardModifier mod = Qt::NoModifier;
     if (!modifier.compare(QLatin1String("shift"), Qt::CaseInsensitive))
         mod = Qt::ShiftModifier;
@@ -423,30 +418,24 @@ void EventSender::setTouchModifier(const QString &modifier, bool enable)
         m_touchModifiers |= mod;
     else
         m_touchModifiers &= ~mod;
-#endif
 }
 
 void EventSender::touchStart()
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     if (!m_touchActive) {
         sendTouchEvent(QEvent::TouchBegin);
         m_touchActive = true;
     } else
         sendTouchEvent(QEvent::TouchUpdate);
-#endif
 }
 
 void EventSender::touchMove()
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     sendTouchEvent(QEvent::TouchUpdate);
-#endif
 }
 
 void EventSender::touchEnd()
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     for (int i = 0; i < m_touchPoints.count(); ++i)
         if (m_touchPoints[i].state() != Qt::TouchPointReleased) {
             sendTouchEvent(QEvent::TouchUpdate);
@@ -454,31 +443,25 @@ void EventSender::touchEnd()
         }
     sendTouchEvent(QEvent::TouchEnd);
     m_touchActive = false;
-#endif
 }
 
 void EventSender::clearTouchPoints()
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     m_touchPoints.clear();
     m_touchModifiers = Qt::KeyboardModifiers();
     m_touchActive = false;
-#endif
 }
 
 void EventSender::releaseTouchPoint(int index)
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     if (index < 0 || index >= m_touchPoints.count())
         return;
 
     m_touchPoints[index].setState(Qt::TouchPointReleased);
-#endif
 }
 
 void EventSender::sendTouchEvent(QEvent::Type type)
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     QTouchEvent event(type, QTouchEvent::TouchScreen, m_touchModifiers);
     event.setTouchPoints(m_touchPoints);
     sendEvent(m_page, &event);
@@ -491,7 +474,6 @@ void EventSender::sendTouchEvent(QEvent::Type type)
             ++it;
         }
     }
-#endif
 }
 
 void EventSender::zoomPageIn()
diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
index a17e938..4ba8382 100644
--- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
+++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
@@ -41,13 +41,11 @@
 #include <QPoint>
 #include <QString>
 #include <QStringList>
+#include <QTouchEvent>
 
 #include <qwebpage.h>
 #include <qwebframe.h>
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
-#include <QTouchEvent>
-#endif
 
 class EventSender : public QObject {
     Q_OBJECT
@@ -107,10 +105,8 @@ private:
     QEventLoop* m_eventLoop;
     QWebFrame* frameUnderMouse() const;
     QBasicTimer m_clickTimer;
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     QList<QTouchEvent::TouchPoint> m_touchPoints;
     Qt::KeyboardModifiers m_touchModifiers;
     bool m_touchActive;
-#endif
 };
 #endif //  EventSenderQt_h
diff --git a/WebKitTools/DumpRenderTree/qt/TextInputControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/TextInputControllerQt.cpp
index e0c9b61..08d8850 100644
--- a/WebKitTools/DumpRenderTree/qt/TextInputControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/TextInputControllerQt.cpp
@@ -133,10 +133,8 @@ void TextInputController::doCommand(const QString& command)
 void TextInputController::setMarkedText(const QString& string, int start, int end)
 {
     QList<QInputMethodEvent::Attribute> attributes;
-#if QT_VERSION >= 0x040600
     QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, start, end, QVariant());
     attributes << selection;
-#endif
     QInputMethodEvent event(string, attributes);
     QApplication::sendEvent(parent(), &event);
 }
diff --git a/WebKitTools/QtTestBrowser/launcherwindow.cpp b/WebKitTools/QtTestBrowser/launcherwindow.cpp
index 92dc9f2..df29f11 100644
--- a/WebKitTools/QtTestBrowser/launcherwindow.cpp
+++ b/WebKitTools/QtTestBrowser/launcherwindow.cpp
@@ -41,9 +41,7 @@ LauncherWindow::LauncherWindow(WindowOptions* data, QGraphicsScene* sharedScene)
     , m_view(0)
     , m_inspector(0)
     , m_formatMenuAction(0)
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     , m_zoomAnimation(0)
-#endif
 {
     if (data)
         m_windowOptions = *data;
@@ -137,9 +135,7 @@ void LauncherWindow::initializeView()
     if (url.isValid())
         page()->mainFrame()->load(url);
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     m_touchMocking = false;
-#endif
 }
 
 void LauncherWindow::applyPrefs()
@@ -243,11 +239,9 @@ void LauncherWindow::createChrome()
     toggleFrameFlattening->setCheckable(true);
     toggleFrameFlattening->setChecked(settings->testAttribute(QWebSettings::FrameFlatteningEnabled));
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     QAction* touchMockAction = toolsMenu->addAction("Toggle touch mocking", this, SLOT(setTouchMocking(bool)));
     touchMockAction->setCheckable(true);
     touchMockAction->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_T));
-#endif
 
     toolsMenu->addSeparator();
 
@@ -409,7 +403,6 @@ void LauncherWindow::grabZoomKeys(bool grab)
 #endif
 }
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
 void LauncherWindow::sendTouchEvent()
 {
     if (m_touchPoints.isEmpty())
@@ -433,7 +426,6 @@ void LauncherWindow::sendTouchEvent()
     if (m_touchPoints.size() > 1 && m_touchPoints[1].state() == Qt::TouchPointReleased)
         m_touchPoints.removeAt(1);
 }
-#endif // QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
 
 bool LauncherWindow::eventFilter(QObject* obj, QEvent* event)
 {
@@ -449,7 +441,6 @@ bool LauncherWindow::eventFilter(QObject* obj, QEvent* event)
         }
     }
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     if (!m_touchMocking)
         return QObject::eventFilter(obj, event);
 
@@ -511,7 +502,6 @@ bool LauncherWindow::eventFilter(QObject* obj, QEvent* event)
             m_touchPoints.last().setState(Qt::TouchPointStationary);
         }
     }
-#endif // QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
 
     return false;
 }
@@ -549,7 +539,6 @@ void LauncherWindow::zoomAnimationFinished()
 
 void LauncherWindow::applyZoom()
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     if (isGraphicsBased() && page()->settings()->testAttribute(QWebSettings::TiledBackingStoreEnabled)) {
         QGraphicsWebView* view = static_cast<WebViewGraphicsBased*>(m_view)->graphicsWebView();
         view->setTiledBackingStoreFrozen(true);
@@ -567,7 +556,6 @@ void LauncherWindow::applyZoom()
         m_zoomAnimation->start();
         return;
     }
-#endif
     page()->mainFrame()->setZoomFactor(qreal(m_currentZoom) / 100.0);
 }
 
@@ -677,9 +665,7 @@ void LauncherWindow::selectElements()
 
 void LauncherWindow::setTouchMocking(bool on)
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     m_touchMocking = on;
-#endif
 }
 
 void LauncherWindow::toggleWebView(bool graphicsBased)
diff --git a/WebKitTools/QtTestBrowser/launcherwindow.h b/WebKitTools/QtTestBrowser/launcherwindow.h
index 0e17a12..84dedaa 100644
--- a/WebKitTools/QtTestBrowser/launcherwindow.h
+++ b/WebKitTools/QtTestBrowser/launcherwindow.h
@@ -123,9 +123,7 @@ public:
     virtual void keyPressEvent(QKeyEvent* event);
     void grabZoomKeys(bool grab);
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     void sendTouchEvent();
-#endif
 
     bool eventFilter(QObject* obj, QEvent* event);
 
@@ -200,11 +198,9 @@ private:
 
     QAction* m_formatMenuAction;
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     QPropertyAnimation* m_zoomAnimation;
     QList<QTouchEvent::TouchPoint> m_touchPoints;
     bool m_touchMocking;
-#endif
 };
 
 #endif
diff --git a/WebKitTools/QtTestBrowser/utils.cpp b/WebKitTools/QtTestBrowser/utils.cpp
index 2d45dd0..567c989 100644
--- a/WebKitTools/QtTestBrowser/utils.cpp
+++ b/WebKitTools/QtTestBrowser/utils.cpp
@@ -82,11 +82,7 @@ QUrl urlFromUserInput(const QString& string)
     if (fi.exists() && fi.isRelative())
         input = fi.absoluteFilePath();
 
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     return QUrl::fromUserInput(input);
-#else
-    return QUrl(input);
-#endif
 }
 
 
diff --git a/WebKitTools/QtTestBrowser/webview.cpp b/WebKitTools/QtTestBrowser/webview.cpp
index d8d89a9..242daf6 100644
--- a/WebKitTools/QtTestBrowser/webview.cpp
+++ b/WebKitTools/QtTestBrowser/webview.cpp
@@ -151,7 +151,6 @@ void WebViewGraphicsBased::updateFrameRate()
 
 void WebViewGraphicsBased::animatedFlip()
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     QSizeF center = graphicsWebView()->boundingRect().size() / 2;
     QPointF centerPoint = QPointF(center.width(), center.height());
     graphicsWebView()->setTransformOriginPoint(centerPoint);
@@ -165,12 +164,10 @@ void WebViewGraphicsBased::animatedFlip()
     animation->setEndValue(rotation + 180 - (rotation % 180));
 
     animation->start(QAbstractAnimation::DeleteWhenStopped);
-#endif
 }
 
 void WebViewGraphicsBased::animatedYFlip()
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     if (!m_machine) {
         m_machine = new QStateMachine(this);
 
@@ -202,7 +199,6 @@ void WebViewGraphicsBased::animatedYFlip()
     }
 
     m_machine->start();
-#endif
 }
 
 void WebViewGraphicsBased::paintEvent(QPaintEvent* event)
diff --git a/WebKitTools/QtTestBrowser/webview.h b/WebKitTools/QtTestBrowser/webview.h
index aadf85c..e34d081 100644
--- a/WebKitTools/QtTestBrowser/webview.h
+++ b/WebKitTools/QtTestBrowser/webview.h
@@ -117,13 +117,11 @@ private:
 
 inline void WebViewGraphicsBased::setYRotation(qreal angle)
 {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
     QRectF r = graphicsWebView()->boundingRect();
     graphicsWebView()->setTransform(QTransform()
         .translate(r.width() / 2, r.height() / 2)
         .rotate(angle, Qt::YAxis)
         .translate(-r.width() / 2, -r.height() / 2));
-#endif
     m_yRotation = angle;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list