RESOLVED FIXED183962
Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
https://bugs.webkit.org/show_bug.cgi?id=183962
Summary Do process swap when opening a cross-origin URL via window.open(url, '_blank'...
Chris Dumez
Reported 2018-03-23 16:39:27 PDT
Do process swap when opening a cross-origin URL via window.open(url,'_blank','noopener').
Attachments
WIP patch (14.90 KB, patch)
2018-03-27 10:17 PDT, Chris Dumez
ews-watchlist: commit-queue-
Archive of layout-test-results from ews101 for mac-sierra (2.32 MB, application/zip)
2018-03-27 11:24 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.34 MB, application/zip)
2018-03-27 11:54 PDT, EWS Watchlist
no flags
WIP patch (14.93 KB, patch)
2018-03-27 11:59 PDT, Chris Dumez
no flags
WIP patch (22.23 KB, patch)
2018-03-27 14:59 PDT, Chris Dumez
no flags
WIP patch (22.46 KB, patch)
2018-03-27 15:19 PDT, Chris Dumez
no flags
Patch (27.63 KB, patch)
2018-03-28 09:54 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-03-23 16:44:43 PDT
We'll extend this to all cross-origin window.open() eventually. However, the noopener case is a good start as it is much simpler to implement.
Radar WebKit Bug Importer
Comment 2 2018-03-23 20:27:01 PDT
Chris Dumez
Comment 3 2018-03-27 10:17:19 PDT
Created attachment 336592 [details] WIP patch
EWS Watchlist
Comment 4 2018-03-27 11:24:52 PDT
Comment on attachment 336592 [details] WIP patch Attachment 336592 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/7114837 New failing tests: http/tests/navigation/window-open-redirect-and-remove-opener.html fast/frames/crash-removed-iframe.html
EWS Watchlist
Comment 5 2018-03-27 11:24:53 PDT
Created attachment 336599 [details] Archive of layout-test-results from ews101 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 6 2018-03-27 11:54:18 PDT
Comment on attachment 336592 [details] WIP patch Attachment 336592 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/7114949 New failing tests: http/tests/navigation/window-open-redirect-and-remove-opener.html fast/frames/crash-removed-iframe.html
EWS Watchlist
Comment 7 2018-03-27 11:54:20 PDT
Created attachment 336604 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Chris Dumez
Comment 8 2018-03-27 11:59:41 PDT
Created attachment 336605 [details] WIP patch
Chris Dumez
Comment 9 2018-03-27 14:59:37 PDT
Created attachment 336620 [details] WIP patch
EWS Watchlist
Comment 10 2018-03-27 15:01:30 PDT
Attachment 336620 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:175: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:177: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:181: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:183: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:185: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:189: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:191: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:193: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:198: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:200: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:202: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 11 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 11 2018-03-27 15:19:17 PDT
Created attachment 336623 [details] WIP patch
EWS Watchlist
Comment 12 2018-03-27 15:21:11 PDT
Attachment 336623 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:175: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:177: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:181: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:183: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:185: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:189: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:191: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:193: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:198: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:200: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:202: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 11 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 13 2018-03-28 09:54:40 PDT
EWS Watchlist
Comment 14 2018-03-28 09:56:22 PDT
Attachment 336668 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:175: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:177: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:181: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:183: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:185: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:189: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:191: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:193: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:198: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:200: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:202: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5] Total errors found: 11 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 15 2018-03-28 13:06:59 PDT
Comment on attachment 336668 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336668&action=review I think this looks good, but you should probably get a loader expert to give the final review. > Source/WebKit/UIProcess/API/APINavigation.h:34 > +} Oops! :-) > Source/WebKit/UIProcess/WebPageProxy.cpp:3813 > + listener->setNavigation(WTFMove(navigation)); Nice cleanup! > Source/WebKit/UIProcess/WebProcessPool.cpp:1973 > + // FIXME: We should support process swap when a window has an opener. Should you reference a bugzilla here for this future work? > Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:865 > + navigationActionData.opener = navigationAction.opener(); Seems like there should be a convenience function for obtaining a NavigationActionData from a NavigationAction...
WebKit Commit Bot
Comment 16 2018-03-28 14:21:47 PDT
Comment on attachment 336668 [details] Patch Clearing flags on attachment: 336668 Committed r230051: <https://trac.webkit.org/changeset/230051>
WebKit Commit Bot
Comment 17 2018-03-28 14:21:49 PDT
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 18 2018-03-28 16:21:06 PDT
The API tests added with this change are timing out on iOS Simulator: Tests that timed out: ProcessSwap.CrossOriginWindowOpenNoOpener ProcessSwap.CrossOriginWindowOpenWithOpener ProcessSwap.SamOriginWindowOpenNoOpener https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20(Tests)/builds/4007
Chris Dumez
Comment 19 2018-03-28 16:46:57 PDT
(In reply to Ryan Haddad from comment #18) > The API tests added with this change are timing out on iOS Simulator: > > Tests that timed out: > ProcessSwap.CrossOriginWindowOpenNoOpener > ProcessSwap.CrossOriginWindowOpenWithOpener > ProcessSwap.SamOriginWindowOpenNoOpener > > https://build.webkit.org/builders/ > Apple%20iOS%2011%20Simulator%20Release%20WK2%20(Tests)/builds/4007 I disabled them on iOS for now: <https://trac.webkit.org/changeset/230060>
Chris Dumez
Comment 20 2018-03-28 17:04:06 PDT
(In reply to Chris Dumez from comment #19) > (In reply to Ryan Haddad from comment #18) > > The API tests added with this change are timing out on iOS Simulator: > > > > Tests that timed out: > > ProcessSwap.CrossOriginWindowOpenNoOpener > > ProcessSwap.CrossOriginWindowOpenWithOpener > > ProcessSwap.SamOriginWindowOpenNoOpener > > > > https://build.webkit.org/builders/ > > Apple%20iOS%2011%20Simulator%20Release%20WK2%20(Tests)/builds/4007 > > I disabled them on iOS for now: > <https://trac.webkit.org/changeset/230060> iOS build fix: <https://trac.webkit.org/changeset/230061>
Note You need to log in before you can comment on or make changes to this bug.