Changeset 67878 in webkit
- Timestamp:
- Sep 20, 2010 1:20:25 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r67877 r67878 1 2010-09-20 Jacob Dinu <dinu.jacob@nokia.com> 2 3 Reviewed by Adam Barth. 4 5 When loading a cached page, dispatchDidCommitLoad is called after FrameLoader::open so 6 that all initialzations are done before calling client dispatchDidCommitLoad to avoid 7 client from accessing incorrect data. 8 https://bugs.webkit.org/show_bug.cgi?id=41155 9 10 * loader/FrameLoader.cpp: 11 (WebCore::FrameLoader::commitProvisionalLoad): 12 (WebCore::FrameLoader::transitionToCommitted): 13 1 14 2010-09-20 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/WebCore/loader/FrameLoader.cpp
r67709 r67878 1849 1849 prepareForCachedPageRestore(); 1850 1850 cachedPage->restore(m_frame->page()); 1851 1852 dispatchDidCommitLoad(); 1853 1854 // If we have a title let the WebView know about it. 1855 String title = m_documentLoader->title(); 1856 if (!title.isNull()) 1857 m_client->dispatchDidReceiveTitle(title); 1858 1851 1859 checkCompleted(); 1852 1860 } else { … … 1929 1937 // Handle adding the URL to the back/forward list. 1930 1938 DocumentLoader* dl = m_documentLoader.get(); 1931 String ptitle = dl->title();1932 1939 1933 1940 switch (m_loadType) { … … 2006 2013 if (!m_client->hasHTMLView()) 2007 2014 receivedFirstData(); 2008 else if (cachedPage) {2009 // For non-cached HTML pages, these methods are called in receivedFirstData().2010 dispatchDidCommitLoad();2011 2012 // If we have a title let the WebView know about it.2013 if (!ptitle.isNull())2014 m_client->dispatchDidReceiveTitle(ptitle);2015 }2016 2015 } 2017 2016 -
trunk/WebKit/qt/ChangeLog
r67846 r67878 1 2010-09-20 Jacob Dinu <dinu.jacob@nokia.com> 2 3 Reviewed by Adam Barth. 4 5 Added a new qwebpage test for loading a cached page 6 https://bugs.webkit.org/show_bug.cgi?id=41155 7 8 * tests/qwebpage/tst_qwebpage.cpp: 9 (tst_QWebPage::loadCachedPage): 10 1 11 2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 12 -
trunk/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r67289 r67878 98 98 void frameAt(); 99 99 void requestCache(); 100 void loadCachedPage(); 100 101 void protectBindingsRuntimeObjectsFromCollector(); 101 102 void localURLSchemes(); … … 1289 1290 } 1290 1291 1292 void tst_QWebPage::loadCachedPage() 1293 { 1294 TestPage page; 1295 QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool))); 1296 page.settings()->setMaximumPagesInCache(3); 1297 1298 page.mainFrame()->load(QUrl("data:text/html,This is first page")); 1299 1300 QTRY_COMPARE(loadSpy.count(), 1); 1301 QTRY_COMPARE(page.navigations.count(), 1); 1302 1303 QUrl firstPageUrl = page.mainFrame()->url(); 1304 page.mainFrame()->load(QUrl("data:text/html,This is second page")); 1305 1306 QTRY_COMPARE(loadSpy.count(), 2); 1307 QTRY_COMPARE(page.navigations.count(), 2); 1308 1309 page.triggerAction(QWebPage::Stop); 1310 QVERIFY(page.history()->canGoBack()); 1311 1312 QSignalSpy urlSpy(page.mainFrame(), SIGNAL(urlChanged(QUrl))); 1313 QVERIFY(urlSpy.isValid()); 1314 1315 page.triggerAction(QWebPage::Back); 1316 ::waitForSignal(page.mainFrame(), SIGNAL(urlChanged(QUrl))); 1317 QCOMPARE(urlSpy.size(), 1); 1318 1319 QList<QVariant> arguments1 = urlSpy.takeFirst(); 1320 QCOMPARE(arguments1.at(0).toUrl(), firstPageUrl); 1321 1322 } 1291 1323 void tst_QWebPage::backActionUpdate() 1292 1324 {
Note: See TracChangeset
for help on using the changeset viewer.