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

commit-queue at webkit.org commit-queue at webkit.org
Mon Feb 21 00:05:14 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 2ad79dc25bb62d17ad103f0622f9f333c27c0dac
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 28 00:21:55 2011 +0000

    2011-01-27  Jacob Dinu  <dinu.jacob at nokia.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] QtTestBrowser: User input lost when toggling use of QGraphicsView
            https://bugs.webkit.org/show_bug.cgi?id=48440
    
            Preserve user input when toggling use of QGraphicsView
    
            * QtTestBrowser/launcherwindow.cpp:
            (LauncherWindow::initializeView):
            (LauncherWindow::loadFinished):
            * QtTestBrowser/launcherwindow.h:
            * QtTestBrowser/mainwindow.cpp:
            (MainWindow::addressUrl):
            * QtTestBrowser/mainwindow.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76860 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 93f200a..52807b9 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-27  Jacob Dinu  <dinu.jacob at nokia.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] QtTestBrowser: User input lost when toggling use of QGraphicsView
+        https://bugs.webkit.org/show_bug.cgi?id=48440
+
+        Preserve user input when toggling use of QGraphicsView
+
+        * QtTestBrowser/launcherwindow.cpp:
+        (LauncherWindow::initializeView):
+        (LauncherWindow::loadFinished):
+        * QtTestBrowser/launcherwindow.h:
+        * QtTestBrowser/mainwindow.cpp:
+        (MainWindow::addressUrl):
+        * QtTestBrowser/mainwindow.h:
+
 2011-01-27  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Mihai Parparita.
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index 092bba7..666942f 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -96,6 +96,7 @@ void LauncherWindow::initializeView()
 {
     delete m_view;
 
+    m_inputUrl = addressUrl();
     QUrl url = page()->mainFrame()->url();
     setPage(new WebPage(this));
     page()->setQnamThreaded(m_windowOptions.useThreadedQnam);
@@ -142,6 +143,10 @@ void LauncherWindow::initializeView()
 
     if (url.isValid())
         page()->mainFrame()->load(url);
+    else  {
+        setAddressUrl(m_inputUrl);
+        m_inputUrl = QString();
+    }
 }
 
 void LauncherWindow::applyPrefs()
@@ -538,8 +543,13 @@ void LauncherWindow::loadStarted()
 void LauncherWindow::loadFinished()
 {
     QUrl url = page()->mainFrame()->url();
-    setAddressUrl(url.toString(QUrl::RemoveUserInfo));
     addCompleterEntry(url);
+    if (m_inputUrl.isEmpty())
+        setAddressUrl(url.toString(QUrl::RemoveUserInfo));
+    else {
+        setAddressUrl(m_inputUrl);
+        m_inputUrl = QString();
+    }
 }
 
 void LauncherWindow::showLinkHover(const QString &link, const QString &toolTip)
diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h
index 2567135..4487f65 100644
--- a/Tools/QtTestBrowser/launcherwindow.h
+++ b/Tools/QtTestBrowser/launcherwindow.h
@@ -208,6 +208,8 @@ private:
     QPropertyAnimation* m_zoomAnimation;
     QList<QTouchEvent::TouchPoint> m_touchPoints;
     bool m_touchMocking;
+
+    QString m_inputUrl;
 };
 
 #endif
diff --git a/Tools/QtTestBrowser/mainwindow.cpp b/Tools/QtTestBrowser/mainwindow.cpp
index 9f4aec5..e2ea41d 100644
--- a/Tools/QtTestBrowser/mainwindow.cpp
+++ b/Tools/QtTestBrowser/mainwindow.cpp
@@ -171,6 +171,14 @@ void MainWindow::load(const QUrl& url)
     page()->mainFrame()->load(url);
 }
 
+QString MainWindow::addressUrl() const
+{
+#ifndef QT_NO_INPUTDIALOG
+    return urlEdit->text();
+#endif
+    return QString();
+}
+
 void MainWindow::changeLocation()
 {
 #ifndef QT_NO_INPUTDIALOG
diff --git a/Tools/QtTestBrowser/mainwindow.h b/Tools/QtTestBrowser/mainwindow.h
index 3a39d57..08fa81e 100644
--- a/Tools/QtTestBrowser/mainwindow.h
+++ b/Tools/QtTestBrowser/mainwindow.h
@@ -59,6 +59,9 @@ protected slots:
     void openLocation();
     void changeLocation();
 
+protected:
+    QString addressUrl() const;
+
 private:
     void buildUI();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list