Changeset 170664 in webkit
- Timestamp:
- Jul 1, 2014, 2:07:40 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 1 added
- 6 edited
-
ChangeLog (modified) (1 diff)
-
Shared/WebBackForwardListItem.h (modified) (1 diff)
-
UIProcess/WebBackForwardList.cpp (modified) (1 diff)
-
UIProcess/WebBackForwardList.h (modified) (1 diff)
-
UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
UIProcess/WebPageProxy.cpp.rej (added)
-
UIProcess/WebPageProxy.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r170662 r170664 1 2014-07-01 Anders Carlsson <andersca@apple.com> 2 3 Add a function for restoring page state given a SessionState object 4 https://bugs.webkit.org/show_bug.cgi?id=134509 5 6 Reviewed by Tim Horton. 7 8 * Shared/WebBackForwardListItem.h: 9 (WebKit::WebBackForwardListItem::itemState): 10 * UIProcess/WebBackForwardList.cpp: 11 (WebKit::WebBackForwardList::saveState): 12 * UIProcess/WebBackForwardList.h: 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::WebPageProxy::saveState): 15 * UIProcess/WebPageProxy.h: 16 1 17 2014-07-01 Dan Bernstein <mitz@apple.com> 2 18 -
trunk/Source/WebKit2/Shared/WebBackForwardListItem.h
r170649 r170664 55 55 56 56 uint64_t itemID() const { return m_itemID; } 57 const BackForwardListItemState& itemState() { return m_itemState; } 57 58 58 59 void setPageState(PageState pageState) { m_itemState.pageState = std::move(pageState); } -
trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp
r170649 r170664 381 381 } 382 382 383 BackForwardListState WebBackForwardList::backForwardListState(const std::function<bool (WebBackForwardListItem&)>& filter) const 384 { 385 ASSERT(!m_hasCurrentIndex || m_currentIndex < m_entries.size()); 386 387 BackForwardListState backForwardListState; 388 if (m_hasCurrentIndex) 389 backForwardListState.currentIndex = m_currentIndex; 390 391 for (size_t i = 0; i < m_entries.size(); ++i) { 392 auto& entry = *m_entries[i]; 393 394 if (filter && !filter(entry)) { 395 if (backForwardListState.currentIndex && i <= backForwardListState.currentIndex.value()) 396 --backForwardListState.currentIndex.value(); 397 398 continue; 399 } 400 401 backForwardListState.items.append(entry.itemState()); 402 } 403 404 return backForwardListState; 405 } 406 383 407 void WebBackForwardList::restoreFromState(BackForwardListState backForwardListState) 384 408 { -
trunk/Source/WebKit2/UIProcess/WebBackForwardList.h
r170644 r170664 80 80 #endif 81 81 82 BackForwardListState backForwardListState(const std::function<bool (WebBackForwardListItem&)>&) const; 82 83 void restoreFromState(BackForwardListState); 83 84 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r170660 r170664 1848 1848 #endif 1849 1849 1850 SessionState WebPageProxy::sessionState(const std::function<bool (WebBackForwardListItem&)>& filter) const 1851 { 1852 SessionState sessionState; 1853 1854 sessionState.backForwardListState = m_backForwardList->backForwardListState(filter); 1855 1856 String provisionalURLString = m_pageLoadState.pendingAPIRequestURL(); 1857 if (provisionalURLString.isEmpty()) 1858 provisionalURLString = m_pageLoadState.provisionalURL(); 1859 1860 if (!provisionalURLString.isEmpty()) 1861 sessionState.provisionalURL = URL(URL(), provisionalURLString); 1862 1863 return sessionState; 1864 } 1865 1850 1866 uint64_t WebPageProxy::restoreFromState(SessionState sessionState) 1851 1867 { -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r170660 r170664 551 551 void terminateProcess(); 552 552 553 SessionState sessionState(const std::function<bool (WebBackForwardListItem&)>&) const; 553 554 PassRefPtr<API::Data> sessionStateData(std::function<bool (WebBackForwardListItem&)>) const; 554 555 uint64_t restoreFromSessionStateData(API::Data*);
Note:
See TracChangeset
for help on using the changeset viewer.