| Summary: | Re-disable top-level data URL navigations | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||||||||
| Component: | WebKit Misc. | Assignee: | Brent Fulgham <bfulgham> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | annulen, bfulgham, cdumez, commit-queue, darin, dbates, ews-watchlist, gyuyoung.kim, japhet, ryuan.choi, sergio, webkit-bug-importer, youennf | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Bug Depends on: | 207719 | ||||||||||||||
| Bug Blocks: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Brent Fulgham
2020-02-18 15:14:11 PST
Created attachment 391103 [details]
Patch
Comment on attachment 391103 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391103&action=review > Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:156 > + m_page.loadDataWithNavigationShared(m_process.copyRef(), m_webPageID, navigation, data, MIMEType, encoding, baseURL, userData, WebCore::ShouldTreatAsContinuingLoad::Yes, WebCore::ShouldTreatAsClientOrUserInput::No, WTFMove(websitePolicies), navigation.lastNavigationAction().shouldOpenExternalURLsPolicy); @Youenn, @Chris: Should we ever treat ProvisionalPageProxy loads as if they were generated from client API? It doesn't look like we do for normal load requests, so I don't think we would for data loads, either. Created attachment 391108 [details]
Patch
Comment on attachment 391108 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391108&action=review > Source/WebKit/UIProcess/WebPageProxy.cpp:1385 > +void WebPageProxy::loadDataWithNavigationShared(Ref<WebProcessProxy>&& process, WebCore::PageIdentifier webPageID, API::Navigation& navigation, const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, ShouldTreatAsContinuingLoad shouldTreatAsContinuingLoad, ShouldTreatAsClientOrUserInput shouldTreatAsClientOrUserInput, Optional<WebsitePoliciesData>&& websitePolicies, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy) This is always called from API so it seems odd to take a ShouldTreatAsClientOrUserInput parameter. When is it ever ShouldTreatAsClientOrUserInput::No? Note: We allowed top-level navigations to Data URLs in r255961. We can go back to our previous state with this change. (In reply to Chris Dumez from comment #5) > Comment on attachment 391108 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=391108&action=review > > > Source/WebKit/UIProcess/WebPageProxy.cpp:1385 > > +void WebPageProxy::loadDataWithNavigationShared(Ref<WebProcessProxy>&& process, WebCore::PageIdentifier webPageID, API::Navigation& navigation, const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, ShouldTreatAsContinuingLoad shouldTreatAsContinuingLoad, ShouldTreatAsClientOrUserInput shouldTreatAsClientOrUserInput, Optional<WebsitePoliciesData>&& websitePolicies, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy) > > This is always called from API so it seems odd to take a > ShouldTreatAsClientOrUserInput parameter. When is it ever > ShouldTreatAsClientOrUserInput::No? Excellent -- this can be a much simpler change, then. Created attachment 391113 [details]
Patch
Created attachment 391125 [details]
Patch
Comment on attachment 391125 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391125&action=review > Source/WebCore/ChangeLog:3 > + Recognize WKPage and WKWebView calls as generated by client API use Wrong title here. Comment on attachment 391125 [details]
Patch
LGTM too.
Created attachment 391175 [details]
Patch for landing
Comment on attachment 391175 [details] Patch for landing Clearing flags on attachment: 391175 Committed r256925: <https://trac.webkit.org/changeset/256925> All reviewed patches have been landed. Closing bug. |