[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:34:50 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit cbb6a497e1cde9f50c2f16d77d30fca6cfb14280
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 20 20:20:25 2010 +0000
2010-09-20 Jacob Dinu <dinu.jacob at nokia.com>
Reviewed by Adam Barth.
When loading a cached page, dispatchDidCommitLoad is called after FrameLoader::open so
that all initialzations are done before calling client dispatchDidCommitLoad to avoid
client from accessing incorrect data.
https://bugs.webkit.org/show_bug.cgi?id=41155
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
2010-09-20 Jacob Dinu <dinu.jacob at nokia.com>
Reviewed by Adam Barth.
Added a new qwebpage test for loading a cached page
https://bugs.webkit.org/show_bug.cgi?id=41155
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::loadCachedPage):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5784093..60b21ce 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-20 Jacob Dinu <dinu.jacob at nokia.com>
+
+ Reviewed by Adam Barth.
+
+ When loading a cached page, dispatchDidCommitLoad is called after FrameLoader::open so
+ that all initialzations are done before calling client dispatchDidCommitLoad to avoid
+ client from accessing incorrect data.
+ https://bugs.webkit.org/show_bug.cgi?id=41155
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::commitProvisionalLoad):
+ (WebCore::FrameLoader::transitionToCommitted):
+
2010-09-20 Simon Fraser <simon.fraser at apple.com>
Reviewed by Adam Roben.
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 045b96b..973aab7 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -1848,6 +1848,14 @@ void FrameLoader::commitProvisionalLoad()
if (cachedPage && cachedPage->document()) {
prepareForCachedPageRestore();
cachedPage->restore(m_frame->page());
+
+ dispatchDidCommitLoad();
+
+ // If we have a title let the WebView know about it.
+ String title = m_documentLoader->title();
+ if (!title.isNull())
+ m_client->dispatchDidReceiveTitle(title);
+
checkCompleted();
} else {
KURL url = pdl->substituteData().responseURL();
@@ -1928,7 +1936,6 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
// Handle adding the URL to the back/forward list.
DocumentLoader* dl = m_documentLoader.get();
- String ptitle = dl->title();
switch (m_loadType) {
case FrameLoadTypeForward:
@@ -2005,14 +2012,6 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
if (!m_client->hasHTMLView())
receivedFirstData();
- else if (cachedPage) {
- // For non-cached HTML pages, these methods are called in receivedFirstData().
- dispatchDidCommitLoad();
-
- // If we have a title let the WebView know about it.
- if (!ptitle.isNull())
- m_client->dispatchDidReceiveTitle(ptitle);
- }
}
void FrameLoader::clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress)
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 0a9a245..34edbd7 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-20 Jacob Dinu <dinu.jacob at nokia.com>
+
+ Reviewed by Adam Barth.
+
+ Added a new qwebpage test for loading a cached page
+ https://bugs.webkit.org/show_bug.cgi?id=41155
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::loadCachedPage):
+
2010-09-08 Jocelyn Turcotte <jocelyn.turcotte at nokia.com>
Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index da19b0e..10af94c 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -97,6 +97,7 @@ private slots:
void backActionUpdate();
void frameAt();
void requestCache();
+ void loadCachedPage();
void protectBindingsRuntimeObjectsFromCollector();
void localURLSchemes();
void testOptionalJSObjects();
@@ -1288,6 +1289,37 @@ void tst_QWebPage::requestCache()
(int)QNetworkRequest::PreferCache);
}
+void tst_QWebPage::loadCachedPage()
+{
+ TestPage page;
+ QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
+ page.settings()->setMaximumPagesInCache(3);
+
+ page.mainFrame()->load(QUrl("data:text/html,This is first page"));
+
+ QTRY_COMPARE(loadSpy.count(), 1);
+ QTRY_COMPARE(page.navigations.count(), 1);
+
+ QUrl firstPageUrl = page.mainFrame()->url();
+ page.mainFrame()->load(QUrl("data:text/html,This is second page"));
+
+ QTRY_COMPARE(loadSpy.count(), 2);
+ QTRY_COMPARE(page.navigations.count(), 2);
+
+ page.triggerAction(QWebPage::Stop);
+ QVERIFY(page.history()->canGoBack());
+
+ QSignalSpy urlSpy(page.mainFrame(), SIGNAL(urlChanged(QUrl)));
+ QVERIFY(urlSpy.isValid());
+
+ page.triggerAction(QWebPage::Back);
+ ::waitForSignal(page.mainFrame(), SIGNAL(urlChanged(QUrl)));
+ QCOMPARE(urlSpy.size(), 1);
+
+ QList<QVariant> arguments1 = urlSpy.takeFirst();
+ QCOMPARE(arguments1.at(0).toUrl(), firstPageUrl);
+
+}
void tst_QWebPage::backActionUpdate()
{
QWebView view;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list