Changeset 260843 in webkit
- Timestamp:
- Apr 28, 2020 1:41:35 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r260831 r260843 1 2020-04-28 Rob Buis <rbuis@igalia.com> 2 3 Remove downloadAttribute from DocumentLoader 4 https://bugs.webkit.org/show_bug.cgi?id=210493 5 6 Reviewed by Darin Adler. 7 8 Remove downloadAttribute from DocumentLoader since this 9 can be obtained from the NavigationAction. 10 11 * loader/DocumentLoader.h: 12 (WebCore::DocumentLoader::downloadAttribute const): 13 (WebCore::DocumentLoader::setDownloadAttribute): Deleted. 14 * loader/FrameLoader.cpp: 15 (WebCore::FrameLoader::loadURL): 16 (WebCore::FrameLoader::loadWithNavigationAction): 17 (WebCore::FrameLoader::loadPostRequest): 18 * loader/FrameLoader.h: 19 1 20 2020-04-28 Jack Lee <shihchieh_lee@apple.com> 2 21 -
trunk/Source/WebCore/loader/DocumentLoader.h
r260709 r260843 398 398 bool allowsDataURLsForMainFrame() const { return m_allowsDataURLsForMainFrame; } 399 399 400 void setDownloadAttribute(const String& attribute) { m_downloadAttribute = attribute; } 401 const String& downloadAttribute() const { return m_downloadAttribute; } 400 const AtomString& downloadAttribute() const { return m_triggeringAction.downloadAttribute(); } 402 401 403 402 WEBCORE_EXPORT void applyPoliciesToSettings(); … … 646 645 bool m_allowsWebArchiveForMainFrame { false }; 647 646 bool m_allowsDataURLsForMainFrame { false }; 648 String m_downloadAttribute;649 647 }; 650 648 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r260831 r260843 1419 1419 request.setSystemPreviewInfo(frameLoadRequest.systemPreviewInfo()); 1420 1420 #endif 1421 loadWithNavigationAction(request, WTFMove(action), newLoadType, WTFMove(formState), allowNavigationToInvalidURL, frameLoadRequest.downloadAttribute(),[this, isRedirect, sameURL, newLoadType, protectedFrame = makeRef(m_frame), completionHandler = completionHandlerCaller.release()] () mutable {1421 loadWithNavigationAction(request, WTFMove(action), newLoadType, WTFMove(formState), allowNavigationToInvalidURL, [this, isRedirect, sameURL, newLoadType, protectedFrame = makeRef(m_frame), completionHandler = completionHandlerCaller.release()] () mutable { 1422 1422 if (isRedirect) { 1423 1423 m_quickRedirectComing = false; … … 1496 1496 } 1497 1497 1498 void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, NavigationAction&& action, FrameLoadType type, RefPtr<FormState>&& formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL, const String& downloadAttribute,CompletionHandler<void()>&& completionHandler)1498 void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, NavigationAction&& action, FrameLoadType type, RefPtr<FormState>&& formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL, CompletionHandler<void()>&& completionHandler) 1499 1499 { 1500 1500 FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "loadWithNavigationAction: frame load started"); 1501 1501 1502 1502 Ref<DocumentLoader> loader = m_client->createDocumentLoader(request, defaultSubstituteDataForURL(request.url())); 1503 loader->setDownloadAttribute(downloadAttribute);1504 1503 applyShouldOpenExternalURLsPolicyToNewDocumentLoader(m_frame, loader, action.initiatedByMainFrame(), action.shouldOpenExternalURLsPolicy()); 1505 1504 … … 3013 3012 document->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(workingResourceRequest, ContentSecurityPolicy::InsecureRequestType::Load); 3014 3013 3015 NavigationAction action { request.requester(), workingResourceRequest, request.initiatedByMainFrame(), loadType, true, event, request.shouldOpenExternalURLsPolicy(), request.downloadAttribute()};3014 NavigationAction action { request.requester(), workingResourceRequest, request.initiatedByMainFrame(), loadType, true, event, request.shouldOpenExternalURLsPolicy(), { } }; 3016 3015 action.setLockHistory(lockHistory); 3017 3016 … … 3019 3018 // The search for a target frame is done earlier in the case of form submission. 3020 3019 if (auto* targetFrame = formState ? nullptr : findFrameForNavigation(frameName)) { 3021 targetFrame->loader().loadWithNavigationAction(workingResourceRequest, WTFMove(action), loadType, WTFMove(formState), allowNavigationToInvalidURL, { },WTFMove(completionHandler));3020 targetFrame->loader().loadWithNavigationAction(workingResourceRequest, WTFMove(action), loadType, WTFMove(formState), allowNavigationToInvalidURL, WTFMove(completionHandler)); 3022 3021 return; 3023 3022 } … … 3032 3031 // must grab this now, since this load may stop the previous load and clear this flag 3033 3032 bool isRedirect = m_quickRedirectComing; 3034 loadWithNavigationAction(workingResourceRequest, WTFMove(action), loadType, WTFMove(formState), allowNavigationToInvalidURL, { },[this, isRedirect, protectedFrame = makeRef(m_frame), completionHandler = WTFMove(completionHandler)] () mutable {3033 loadWithNavigationAction(workingResourceRequest, WTFMove(action), loadType, WTFMove(formState), allowNavigationToInvalidURL, [this, isRedirect, protectedFrame = makeRef(m_frame), completionHandler = WTFMove(completionHandler)] () mutable { 3035 3034 if (isRedirect) { 3036 3035 m_quickRedirectComing = false; -
trunk/Source/WebCore/loader/FrameLoader.h
r260812 r260843 389 389 void load(DocumentLoader&); // Calls loadWithDocumentLoader 390 390 391 void loadWithNavigationAction(const ResourceRequest&, NavigationAction&&, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, const String& downloadAttribute = { },CompletionHandler<void()>&& = [] { }); // Calls loadWithDocumentLoader391 void loadWithNavigationAction(const ResourceRequest&, NavigationAction&&, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, CompletionHandler<void()>&& = [] { }); // Calls loadWithDocumentLoader 392 392 393 393 void loadPostRequest(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, CompletionHandler<void()>&&);
Note: See TracChangeset
for help on using the changeset viewer.