Changeset 237233 in webkit
- Timestamp:
- Oct 17, 2018, 1:37:36 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r237231 r237233 1 2018-10-17 Alex Christensen <achristensen@webkit.org> 2 3 BackForwardClient needs to be able to support UIProcess-only back/forward lists 4 https://bugs.webkit.org/show_bug.cgi?id=190675 5 6 Reviewed by Chris Dumez. 7 8 Return a RefPtr<HistoryItem> instead of a HistoryItem so that we will be able to return a 9 HistoryItem that has been created instead of a pointer to a HistoryItem that is owned by something else. 10 Also use unsigned for the back and forward list counts because they can never be negative. 11 12 * history/BackForwardClient.h: 13 * history/BackForwardController.cpp: 14 (WebCore::BackForwardController::backItem): 15 (WebCore::BackForwardController::currentItem): 16 (WebCore::BackForwardController::forwardItem): 17 (WebCore::BackForwardController::canGoBackOrForward const): 18 (WebCore::BackForwardController::goBackOrForward): 19 (WebCore::BackForwardController::goBack): 20 (WebCore::BackForwardController::goForward): 21 (WebCore::BackForwardController::count const): 22 (WebCore::BackForwardController::backCount const): 23 (WebCore::BackForwardController::forwardCount const): 24 (WebCore::BackForwardController::itemAtIndex): 25 * history/BackForwardController.h: 26 (WebCore::BackForwardController::backItem): Deleted. 27 (WebCore::BackForwardController::currentItem): Deleted. 28 (WebCore::BackForwardController::forwardItem): Deleted. 29 * loader/EmptyClients.cpp: 30 * loader/NavigationScheduler.cpp: 31 (WebCore::NavigationScheduler::scheduleHistoryNavigation): 32 1 33 2018-10-17 Antoine Quint <graouts@apple.com> 2 34 -
trunk/Source/WebCore/history/BackForwardClient.h
r237184 r237233 45 45 virtual void goToItem(HistoryItem&) = 0; 46 46 47 virtual HistoryItem*itemAtIndex(int) = 0;48 virtual intbackListCount() const = 0;49 virtual intforwardListCount() const = 0;47 virtual RefPtr<HistoryItem> itemAtIndex(int) = 0; 48 virtual unsigned backListCount() const = 0; 49 virtual unsigned forwardListCount() const = 0; 50 50 51 51 virtual void close() = 0; -
trunk/Source/WebCore/history/BackForwardController.cpp
r237184 r237233 28 28 29 29 #include "BackForwardClient.h" 30 #include "HistoryItem.h" 30 31 #include "Page.h" 31 32 #include "ShouldTreatAsContinuingLoad.h" … … 41 42 BackForwardController::~BackForwardController() = default; 42 43 44 RefPtr<HistoryItem> BackForwardController::backItem() 45 { 46 return itemAtIndex(-1); 47 } 48 49 RefPtr<HistoryItem> BackForwardController::currentItem() 50 { 51 return itemAtIndex(0); 52 } 53 54 RefPtr<HistoryItem> BackForwardController::forwardItem() 55 { 56 return itemAtIndex(1); 57 } 58 43 59 bool BackForwardController::canGoBackOrForward(int distance) const 44 60 { 45 61 if (!distance) 46 62 return true; 47 if (distance > 0 && distance<= forwardCount())63 if (distance > 0 && static_cast<unsigned>(distance) <= forwardCount()) 48 64 return true; 49 if (distance < 0 && -distance<= backCount())65 if (distance < 0 && static_cast<unsigned>(-distance) <= backCount()) 50 66 return true; 51 67 return false; … … 57 73 return; 58 74 59 HistoryItem* item = itemAtIndex(distance);60 if (! item) {75 auto historyItem = itemAtIndex(distance); 76 if (!historyItem) { 61 77 if (distance > 0) { 62 78 if (int forwardCount = this->forwardCount()) 63 item = itemAtIndex(forwardCount);79 historyItem = itemAtIndex(forwardCount); 64 80 } else { 65 81 if (int backCount = this->backCount()) 66 item = itemAtIndex(-backCount);82 historyItem = itemAtIndex(-backCount); 67 83 } 68 84 } 69 85 70 if (! item)86 if (!historyItem) 71 87 return; 72 88 73 m_page.goToItem(* item, FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No);89 m_page.goToItem(*historyItem, FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No); 74 90 } 75 91 76 92 bool BackForwardController::goBack() 77 93 { 78 HistoryItem* item = backItem();79 if (! item)94 auto historyItem = backItem(); 95 if (!historyItem) 80 96 return false; 81 97 82 m_page.goToItem(* item, FrameLoadType::Back, ShouldTreatAsContinuingLoad::No);98 m_page.goToItem(*historyItem, FrameLoadType::Back, ShouldTreatAsContinuingLoad::No); 83 99 return true; 84 100 } … … 86 102 bool BackForwardController::goForward() 87 103 { 88 HistoryItem* item = forwardItem();89 if (! item)104 auto historyItem = forwardItem(); 105 if (!historyItem) 90 106 return false; 91 107 92 m_page.goToItem(* item, FrameLoadType::Forward, ShouldTreatAsContinuingLoad::No);108 m_page.goToItem(*historyItem, FrameLoadType::Forward, ShouldTreatAsContinuingLoad::No); 93 109 return true; 94 110 } … … 104 120 } 105 121 106 intBackForwardController::count() const122 unsigned BackForwardController::count() const 107 123 { 108 124 return m_client->backListCount() + 1 + m_client->forwardListCount(); 109 125 } 110 126 111 intBackForwardController::backCount() const127 unsigned BackForwardController::backCount() const 112 128 { 113 129 return m_client->backListCount(); 114 130 } 115 131 116 intBackForwardController::forwardCount() const132 unsigned BackForwardController::forwardCount() const 117 133 { 118 134 return m_client->forwardListCount(); 119 135 } 120 136 121 HistoryItem*BackForwardController::itemAtIndex(int i)137 RefPtr<HistoryItem> BackForwardController::itemAtIndex(int i) 122 138 { 123 139 return m_client->itemAtIndex(i); -
trunk/Source/WebCore/history/BackForwardController.h
r237184 r237233 54 54 void setCurrentItem(HistoryItem&); 55 55 56 intcount() const;57 WEBCORE_EXPORT intbackCount() const;58 WEBCORE_EXPORT intforwardCount() const;56 unsigned count() const; 57 WEBCORE_EXPORT unsigned backCount() const; 58 WEBCORE_EXPORT unsigned forwardCount() const; 59 59 60 WEBCORE_EXPORT HistoryItem*itemAtIndex(int);60 WEBCORE_EXPORT RefPtr<HistoryItem> itemAtIndex(int); 61 61 62 62 void close(); 63 63 64 HistoryItem* backItem() { return itemAtIndex(-1); }65 HistoryItem* currentItem() { return itemAtIndex(0); }66 HistoryItem* forwardItem() { return itemAtIndex(1); }64 WEBCORE_EXPORT RefPtr<HistoryItem> backItem(); 65 WEBCORE_EXPORT RefPtr<HistoryItem> currentItem(); 66 WEBCORE_EXPORT RefPtr<HistoryItem> forwardItem(); 67 67 68 68 private: -
trunk/Source/WebCore/loader/EmptyClients.cpp
r237184 r237233 48 48 #include "FrameNetworkingContext.h" 49 49 #include "HTMLFormElement.h" 50 #include "HistoryItem.h" 50 51 #include "InProcessIDBServer.h" 51 52 #include "InspectorClient.h" … … 85 86 void addItem(Ref<HistoryItem>&&) final { } 86 87 void goToItem(HistoryItem&) final { } 87 HistoryItem*itemAtIndex(int) final { return nullptr; }88 intbackListCount() const final { return 0; }89 intforwardListCount() const final { return 0; }88 RefPtr<HistoryItem> itemAtIndex(int) final { return nullptr; } 89 unsigned backListCount() const final { return 0; } 90 unsigned forwardListCount() const final { return 0; } 90 91 void close() final { } 91 92 }; -
trunk/Source/WebCore/loader/NavigationScheduler.cpp
r233668 r237233 478 478 // redirects. We also avoid the possibility of cancelling the current load by avoiding the scheduled redirection altogether. 479 479 BackForwardController& backForward = m_frame.page()->backForward(); 480 if (steps > backForward.forwardCount() || -steps > backForward.backCount()) { 480 if ((steps > 0 && static_cast<unsigned>(steps) > backForward.forwardCount()) 481 || (steps < 0 && static_cast<unsigned>(-steps) > backForward.backCount())) { 481 482 cancel(); 482 483 return; -
trunk/Source/WebKit/ChangeLog
r237218 r237233 1 2018-10-17 Alex Christensen <achristensen@webkit.org> 2 3 BackForwardClient needs to be able to support UIProcess-only back/forward lists 4 https://bugs.webkit.org/show_bug.cgi?id=190675 5 6 Reviewed by Chris Dumez. 7 8 * UIProcess/WebBackForwardList.cpp: 9 (WebKit::WebBackForwardList::itemAtIndex const): 10 (WebKit::WebBackForwardList::backListCount const): 11 (WebKit::WebBackForwardList::forwardListCount const): 12 * UIProcess/WebBackForwardList.h: 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::WebPageProxy::backForwardBackListCount): 15 (WebKit::WebPageProxy::backForwardForwardListCount): 16 * UIProcess/WebPageProxy.h: 17 * UIProcess/WebPageProxy.messages.in: 18 * WebProcess/WebPage/WebBackForwardListProxy.cpp: 19 (WebKit::WebBackForwardListProxy::itemAtIndex): 20 (WebKit::WebBackForwardListProxy::backListCount const): 21 (WebKit::WebBackForwardListProxy::forwardListCount const): 22 * WebProcess/WebPage/WebBackForwardListProxy.h: 23 * WebProcess/WebPage/WebPage.cpp: 24 (WebKit::WebPage::dumpHistoryForTesting): 25 1 26 2018-10-17 Ali Juma <ajuma@chromium.org> 2 27 -
trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp
r237100 r237233 250 250 251 251 // Do range checks without doing math on index to avoid overflow. 252 if (index < -backListCount())252 if (index < 0 && static_cast<unsigned>(-index) > backListCount()) 253 253 return nullptr; 254 254 255 if (index > forwardListCount())255 if (index > 0 && static_cast<unsigned>(index) > forwardListCount()) 256 256 return nullptr; 257 257 258 258 return m_entries[index + *m_currentIndex].ptr(); 259 259 } 260 260 261 intWebBackForwardList::backListCount() const261 unsigned WebBackForwardList::backListCount() const 262 262 { 263 263 ASSERT(!m_currentIndex || *m_currentIndex < m_entries.size()); … … 266 266 } 267 267 268 intWebBackForwardList::forwardListCount() const268 unsigned WebBackForwardList::forwardListCount() const 269 269 { 270 270 ASSERT(!m_currentIndex || *m_currentIndex < m_entries.size()); -
trunk/Source/WebKit/UIProcess/WebBackForwardList.h
r237100 r237233 61 61 const BackForwardListItemVector& entries() const { return m_entries; } 62 62 63 intbackListCount() const;64 intforwardListCount() const;63 unsigned backListCount() const; 64 unsigned forwardListCount() const; 65 65 66 66 Ref<API::Array> backList() const; -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r237104 r237233 4987 4987 } 4988 4988 4989 void WebPageProxy::backForwardBackListCount( int32_t& count)4989 void WebPageProxy::backForwardBackListCount(uint32_t& count) 4990 4990 { 4991 4991 count = m_backForwardList->backListCount(); 4992 4992 } 4993 4993 4994 void WebPageProxy::backForwardForwardListCount( int32_t& count)4994 void WebPageProxy::backForwardForwardListCount(uint32_t& count) 4995 4995 { 4996 4996 count = m_backForwardList->forwardListCount(); -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r237110 r237233 1568 1568 void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, SandboxExtension::Handle&); 1569 1569 void backForwardItemAtIndex(int32_t index, std::optional<WebCore::BackForwardItemIdentifier>&); 1570 void backForwardBackListCount( int32_t& count);1571 void backForwardForwardListCount( int32_t& count);1570 void backForwardBackListCount(uint32_t& count); 1571 void backForwardForwardListCount(uint32_t& count); 1572 1572 void backForwardClear(); 1573 1573 -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r237110 r237233 231 231 BackForwardGoToItem(struct WebCore::BackForwardItemIdentifier itemID) -> (WebKit::SandboxExtension::Handle sandboxExtensionHandle) 232 232 BackForwardItemAtIndex(int32_t itemIndex) -> (std::optional<WebCore::BackForwardItemIdentifier> itemID) 233 BackForwardBackListCount() -> ( int32_t count)234 BackForwardForwardListCount() -> ( int32_t count)233 BackForwardBackListCount() -> (uint32_t count) 234 BackForwardForwardListCount() -> (uint32_t count) 235 235 BackForwardClear() 236 236 WillGoToBackForwardListItem(struct WebCore::BackForwardItemIdentifier itemID, bool inPageCache) -
trunk/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp
r237184 r237233 111 111 } 112 112 113 HistoryItem*WebBackForwardListProxy::itemAtIndex(int itemIndex)113 RefPtr<HistoryItem> WebBackForwardListProxy::itemAtIndex(int itemIndex) 114 114 { 115 115 if (!m_page) … … 126 126 } 127 127 128 intWebBackForwardListProxy::backListCount() const128 unsigned WebBackForwardListProxy::backListCount() const 129 129 { 130 130 if (!m_page) 131 131 return 0; 132 132 133 intbackListCount = 0;133 unsigned backListCount = 0; 134 134 if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page->pageID())) 135 135 return 0; … … 138 138 } 139 139 140 intWebBackForwardListProxy::forwardListCount() const140 unsigned WebBackForwardListProxy::forwardListCount() const 141 141 { 142 142 if (!m_page) 143 143 return 0; 144 144 145 intforwardListCount = 0;145 unsigned forwardListCount = 0; 146 146 if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page->pageID())) 147 147 return 0; -
trunk/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h
r237184 r237233 59 59 void goToItem(WebCore::HistoryItem&) override; 60 60 61 WebCore::HistoryItem*itemAtIndex(int) override;62 intbackListCount() const override;63 intforwardListCount() const override;61 RefPtr<WebCore::HistoryItem> itemAtIndex(int) override; 62 unsigned backListCount() const override; 63 unsigned forwardListCount() const override; 64 64 65 65 void close() override; -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r237218 r237233 1667 1667 if (list.itemAtIndex(begin)->url() == blankURL()) 1668 1668 ++begin; 1669 for (int i = begin; i <= list.forwardCount(); ++i)1669 for (int i = begin; i <= static_cast<int>(list.forwardCount()); ++i) 1670 1670 dumpHistoryItem(*list.itemAtIndex(i), 8, !i, builder, directory); 1671 1671 return builder.toString(); -
trunk/Source/WebKitLegacy/mac/ChangeLog
r237204 r237233 1 2018-10-17 Alex Christensen <achristensen@webkit.org> 2 3 BackForwardClient needs to be able to support UIProcess-only back/forward lists 4 https://bugs.webkit.org/show_bug.cgi?id=190675 5 6 Reviewed by Chris Dumez. 7 8 * History/BackForwardList.h: 9 * History/BackForwardList.mm: 10 (BackForwardList::backItem): 11 (BackForwardList::currentItem): 12 (BackForwardList::forwardItem): 13 (BackForwardList::backListCount const): 14 (BackForwardList::forwardListCount const): 15 (BackForwardList::itemAtIndex): 16 * History/WebBackForwardList.mm: 17 (-[WebBackForwardList backItem]): 18 (-[WebBackForwardList currentItem]): 19 (-[WebBackForwardList forwardItem]): 20 (-[WebBackForwardList itemAtIndex:]): 21 1 22 2018-10-16 Timothy Hatcher <timothy@apple.com> 2 23 -
trunk/Source/WebKitLegacy/mac/History/BackForwardList.h
r237184 r237233 48 48 void goToItem(WebCore::HistoryItem&) override; 49 49 50 WebCore::HistoryItem*backItem();51 WebCore::HistoryItem*currentItem();52 WebCore::HistoryItem*forwardItem();53 WebCore::HistoryItem*itemAtIndex(int) override;50 RefPtr<WebCore::HistoryItem> backItem(); 51 RefPtr<WebCore::HistoryItem> currentItem(); 52 RefPtr<WebCore::HistoryItem> forwardItem(); 53 RefPtr<WebCore::HistoryItem> itemAtIndex(int) override; 54 54 55 55 void backListWithLimit(int, Vector<Ref<WebCore::HistoryItem>>&); … … 60 60 bool enabled(); 61 61 void setEnabled(bool); 62 intbackListCount() const override;63 intforwardListCount() const override;62 unsigned backListCount() const override; 63 unsigned forwardListCount() const override; 64 64 bool containsItem(WebCore::HistoryItem&); 65 65 -
trunk/Source/WebKitLegacy/mac/History/BackForwardList.mm
r237184 r237233 107 107 } 108 108 109 HistoryItem*BackForwardList::backItem()109 RefPtr<HistoryItem> BackForwardList::backItem() 110 110 { 111 111 if (m_current && m_current != NoCurrentItemIndex) 112 return m_entries[m_current - 1]. ptr();112 return m_entries[m_current - 1].copyRef(); 113 113 return nullptr; 114 114 } 115 115 116 HistoryItem*BackForwardList::currentItem()116 RefPtr<HistoryItem> BackForwardList::currentItem() 117 117 { 118 118 if (m_current != NoCurrentItemIndex) 119 return m_entries[m_current]. ptr();119 return m_entries[m_current].copyRef(); 120 120 return nullptr; 121 121 } 122 122 123 HistoryItem*BackForwardList::forwardItem()123 RefPtr<HistoryItem> BackForwardList::forwardItem() 124 124 { 125 125 if (m_entries.size() && m_current < m_entries.size() - 1) 126 return m_entries[m_current + 1]. ptr();126 return m_entries[m_current + 1].copyRef(); 127 127 return nullptr; 128 128 } … … 190 190 } 191 191 192 intBackForwardList::backListCount() const192 unsigned BackForwardList::backListCount() const 193 193 { 194 194 return m_current == NoCurrentItemIndex ? 0 : m_current; 195 195 } 196 196 197 intBackForwardList::forwardListCount() const198 { 199 return m_current == NoCurrentItemIndex ? 0 : static_cast<int>(m_entries.size()) - (m_current + 1);200 } 201 202 HistoryItem*BackForwardList::itemAtIndex(int index)197 unsigned BackForwardList::forwardListCount() const 198 { 199 return m_current == NoCurrentItemIndex ? 0 : m_entries.size() - m_current - 1; 200 } 201 202 RefPtr<HistoryItem> BackForwardList::itemAtIndex(int index) 203 203 { 204 204 // Do range checks without doing math on index to avoid overflow. … … 206 206 return nullptr; 207 207 208 if (index > forwardListCount())208 if (index > static_cast<int>(forwardListCount())) 209 209 return nullptr; 210 211 return m_entries[index + m_current]. ptr();210 211 return m_entries[index + m_current].copyRef(); 212 212 } 213 213 -
trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm
r237184 r237233 226 226 - (WebHistoryItem *)backItem 227 227 { 228 return [[kit(core(self)->backItem() ) retain] autorelease];228 return [[kit(core(self)->backItem().get()) retain] autorelease]; 229 229 } 230 230 231 231 - (WebHistoryItem *)currentItem 232 232 { 233 return [[kit(core(self)->currentItem() ) retain] autorelease];233 return [[kit(core(self)->currentItem().get()) retain] autorelease]; 234 234 } 235 235 236 236 - (WebHistoryItem *)forwardItem 237 237 { 238 return [[kit(core(self)->forwardItem() ) retain] autorelease];238 return [[kit(core(self)->forwardItem().get()) retain] autorelease]; 239 239 } 240 240 … … 358 358 - (WebHistoryItem *)itemAtIndex:(int)index 359 359 { 360 return [[kit(core(self)->itemAtIndex(index) ) retain] autorelease];360 return [[kit(core(self)->itemAtIndex(index).get()) retain] autorelease]; 361 361 } 362 362 -
trunk/Source/WebKitLegacy/win/BackForwardList.cpp
r237184 r237233 114 114 } 115 115 116 HistoryItem*BackForwardList::backItem()116 RefPtr<HistoryItem> BackForwardList::backItem() 117 117 { 118 118 if (m_current && m_current != NoCurrentItemIndex) 119 return m_entries[m_current - 1]. ptr();119 return m_entries[m_current - 1].copyRef(); 120 120 return nullptr; 121 121 } 122 122 123 HistoryItem*BackForwardList::currentItem()123 RefPtr<HistoryItem> BackForwardList::currentItem() 124 124 { 125 125 if (m_current != NoCurrentItemIndex) 126 return m_entries[m_current]. ptr();126 return m_entries[m_current].copyRef(); 127 127 return nullptr; 128 128 } 129 129 130 HistoryItem*BackForwardList::forwardItem()130 RefPtr<HistoryItem> BackForwardList::forwardItem() 131 131 { 132 132 if (m_entries.size() && m_current < m_entries.size() - 1) 133 return m_entries[m_current + 1]. ptr();133 return m_entries[m_current + 1].copyRef(); 134 134 return nullptr; 135 135 } … … 197 197 } 198 198 199 intBackForwardList::backListCount() const199 unsigned BackForwardList::backListCount() const 200 200 { 201 201 return m_current == NoCurrentItemIndex ? 0 : m_current; 202 202 } 203 203 204 intBackForwardList::forwardListCount() const205 { 206 return m_current == NoCurrentItemIndex ? 0 : (int)m_entries.size() - (m_current + 1);207 } 208 209 HistoryItem*BackForwardList::itemAtIndex(int index)204 unsigned BackForwardList::forwardListCount() const 205 { 206 return m_current == NoCurrentItemIndex ? 0 : m_entries.size() - m_current - 1; 207 } 208 209 RefPtr<HistoryItem> BackForwardList::itemAtIndex(int index) 210 210 { 211 211 // Do range checks without doing math on index to avoid overflow. … … 213 213 return nullptr; 214 214 215 if (index > forwardListCount())215 if (index > static_cast<int>(forwardListCount())) 216 216 return nullptr; 217 218 return m_entries[index + m_current]. ptr();217 218 return m_entries[index + m_current].copyRef(); 219 219 } 220 220 -
trunk/Source/WebKitLegacy/win/BackForwardList.h
r237184 r237233 45 45 void goToItem(WebCore::HistoryItem&) override; 46 46 47 WebCore::HistoryItem*backItem();48 WebCore::HistoryItem*currentItem();49 WebCore::HistoryItem*forwardItem();50 WebCore::HistoryItem*itemAtIndex(int) override;47 RefPtr<WebCore::HistoryItem> backItem(); 48 RefPtr<WebCore::HistoryItem> currentItem(); 49 RefPtr<WebCore::HistoryItem> forwardItem(); 50 RefPtr<WebCore::HistoryItem> itemAtIndex(int) override; 51 51 52 52 void backListWithLimit(int, HistoryItemVector&); … … 57 57 bool enabled(); 58 58 void setEnabled(bool); 59 intbackListCount() const final;60 intforwardListCount() const final;59 unsigned backListCount() const final; 60 unsigned forwardListCount() const final; 61 61 bool containsItem(WebCore::HistoryItem*); 62 62 -
trunk/Source/WebKitLegacy/win/ChangeLog
r237194 r237233 1 2018-10-17 Alex Christensen <achristensen@webkit.org> 2 3 BackForwardClient needs to be able to support UIProcess-only back/forward lists 4 https://bugs.webkit.org/show_bug.cgi?id=190675 5 6 Reviewed by Chris Dumez. 7 8 * BackForwardList.cpp: 9 (BackForwardList::backItem): 10 (BackForwardList::currentItem): 11 (BackForwardList::forwardItem): 12 (BackForwardList::backListCount const): 13 (BackForwardList::forwardListCount const): 14 (BackForwardList::itemAtIndex): 15 * BackForwardList.h: 16 1 17 2018-10-16 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/Source/WebKitLegacy/win/WebBackForwardList.cpp
r237184 r237233 157 157 return E_POINTER; 158 158 *item = nullptr; 159 HistoryItem*historyItem = m_backForwardList->backItem();159 auto historyItem = m_backForwardList->backItem(); 160 160 161 161 if (!historyItem) 162 162 return E_FAIL; 163 163 164 *item = WebHistoryItem::createInstance(historyItem );164 *item = WebHistoryItem::createInstance(historyItem.get()); 165 165 return S_OK; 166 166 } … … 172 172 *item = nullptr; 173 173 174 HistoryItem*historyItem = m_backForwardList->currentItem();174 auto historyItem = m_backForwardList->currentItem(); 175 175 if (!historyItem) 176 176 return E_FAIL; 177 177 178 *item = WebHistoryItem::createInstance(historyItem );178 *item = WebHistoryItem::createInstance(historyItem.get()); 179 179 return S_OK; 180 180 } … … 186 186 *item = nullptr; 187 187 188 HistoryItem*historyItem = m_backForwardList->forwardItem();188 auto historyItem = m_backForwardList->forwardItem(); 189 189 if (!historyItem) 190 190 return E_FAIL; 191 191 192 *item = WebHistoryItem::createInstance(historyItem );192 *item = WebHistoryItem::createInstance(historyItem.get()); 193 193 return S_OK; 194 194 } … … 284 284 *item = nullptr; 285 285 286 HistoryItem*historyItem = m_backForwardList->itemAtIndex(index);286 auto historyItem = m_backForwardList->itemAtIndex(index); 287 287 if (!historyItem) 288 288 return E_FAIL; 289 289 290 *item = WebHistoryItem::createInstance(historyItem );290 *item = WebHistoryItem::createInstance(historyItem.get()); 291 291 return S_OK; 292 292 }
Note:
See TracChangeset
for help on using the changeset viewer.