WebKit Bugzilla
Attachment 360128 Details for
Bug 193831
: REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193831-20190125105745.patch (text/plain), 7.57 KB, created by
Dean Jackson
on 2019-01-25 10:57:46 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2019-01-25 10:57:46 PST
Size:
7.57 KB
patch
obsolete
>Subversion Revision: 240244 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a5a43217e29e103a72c2ebfeb06e8c1e866fef36..47a1c7a0a5571c460c6f5b69fafaf40866d02ff1 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-25 Dean Jackson <dino@apple.com> >+ >+ REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL >+ https://bugs.webkit.org/show_bug.cgi?id=193831 >+ <rdar://problem/47399263> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ A System Preview (<a rel="ar">) displays in a modal and doesn't trigger >+ a navigation. If the link was cross origin, it was causing a process swap, >+ which meant that the response defaulted back to a navigation. >+ >+ The fix is to not cause a PSON when the navigation is a forced download. >+ >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::processForNavigationInternal): >+ > 2019-01-21 Brent Fulgham <bfulgham@apple.com> > > Implement message handlers for NetworkProcess-based ResourceLoadStatistics >diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp >index 23c58fa9d1058dc0e0c5af3b31c678fe4cfb27fd..c19a09ac39c3489b5c8e6d1b40aa9821e7ab46bd 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.cpp >+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp >@@ -2198,6 +2198,9 @@ void WebProcessPool::processForNavigationInternal(WebPageProxy& page, const API: > if (navigation.treatAsSameOriginNavigation()) > return completionHandler(page.process(), nullptr, "The treatAsSameOriginNavigation flag is set"_s); > >+ if (navigation.shouldForceDownload()) >+ return completionHandler(page.process(), nullptr, "Navigation is a forced download"_s); >+ > URL sourceURL; > if (page.isPageOpenedByDOMShowingInitialEmptyDocument() && !navigation.requesterOrigin().isEmpty()) > sourceURL = URL { URL(), navigation.requesterOrigin().toString() }; >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index b0e3cc2bb9c00ec5c51805c14a35743d544f2f32..5fe25a953fb274299b49c2e4551b349270cc14f9 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,25 @@ >+2019-01-25 Dean Jackson <dino@apple.com> >+ >+ REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL >+ https://bugs.webkit.org/show_bug.cgi?id=193831 >+ <rdar://problem/47399263> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Two new tests for <a rel="ar"> links, that shouldn't trigger >+ a process swap. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: >+ >+2019-01-25 Dean Jackson <dino@apple.com> >+ >+ REGRESSION: Some USDz from 3rd party websites don't go directly to AR QL >+ https://bugs.webkit.org/show_bug.cgi?id=193831 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: >+ > 2019-01-21 Zalan Bujtas <zalan@apple.com> > > [LFC][Floats] Take float top position into account when computing containing block height. >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >index fda46a597c8d3c03e3d04834dc31ea6250a2e230..11e70a24fa6c44d977840493c93243537dda8c73 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >@@ -1577,6 +1577,98 @@ TEST(ProcessSwap, CrossSiteDownload) > done = false; > } > >+#if USE(SYSTEM_PREVIEW) >+ >+static const char* systemPreviewSameOriginTestBytes = R"PSONRESOURCE( >+<body> >+ <a id="testLink" rel="ar" href="pson://www.webkit.org/whatever"> >+ <img src="http://www.webkit.org/image"> >+ </a> >+</body> >+)PSONRESOURCE"; >+ >+static const char* systemPreviewCrossOriginTestBytes = R"PSONRESOURCE( >+<body> >+ <a id="testLink" rel="ar" href="pson://www.apple.com/whatever"> >+ <img src="http://www.webkit.org/image"> >+ </a> >+</body> >+)PSONRESOURCE"; >+ >+TEST(ProcessSwap, SameOriginSystemPreview) >+{ >+ auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); >+ processPoolConfiguration.get().processSwapsOnNavigation = YES; >+ auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); >+ >+ auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ [webViewConfiguration setProcessPool:processPool.get()]; >+ auto handler = adoptNS([[PSONScheme alloc] init]); >+ [handler addMappingFromURLString:@"pson://www.webkit.org/main.html" toData:systemPreviewSameOriginTestBytes]; >+ [handler addMappingFromURLString:@"pson://www.webkit.org/whatever" toData:"Fake USDZ data"]; >+ [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"pson"]; >+ >+ auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); >+ auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); >+ [webView setNavigationDelegate:navigationDelegate.get()]; >+ >+ NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; >+ [webView loadRequest:request]; >+ >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pidAfterFirstLoad = [webView _webProcessIdentifier]; >+ >+ shouldConvertToDownload = true; >+ [webView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; >+ >+ TestWebKitAPI::Util::run(&failed); >+ failed = false; >+ shouldConvertToDownload = false; >+ >+ // We should still be on webkit.org. >+ EXPECT_EQ(pidAfterFirstLoad, [webView _webProcessIdentifier]); >+ EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [[webView URL] absoluteString]); >+} >+ >+TEST(ProcessSwap, CrossOriginSystemPreview) >+{ >+ auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); >+ processPoolConfiguration.get().processSwapsOnNavigation = YES; >+ auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); >+ >+ auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ [webViewConfiguration setProcessPool:processPool.get()]; >+ auto handler = adoptNS([[PSONScheme alloc] init]); >+ [handler addMappingFromURLString:@"pson://www.webkit.org/main.html" toData:systemPreviewCrossOriginTestBytes]; >+ [handler addMappingFromURLString:@"pson://www.apple.com/whatever" toData:"Fake USDZ data"]; >+ [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"pson"]; >+ >+ auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); >+ auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); >+ [webView setNavigationDelegate:navigationDelegate.get()]; >+ >+ NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; >+ [webView loadRequest:request]; >+ >+ TestWebKitAPI::Util::run(&done); >+ done = false; >+ auto pidAfterFirstLoad = [webView _webProcessIdentifier]; >+ >+ shouldConvertToDownload = true; >+ [webView evaluateJavaScript:@"testLink.click()" completionHandler:nil]; >+ >+ TestWebKitAPI::Util::run(&failed); >+ failed = false; >+ shouldConvertToDownload = false; >+ >+ // We should still be on webkit.org. >+ EXPECT_EQ(pidAfterFirstLoad, [webView _webProcessIdentifier]); >+ EXPECT_WK_STREQ(@"pson://www.webkit.org/main.html", [[webView URL] absoluteString]); >+} >+ >+#endif >+ > enum class ShouldEnablePSON { No, Yes }; > static void runClientSideRedirectTest(ShouldEnablePSON shouldEnablePSON) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193831
:
360128
|
360137
|
360191