RESOLVED FIXED 184892
Use NetworkLoadChecker for navigation loads
https://bugs.webkit.org/show_bug.cgi?id=184892
Summary Use NetworkLoadChecker for navigation loads
youenn fablet
Reported 2018-04-23 11:12:30 PDT
Use NetworkLoadChecker for navigation loads
Attachments
WIP (11.46 KB, patch)
2018-04-26 14:47 PDT, youenn fablet
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.30 MB, application/zip)
2018-04-26 16:17 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.78 MB, application/zip)
2018-04-26 17:50 PDT, EWS Watchlist
no flags
Patch (22.91 KB, patch)
2018-04-27 13:57 PDT, youenn fablet
no flags
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.87 MB, application/zip)
2018-04-27 15:18 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (9.06 MB, application/zip)
2018-04-27 18:06 PDT, EWS Watchlist
no flags
Patch (25.04 KB, patch)
2018-04-30 09:55 PDT, youenn fablet
no flags
Patch (2.73 KB, patch)
2018-04-30 10:03 PDT, youenn fablet
no flags
Patch (25.06 KB, patch)
2018-04-30 10:56 PDT, youenn fablet
no flags
Patch (25.09 KB, patch)
2018-04-30 13:38 PDT, youenn fablet
no flags
Patch for landing (24.54 KB, patch)
2018-05-02 13:12 PDT, youenn fablet
no flags
Radar WebKit Bug Importer
Comment 1 2018-04-23 11:13:12 PDT
youenn fablet
Comment 2 2018-04-26 14:47:10 PDT
EWS Watchlist
Comment 3 2018-04-26 16:17:01 PDT
Comment on attachment 338918 [details] WIP Attachment 338918 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/7473369 New failing tests: http/wpt/service-workers/header-filtering.https.html
EWS Watchlist
Comment 4 2018-04-26 16:17:02 PDT
Created attachment 338935 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
EWS Watchlist
Comment 5 2018-04-26 17:50:41 PDT
Comment on attachment 338918 [details] WIP Attachment 338918 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7474424 New failing tests: http/tests/webarchive/test-preload-resources.html http/tests/webarchive/cross-origin-stylesheet-crash.html
EWS Watchlist
Comment 6 2018-04-26 17:50:42 PDT
Created attachment 338944 [details] Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
youenn fablet
Comment 7 2018-04-27 13:57:02 PDT
EWS Watchlist
Comment 8 2018-04-27 15:18:56 PDT
Comment on attachment 339020 [details] Patch Attachment 339020 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7484630 New failing tests: http/tests/contentextensions/block-everything-unless-domain-redirect.php imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-block-scripts.html http/tests/misc/redirect-to-about-blank.html http/tests/contentextensions/main-resource-redirect-blocked.php http/tests/contentextensions/main-resource-redirect-error.html imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html fast/files/file-reader-sandbox-iframe.html imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-block-defer-scripts.html fast/files/file-reader-file-url.html http/tests/contentextensions/block-everything-unless-domain-iframe.html
EWS Watchlist
Comment 9 2018-04-27 15:18:57 PDT
Created attachment 339033 [details] Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 10 2018-04-27 18:06:37 PDT
Comment on attachment 339020 [details] Patch Attachment 339020 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/7486030 New failing tests: imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-block-scripts.html http/tests/misc/redirect-to-about-blank.html imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html fast/files/file-reader-sandbox-iframe.html imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-block-defer-scripts.html fast/files/file-reader-file-url.html
EWS Watchlist
Comment 11 2018-04-27 18:06:39 PDT
Created attachment 339045 [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.13.4
youenn fablet
Comment 12 2018-04-30 09:55:47 PDT
youenn fablet
Comment 13 2018-04-30 10:03:43 PDT
youenn fablet
Comment 14 2018-04-30 10:56:16 PDT
youenn fablet
Comment 15 2018-04-30 13:38:52 PDT
Chris Dumez
Comment 16 2018-05-02 12:29:19 PDT
Comment on attachment 339145 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339145&action=review r=me > Source/WebCore/platform/network/ResourceResponseBase.cpp:392 > +void ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingTainting() I think AccordingToTainting sounds better. > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:325 > + // FIXME: Enable content blockers for navigation loads. This would be a pretty bad regression so I do not think we should enable this code path by default until this is supported. > Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:615 > + if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().protocolIs("about") && m_redirectCount) { isBlankURL() ? > Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:667 > + return RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess(); This is still disabled by default, right?
youenn fablet
Comment 17 2018-05-02 12:40:53 PDT
Thanks for the review. > > Source/WebCore/platform/network/ResourceResponseBase.cpp:392 > > +void ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingTainting() > > I think AccordingToTainting sounds better. OK > > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:325 > > + // FIXME: Enable content blockers for navigation loads. > > This would be a pretty bad regression so I do not think we should enable > this code path by default until this is supported. Content blockers are enabled in WebProcess so there is no regression. The idea would be to enable content blockers in NetworkProcess for navigation loads so as to remove the need to handle redirections in WebProcess. > > Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:615 > > + if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().protocolIs("about") && m_redirectCount) { > > isBlankURL() ? I saw on iOS "about:" being sent to NetworkProcess in QuickLook code path. I thought isBlankURL was for "about:blank" but it seems it is for all about URLs. I am not sure I like the name isBlankURL. > > Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:667 > > + return RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess(); > > This is still disabled by default, right? This is enabled by default now.
Chris Dumez
Comment 18 2018-05-02 12:42:04 PDT
Comment on attachment 339145 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339145&action=review >> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:615 >> + if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().protocolIs("about") && m_redirectCount) { > > isBlankURL() ? What I am asking is why aren't you using !newRequest.url().isBlankURL() instead of !newRequest.url().protocolIs("about").
Chris Dumez
Comment 19 2018-05-02 12:43:02 PDT
(In reply to youenn fablet from comment #17) > Thanks for the review. > > > > Source/WebCore/platform/network/ResourceResponseBase.cpp:392 > > > +void ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingTainting() > > > > I think AccordingToTainting sounds better. > > OK > > > > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:325 > > > + // FIXME: Enable content blockers for navigation loads. > > > > This would be a pretty bad regression so I do not think we should enable > > this code path by default until this is supported. > > Content blockers are enabled in WebProcess so there is no regression. > The idea would be to enable content blockers in NetworkProcess for > navigation loads so as to remove the need to handle redirections in > WebProcess. > > > > Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:615 > > > + if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().protocolIs("about") && m_redirectCount) { > > > > isBlankURL() ? > > I saw on iOS "about:" being sent to NetworkProcess in QuickLook code path. > > I thought isBlankURL was for "about:blank" but it seems it is for all about > URLs. > I am not sure I like the name isBlankURL. > > > > Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:667 > > > + return RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess(); > > > > This is still disabled by default, right? > > This is enabled by default now. If so, then I do not think it is OK to land as-is. Losing content blocking for navigated resources seems like a big no-no to me.
Chris Dumez
Comment 20 2018-05-02 12:43:37 PDT
(In reply to Chris Dumez from comment #19) > (In reply to youenn fablet from comment #17) > > Thanks for the review. > > > > > > Source/WebCore/platform/network/ResourceResponseBase.cpp:392 > > > > +void ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingTainting() > > > > > > I think AccordingToTainting sounds better. > > > > OK > > > > > > Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:325 > > > > + // FIXME: Enable content blockers for navigation loads. > > > > > > This would be a pretty bad regression so I do not think we should enable > > > this code path by default until this is supported. > > > > Content blockers are enabled in WebProcess so there is no regression. > > The idea would be to enable content blockers in NetworkProcess for > > navigation loads so as to remove the need to handle redirections in > > WebProcess. > > > > > > Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:615 > > > > + if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().protocolIs("about") && m_redirectCount) { > > > > > > isBlankURL() ? > > > > I saw on iOS "about:" being sent to NetworkProcess in QuickLook code path. > > > > I thought isBlankURL was for "about:blank" but it seems it is for all about > > URLs. > > I am not sure I like the name isBlankURL. > > > > > > Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:667 > > > > + return RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess(); > > > > > > This is still disabled by default, right? > > > > This is enabled by default now. > > If so, then I do not think it is OK to land as-is. Losing content blocking > for navigated resources seems like a big no-no to me. ^^ Alex&Brady&Geoff.
youenn fablet
Comment 21 2018-05-02 12:44:47 PDT
> > If so, then I do not think it is OK to land as-is. Losing content blocking > > for navigated resources seems like a big no-no to me. As I said above, we are not losing content blocking, this is still done in WebProcess. In the future, we should enable content blocking for navigation loads in NetworkProcess so that we do not need to do these in WebProcess.
Chris Dumez
Comment 22 2018-05-02 12:45:46 PDT
(In reply to youenn fablet from comment #21) > > > If so, then I do not think it is OK to land as-is. Losing content blocking > > > for navigated resources seems like a big no-no to me. > > As I said above, we are not losing content blocking, this is still done in > WebProcess. > In the future, we should enable content blocking for navigation loads in > NetworkProcess so that we do not need to do these in WebProcess. Oh ok, I missed this part, sorry. Then I'm fine with it.
youenn fablet
Comment 23 2018-05-02 12:51:36 PDT
For the record, I disabled content blocking for navigation loads for two reasons. First, we need to improve the error logging for content blockers like we did for CSP. Second, content blockers in NetworkProcess are currently mostly useful for sync XHR and ping loads.We might need further work/testing for other loads, in particular navigation loads.
youenn fablet
Comment 24 2018-05-02 13:12:53 PDT
Created attachment 339327 [details] Patch for landing
WebKit Commit Bot
Comment 25 2018-05-02 14:13:33 PDT
Comment on attachment 339327 [details] Patch for landing Clearing flags on attachment: 339327 Committed r231263: <https://trac.webkit.org/changeset/231263>
WebKit Commit Bot
Comment 26 2018-05-02 14:13:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.