Changeset 184056 in webkit
- Timestamp:
- May 10, 2015, 2:45:25 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/history/BackForwardClient.h (modified) (1 diff)
-
WebKit/mac/ChangeLog (modified) (1 diff)
-
WebKit/mac/WebView/WebView.mm (modified) (2 diffs)
-
WebKit/win/WebView.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r184055 r184056 1 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com> 2 3 Get rid of the public item accessors in BackForwardClient 4 https://bugs.webkit.org/show_bug.cgi?id=144827 5 6 Reviewed by Darin Adler. 7 8 Remove backItem(), currentItem(), and forwardItem() from BackForwardClient. 9 We can still use these functionalities through BackForwardController. 10 11 No new tests, no behavior change. 12 13 * history/BackForwardClient.h: 14 (WebCore::BackForwardClient::backItem): Deleted. 15 (WebCore::BackForwardClient::currentItem): Deleted. 16 (WebCore::BackForwardClient::forwardItem): Deleted. 17 1 18 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com> 2 19 -
trunk/Source/WebCore/history/BackForwardClient.h
r179472 r184056 60 60 virtual bool clearAllPageCaches() = 0; 61 61 #endif 62 63 // FIXME: Delete these once all callers are using BackForwardController64 // instead of calling this directly.65 HistoryItem* backItem() { return itemAtIndex(-1); }66 HistoryItem* currentItem() { return itemAtIndex(0); }67 HistoryItem* forwardItem() { return itemAtIndex(1); }68 62 }; 69 63 -
trunk/Source/WebKit/mac/ChangeLog
r184040 r184056 1 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com> 2 3 Get rid of the public item accessors in BackForwardClient 4 https://bugs.webkit.org/show_bug.cgi?id=144827 5 6 Reviewed by Darin Adler. 7 8 Remove backItem(), currentItem(), and forwardItem() from BackForwardClient. 9 We can still use these functionalities through BackForwardController. 10 11 No new tests, no behavior change. 12 13 * WebView/WebView.mm: 14 (-[WebView _loadBackForwardListFromOtherView:]): 15 1 16 2015-05-09 Yoav Weiss <yoav@yoav.ws> 2 17 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r183976 r184056 2009 2009 // in the back forward list, and go to the current one. 2010 2010 2011 BackForwardC lient* backForwardClient = _private->page->backForward().client();2012 ASSERT(!backForward Client->currentItem()); // destination list should be empty2013 2014 BackForwardC lient* otherBackForwardClient = otherView->_private->page->backForward().client();2015 if (!otherBackForward Client->currentItem())2011 BackForwardController& backForward = _private->page->backForward(); 2012 ASSERT(!backForward.currentItem()); // destination list should be empty 2013 2014 BackForwardController& otherBackForward = otherView->_private->page->backForward(); 2015 if (!otherBackForward.currentItem()) 2016 2016 return; // empty back forward list, bail 2017 2017 2018 2018 HistoryItem* newItemToGoTo = nullptr; 2019 2019 2020 int lastItemIndex = otherBackForward Client->forwardListCount();2021 for (int i = -otherBackForward Client->backListCount(); i <= lastItemIndex; ++i) {2020 int lastItemIndex = otherBackForward.forwardCount(); 2021 for (int i = -otherBackForward.backCount(); i <= lastItemIndex; ++i) { 2022 2022 if (i == 0) { 2023 2023 // If this item is showing , save away its current scroll and form state, … … 2026 2026 otherView->_private->page->mainFrame().loader().history().saveDocumentAndScrollState(); 2027 2027 } 2028 Ref<HistoryItem> newItem = otherBackForward Client->itemAtIndex(i)->copy();2028 Ref<HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy(); 2029 2029 if (i == 0) 2030 2030 newItemToGoTo = newItem.ptr(); 2031 backForward Client->addItem(WTF::move(newItem));2032 } 2033 2031 backForward.client()->addItem(WTF::move(newItem)); 2032 } 2033 2034 2034 ASSERT(newItemToGoTo); 2035 2035 _private->page->goToItem(*newItemToGoTo, FrameLoadType::IndexedBackForward); -
trunk/Source/WebKit/win/WebView.cpp
r183181 r184056 3966 3966 /* [retval][out] */ BOOL* result) 3967 3967 { 3968 *result = !!(m_page->backForward(). client()->backItem() && !m_page->defersLoading());3968 *result = !!(m_page->backForward().backItem() && !m_page->defersLoading()); 3969 3969 return S_OK; 3970 3970 } … … 3981 3981 /* [retval][out] */ BOOL* result) 3982 3982 { 3983 *result = !!(m_page->backForward(). client()->forwardItem() && !m_page->defersLoading());3983 *result = !!(m_page->backForward().forwardItem() && !m_page->defersLoading()); 3984 3984 return S_OK; 3985 3985 } … … 5492 5492 // type. (See behavior matrix at the top of WebFramePrivate.) So we copy all the items 5493 5493 // in the back forward list, and go to the current one. 5494 BackForwardC lient* backForwardClient = m_page->backForward().client();5495 ASSERT(!backForward Client->currentItem()); // destination list should be empty5494 BackForwardController& backForward = m_page->backForward(); 5495 ASSERT(!backForward.currentItem()); // destination list should be empty 5496 5496 5497 5497 COMPtr<WebView> otherWebView; 5498 5498 if (FAILED(otherView->QueryInterface(&otherWebView))) 5499 5499 return E_FAIL; 5500 BackForwardC lient* otherBackForwardClient = otherWebView->m_page->backForward().client();5501 if (!otherBackForward Client->currentItem())5500 BackForwardController& otherBackForward = otherWebView->m_page->backForward(); 5501 if (!otherBackForward.currentItem()) 5502 5502 return S_OK; // empty back forward list, bail 5503 5503 5504 5504 HistoryItem* newItemToGoTo = 0; 5505 5505 5506 int lastItemIndex = otherBackForward Client->forwardListCount();5507 for (int i = -otherBackForward Client->backListCount(); i <= lastItemIndex; ++i) {5506 int lastItemIndex = otherBackForward.forwardCount(); 5507 for (int i = -otherBackForward.backCount(); i <= lastItemIndex; ++i) { 5508 5508 if (!i) { 5509 5509 // If this item is showing , save away its current scroll and form state, … … 5512 5512 otherWebView->m_page->mainFrame().loader().history().saveDocumentAndScrollState(); 5513 5513 } 5514 Ref<HistoryItem> newItem = otherBackForward Client->itemAtIndex(i)->copy();5514 Ref<HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy(); 5515 5515 if (!i) 5516 5516 newItemToGoTo = newItem.ptr(); 5517 backForward Client->addItem(WTF::move(newItem));5517 backForward.client()->addItem(WTF::move(newItem)); 5518 5518 } 5519 5519
Note:
See TracChangeset
for help on using the changeset viewer.