RESOLVED FIXED 199632
Remove support for beforeload on link=prefetch
https://bugs.webkit.org/show_bug.cgi?id=199632
Summary Remove support for beforeload on link=prefetch
Rob Buis
Reported 2019-07-09 12:13:46 PDT
Remove support for beforeload on link=prefetch.
Attachments
Patch (4.69 KB, patch)
2019-07-09 12:16 PDT, Rob Buis
no flags
Patch (5.40 KB, patch)
2019-07-09 12:55 PDT, Rob Buis
no flags
Archive of layout-test-results from ews103 for mac-highsierra (3.32 MB, application/zip)
2019-07-09 13:43 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews114 for mac-highsierra (3.14 MB, application/zip)
2019-07-09 14:34 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews213 for win-future (13.39 MB, application/zip)
2019-07-09 14:35 PDT, EWS Watchlist
no flags
Patch (8.70 KB, patch)
2019-07-11 00:22 PDT, Rob Buis
no flags
Archive of layout-test-results from ews101 for mac-highsierra (3.20 MB, application/zip)
2019-07-11 01:30 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews114 for mac-highsierra (3.08 MB, application/zip)
2019-07-11 02:09 PDT, EWS Watchlist
no flags
Patch (9.53 KB, patch)
2019-07-11 02:12 PDT, Rob Buis
no flags
Patch (13.46 KB, patch)
2019-07-12 07:44 PDT, Rob Buis
no flags
Patch (11.58 KB, patch)
2019-07-16 00:55 PDT, Rob Buis
no flags
Rob Buis
Comment 1 2019-07-09 12:16:48 PDT
Rob Buis
Comment 2 2019-07-09 12:55:19 PDT
EWS Watchlist
Comment 3 2019-07-09 13:43:32 PDT
Comment on attachment 373746 [details] Patch Attachment 373746 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/12700667 New failing tests: fast/dom/HTMLLinkElement/prefetch-beforeload.html
EWS Watchlist
Comment 4 2019-07-09 13:43:34 PDT
Created attachment 373753 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 5 2019-07-09 14:34:20 PDT
Comment on attachment 373746 [details] Patch Attachment 373746 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/12700823 New failing tests: fast/dom/HTMLLinkElement/prefetch-beforeload.html
EWS Watchlist
Comment 6 2019-07-09 14:34:21 PDT
Created attachment 373768 [details] Archive of layout-test-results from ews114 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 7 2019-07-09 14:35:13 PDT
Comment on attachment 373746 [details] Patch Attachment 373746 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/12700922 New failing tests: fast/dom/HTMLLinkElement/prefetch-beforeload.html
EWS Watchlist
Comment 8 2019-07-09 14:35:15 PDT
Created attachment 373769 [details] Archive of layout-test-results from ews213 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews213 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Ryosuke Niwa
Comment 9 2019-07-10 13:57:01 PDT
Per recent discussion, I don't think we want to support either load, beforeload, or error event handlers on prefetch link element. That would create arbitrary length tracking vector.
Rob Buis
Comment 10 2019-07-10 22:31:04 PDT
(In reply to Ryosuke Niwa from comment #9) > Per recent discussion, I don't think we want to support either load, > beforeload, or error event handlers on prefetch link element. That would > create arbitrary length tracking vector. Right, so this bug seems aligned with that, removing support for beforeload events on link prefetch. I just have a hard time testing beforeload does not send an event, especially if load/error events are not supported either, i.e. what is the stop condition and/or how long do we wait?
Rob Buis
Comment 11 2019-07-11 00:22:51 PDT
Reopening to attach new patch.
Rob Buis
Comment 12 2019-07-11 00:22:54 PDT
EWS Watchlist
Comment 13 2019-07-11 01:30:18 PDT
Comment on attachment 373907 [details] Patch Attachment 373907 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/12714121 New failing tests: http/wpt/prefetch/beforeload-dynamic.html
EWS Watchlist
Comment 14 2019-07-11 01:30:20 PDT
Created attachment 373909 [details] Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 15 2019-07-11 02:09:07 PDT
Comment on attachment 373907 [details] Patch Attachment 373907 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/12714134 New failing tests: http/wpt/prefetch/beforeload-dynamic.html
EWS Watchlist
Comment 16 2019-07-11 02:09:09 PDT
Created attachment 373910 [details] Archive of layout-test-results from ews114 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-highsierra Platform: Mac OS X 10.13.6
Rob Buis
Comment 17 2019-07-11 02:12:09 PDT
youenn fablet
Comment 18 2019-07-11 14:25:02 PDT
Comment on attachment 373911 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373911&action=review > Source/WebCore/ChangeLog:13 > + (WebCore::LinkLoader::loadLink): It is not clear these changes remove support for beforeload for prefetch. I understand it that we remove the call to shouldLoadLink for prefetch which thus removes the call to before load. Can you give some more description in the change log? > Source/WebCore/loader/LinkLoader.cpp:286 > + if (!params.href.isValid() || !document.frame()) It is initially intriguing to not call shouldLoadLink for prefetch. It might be clearer to call m_client.shouldLoadLink() in every case in LinkLoader::loadLink and return true early if the link is prefetch. > Source/WebCore/loader/LinkLoader.cpp:332 > + return true; It seems loadLink is always returning true. Maybe loadLink should be void. > LayoutTests/http/wpt/prefetch/beforeload-dynamic.html:6 > +</script> Can we create it in the script element below? > LayoutTests/http/wpt/prefetch/beforeload.html:5 > + var t = async_test('Makes sure that prefetch does not call beforeload.'); Ditto.
Rob Buis
Comment 19 2019-07-12 07:44:20 PDT
Rob Buis
Comment 20 2019-07-12 08:45:53 PDT
Comment on attachment 373911 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373911&action=review >> Source/WebCore/ChangeLog:13 >> + (WebCore::LinkLoader::loadLink): > > It is not clear these changes remove support for beforeload for prefetch. > I understand it that we remove the call to shouldLoadLink for prefetch which thus removes the call to before load. > Can you give some more description in the change log? Sure! Done. >> Source/WebCore/loader/LinkLoader.cpp:286 >> + if (!params.href.isValid() || !document.frame()) > > It is initially intriguing to not call shouldLoadLink for prefetch. > It might be clearer to call m_client.shouldLoadLink() in every case in LinkLoader::loadLink and return true early if the link is prefetch. Done. >> Source/WebCore/loader/LinkLoader.cpp:332 >> + return true; > > It seems loadLink is always returning true. > Maybe loadLink should be void. Well spotted, done. >> LayoutTests/http/wpt/prefetch/beforeload-dynamic.html:6 >> +</script> > > Can we create it in the script element below? Done. >> LayoutTests/http/wpt/prefetch/beforeload.html:5 >> + var t = async_test('Makes sure that prefetch does not call beforeload.'); > > Ditto. Done.
youenn fablet
Comment 21 2019-07-15 09:11:10 PDT
Comment on attachment 374008 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374008&action=review > Source/WebCore/html/HTMLLinkElement.cpp:208 > +bool HTMLLinkElement::shouldLoadLink(const LinkLoadParameters& params) Sorry for my suggestion on the previous patch to do that. Your initial version seems better. r=me with shouldLoadLink not taking params.
Rob Buis
Comment 22 2019-07-16 00:55:34 PDT
Rob Buis
Comment 23 2019-07-16 08:17:48 PDT
(In reply to youenn fablet from comment #21) > Comment on attachment 374008 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=374008&action=review > > > Source/WebCore/html/HTMLLinkElement.cpp:208 > > +bool HTMLLinkElement::shouldLoadLink(const LinkLoadParameters& params) > > Sorry for my suggestion on the previous patch to do that. > Your initial version seems better. > r=me with shouldLoadLink not taking params. No problem, done.
WebKit Commit Bot
Comment 24 2019-07-16 08:55:11 PDT
Comment on attachment 374199 [details] Patch Clearing flags on attachment: 374199 Committed r247481: <https://trac.webkit.org/changeset/247481>
WebKit Commit Bot
Comment 25 2019-07-16 08:55:13 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 26 2019-07-16 08:56:27 PDT
Note You need to log in before you can comment on or make changes to this bug.