Changeset 39210 in webkit
- Timestamp:
- Dec 11, 2008 7:57:00 AM (15 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qwebframe.cpp
r39173 r39210 1023 1023 1024 1024 /*! 1025 \since 4.51026 \fn void QWebFrame::aboutToUpdateHistory(QWebHistoryItem* item);1027 1028 This signal is emitted shortly before the history of navigated pages1029 is changed, for example when navigating back in the history.1030 1031 The \a item parameter refers to the currently displayed frame.1032 1033 A potential use-case for this signal is to store custom data in1034 the QWebHistoryItem associated to the frame, using QWebHistoryItem::setUserData().1035 */1036 1037 /*!1038 1025 \class QWebHitTestResult 1039 1026 \since 4.4 -
trunk/WebKit/qt/Api/qwebframe.h
r39173 r39210 190 190 void iconChanged(); 191 191 192 void aboutToUpdateHistory(QWebHistoryItem* item);193 194 192 private: 195 193 friend class QWebPage; -
trunk/WebKit/qt/Api/qwebpage.cpp
r39173 r39210 2594 2594 */ 2595 2595 2596 /*! 2597 \since 4.5 2598 \fn void QWebPage::saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item); 2599 2600 This signal is emitted shortly before the history of navigated pages 2601 is changed, for example when navigating back in the history. 2602 2603 A potential use-case for this signal is to store custom data in 2604 the QWebHistoryItem associated to the frame, using QWebHistoryItem::setUserData(). 2605 */ 2606 2607 /*! 2608 \since 4.5 2609 \fn void QWebPage::restoreFrameStateRequested(QWebFrame* frame); 2610 2611 This signal is emitted when the load is finished and the application may now update its state accordingly. 2612 */ 2613 2596 2614 2597 2615 #include "moc_qwebpage.cpp" -
trunk/WebKit/qt/Api/qwebpage.h
r39173 r39210 47 47 class QWebPluginFactory; 48 48 class QWebHitTestResult; 49 class QWebHistoryItem; 49 50 50 51 namespace WebCore { … … 290 291 void databaseQuotaExceeded(QWebFrame* frame, QString databaseName); 291 292 293 void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item); 294 void restoreFrameStateRequested(QWebFrame* frame); 295 292 296 protected: 293 297 virtual QWebPage *createWindow(WebWindowType type); -
trunk/WebKit/qt/ChangeLog
r39201 r39210 1 2008-12-11 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 Allow applications to save and restore their state between loads. 6 7 * Api/qwebframe.cpp: 8 * Api/qwebframe.h: 9 * WebCoreSupport/FrameLoaderClientQt.cpp: 10 (WebCore::FrameLoaderClientQt::restoreViewState): 11 (WebCore::FrameLoaderClientQt::saveViewStateToItem): 12 * tests/qwebpage/tst_qwebpage.cpp: 13 (tst_QWebPage::modified): 14 1 15 2008-12-08 Tor Arne Vestbø <tavestbo@trolltech.com> 2 16 -
trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r39201 r39210 525 525 void FrameLoaderClientQt::restoreViewState() 526 526 { 527 notImplemented(); 527 if (!m_webFrame) 528 return; 529 emit m_webFrame->page()->restoreFrameStateRequested(m_webFrame); 528 530 } 529 531 … … 620 622 { 621 623 QWebHistoryItem historyItem(new QWebHistoryItemPrivate(item)); 622 emit m_webFrame-> aboutToUpdateHistory(&historyItem);624 emit m_webFrame->page()->saveFrameStateRequested(m_webFrame, &historyItem); 623 625 } 624 626 -
trunk/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r39173 r39210 342 342 QVERIFY(m_page->history()->count() == 2); 343 343 m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>This is fifth page")); 344 QVERIFY(::waitForSignal(m_page ->mainFrame(), SIGNAL(aboutToUpdateHistory(QWebHistoryItem*))));344 QVERIFY(::waitForSignal(m_page, SIGNAL(saveFrameStateRequested(QWebFrame*, QWebHistoryItem*)))); 345 345 } 346 346
Note: See TracChangeset
for help on using the changeset viewer.