Changeset 284875 in webkit
- Timestamp:
- Oct 26, 2021, 10:06:43 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r284874 r284875 1 2021-10-26 Kate Cheney <katherine_cheney@apple.com> 2 3 [ App Privacy Report ] Restoring a session after clearing the cache results in app initiated loads in Safari 4 https://bugs.webkit.org/show_bug.cgi?id=232292 5 <rdar://problem/84597422> 6 7 Reviewed by Brent Fulgham. 8 9 Update session restore code to also set the app initiated value on 10 the current document loader. Previously, this was only set on the new 11 document loader. This is a problem because the main resource load 12 uses the old document loader, so if we restore from a previous session 13 state, the main resource load will have the incorrect attribution 14 value. 15 16 * WebProcess/WebPage/WebPage.cpp: 17 (WebKit::WebPage::goToBackForwardItem): 18 1 19 2021-10-26 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r284628 r284875 1895 1895 1896 1896 m_lastNavigationWasAppInitiated = lastNavigationWasAppInitiated; 1897 if (auto* documentLoader = corePage()->mainFrame().loader().documentLoader()) 1898 documentLoader->setLastNavigationWasAppInitiated(lastNavigationWasAppInitiated); 1897 1899 1898 1900 ASSERT(isBackForwardLoadType(backForwardType)); -
trunk/Tools/ChangeLog
r284870 r284875 1 2021-10-26 Kate Cheney <katherine_cheney@apple.com> 2 3 [ App Privacy Report ] Restoring a session after clearing the cache results in app initiated loads in Safari 4 https://bugs.webkit.org/show_bug.cgi?id=232292 5 <rdar://problem/84597422> 6 7 Reviewed by Brent Fulgham. 8 9 Update API test in 2 ways. First, close the original WebView to 10 destroy the page's document loader as if the application was being 11 quit. Second, clear history to make sure there are no cached loads. 12 13 * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 14 1 15 2021-10-26 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm
r284721 r284875 748 748 RetainPtr<_WKSessionState> sessionState = [webView1 _sessionState]; 749 749 sessionState.get().isAppInitiated = isAppInitiated == IsAppInitiated::Yes ? true : false; 750 webView1 = nullptr; 750 [webView1 _close]; 751 752 static bool isDone = false; 753 [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^() { 754 isDone = true; 755 }]; 756 TestWebKitAPI::Util::run(&isDone); 751 757 752 758 auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]); 753 754 759 [webView2 _restoreSessionState:sessionState.get() andNavigate:YES]; 755 760 [webView2 _test_waitForDidFinishNavigation]; … … 757 762 EXPECT_WK_STREQ(@"https://www.apple.com/", [[webView2 URL] absoluteString]); 758 763 759 static boolisDone = false;764 isDone = false; 760 765 bool expectingAppInitiatedRequests = isAppInitiated == IsAppInitiated::Yes ? true : false; 761 766 [webView2 _appPrivacyReportTestingData:^(struct WKAppPrivacyReportTestingData data) {
Note:
See TracChangeset
for help on using the changeset viewer.