Changeset 200770 in webkit
- Timestamp:
- May 12, 2016, 7:48:03 AM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r200769 r200770 1 2016-05-12 Konstantin Tokarev <annulen@yandex.ru> 2 3 Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem. 4 https://bugs.webkit.org/show_bug.cgi?id=157624 5 6 Reviewed by Darin Adler. 7 8 No new tests needed. 9 10 * loader/EmptyClients.h: 11 * loader/FrameLoaderClient.h: 12 * loader/HistoryController.cpp: 13 (WebCore::HistoryController::saveScrollPositionAndViewStateToItem): 14 1 15 2016-05-12 Antoine Quint <graouts@apple.com> 2 16 -
trunk/Source/WebCore/loader/EmptyClients.h
r199955 r200770 377 377 bool shouldGoToHistoryItem(HistoryItem*) const override { return false; } 378 378 void updateGlobalHistoryItemForPage() override { } 379 void saveViewStateToItem(HistoryItem *) override { }379 void saveViewStateToItem(HistoryItem&) override { } 380 380 bool canCachePage() const override { return false; } 381 381 void didDisplayInsecureContent() override { } -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r200519 r200770 247 247 248 248 virtual void frameLoadCompleted() = 0; 249 virtual void saveViewStateToItem(HistoryItem *) = 0;249 virtual void saveViewStateToItem(HistoryItem&) = 0; 250 250 virtual void restoreViewState() = 0; 251 251 virtual void provisionalLoadStarted() = 0; -
trunk/Source/WebCore/loader/HistoryController.cpp
r200470 r200770 95 95 96 96 // FIXME: It would be great to work out a way to put this code in WebCore instead of calling through to the client. 97 m_frame.loader().client().saveViewStateToItem( item);97 m_frame.loader().client().saveViewStateToItem(*item); 98 98 99 99 // Notify clients that the HistoryItem has changed. -
trunk/Source/WebKit/mac/ChangeLog
r200747 r200770 1 2016-05-12 Konstantin Tokarev <annulen@yandex.ru> 2 3 Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem. 4 https://bugs.webkit.org/show_bug.cgi?id=157624 5 6 Reviewed by Darin Adler. 7 8 * WebCoreSupport/WebFrameLoaderClient.h: 9 * WebCoreSupport/WebFrameLoaderClient.mm: 10 (WebFrameLoaderClient::saveViewStateToItem): 11 * WebView/WebFrame.mm: 12 (-[WebFrame _saveViewState]): 13 1 14 2016-05-12 Csaba Osztrogonác <ossy@webkit.org> 2 15 -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
r199673 r200770 192 192 193 193 void frameLoadCompleted() override; 194 void saveViewStateToItem(WebCore::HistoryItem *) override;194 void saveViewStateToItem(WebCore::HistoryItem&) override; 195 195 void restoreViewState() override; 196 196 void provisionalLoadStarted() override; -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r199673 r200770 1225 1225 } 1226 1226 1227 void WebFrameLoaderClient::saveViewStateToItem(HistoryItem* item) 1228 { 1229 if (!item) 1230 return; 1231 1227 void WebFrameLoaderClient::saveViewStateToItem(HistoryItem& item) 1228 { 1232 1229 #if PLATFORM(IOS) 1233 1230 // Let UIKit handle the scroll point for the main frame. … … 1235 1232 WebView *webView = getWebView(webFrame); 1236 1233 if (webFrame == [webView mainFrame]) { 1237 [[webView _UIKitDelegateForwarder] webView:webView saveStateToHistoryItem:kit( item) forFrame:webFrame];1234 [[webView _UIKitDelegateForwarder] webView:webView saveStateToHistoryItem:kit(&item) forFrame:webFrame]; 1238 1235 return; 1239 1236 } … … 1245 1242 // case we don't want to override real data earlier gathered with (0,0) 1246 1243 if ([docView superview] && [docView conformsToProtocol:@protocol(_WebDocumentViewState)]) 1247 item ->setViewState([(id <_WebDocumentViewState>)docView viewState]);1244 item.setViewState([(id <_WebDocumentViewState>)docView viewState]); 1248 1245 } 1249 1246 -
trunk/Source/WebKit/mac/WebView/WebFrame.mm
r200696 r200770 1301 1301 ASSERT(!WebThreadIsEnabled() || WebThreadIsLocked()); 1302 1302 FrameLoader& frameLoader = _private->coreFrame->loader(); 1303 frameLoader.client().saveViewStateToItem(frameLoader.history().currentItem()); 1303 auto* item = frameLoader.history().currentItem(); 1304 if (item) 1305 frameLoader.client().saveViewStateToItem(*item); 1304 1306 } 1305 1307 -
trunk/Source/WebKit/win/ChangeLog
r200696 r200770 1 2016-05-12 Konstantin Tokarev <annulen@yandex.ru> 2 3 Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem. 4 https://bugs.webkit.org/show_bug.cgi?id=157624 5 6 Reviewed by Darin Adler. 7 8 * WebCoreSupport/WebFrameLoaderClient.cpp: 9 (WebFrameLoaderClient::saveViewStateToItem): 10 * WebCoreSupport/WebFrameLoaderClient.h: 11 1 12 2016-05-11 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
r199673 r200770 916 916 } 917 917 918 void WebFrameLoaderClient::saveViewStateToItem(HistoryItem *)918 void WebFrameLoaderClient::saveViewStateToItem(HistoryItem&) 919 919 { 920 920 } -
trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
r199673 r200770 168 168 169 169 void frameLoadCompleted() override; 170 void saveViewStateToItem(WebCore::HistoryItem *) override;170 void saveViewStateToItem(WebCore::HistoryItem&) override; 171 171 void restoreViewState() override; 172 172 void provisionalLoadStarted() override; -
trunk/Source/WebKit2/ChangeLog
r200747 r200770 1 2016-05-12 Konstantin Tokarev <annulen@yandex.ru> 2 3 Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem. 4 https://bugs.webkit.org/show_bug.cgi?id=157624 5 6 Reviewed by Darin Adler. 7 8 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 9 (WebKit::WebFrameLoaderClient::saveViewStateToItem): 10 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 11 1 12 2016-05-12 Csaba Osztrogonác <ossy@webkit.org> 2 13 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r200611 r200770 1198 1198 } 1199 1199 1200 void WebFrameLoaderClient::saveViewStateToItem(HistoryItem *historyItem)1200 void WebFrameLoaderClient::saveViewStateToItem(HistoryItem& historyItem) 1201 1201 { 1202 1202 #if PLATFORM(IOS) || PLATFORM(EFL) 1203 1203 if (m_frame->isMainFrame()) 1204 m_frame->page()->savePageState( *historyItem);1204 m_frame->page()->savePageState(historyItem); 1205 1205 #else 1206 1206 UNUSED_PARAM(historyItem); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
r199673 r200770 165 165 166 166 void frameLoadCompleted() override; 167 void saveViewStateToItem(WebCore::HistoryItem *) override;167 void saveViewStateToItem(WebCore::HistoryItem&) override; 168 168 void restoreViewState() override; 169 169 void provisionalLoadStarted() override;
Note:
See TracChangeset
for help on using the changeset viewer.