⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259544 in webkit


Ignore:
Timestamp:
Apr 4, 2020, 10:09:42 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Remove LockHistory parameter from loadWithNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=210007

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-04
Reviewed by Darin Adler.

Remove LockHistory parameter from loadWithNavigationAction since NavigationAction
has a member for this. Where needed explicitly set the LockHistory on the actions.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/FrameLoader.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r259543 r259544  
     12020-04-04  Rob Buis  <rbuis@igalia.com>
     2
     3        Remove LockHistory parameter from loadWithNavigationAction
     4        https://bugs.webkit.org/show_bug.cgi?id=210007
     5
     6        Reviewed by Darin Adler.
     7
     8        Remove LockHistory parameter from loadWithNavigationAction since NavigationAction
     9        has a member for this. Where needed explicitly set the LockHistory on the actions.
     10
     11        * loader/FrameLoader.cpp:
     12        (WebCore::FrameLoader::loadURL):
     13        (WebCore::FrameLoader::loadWithNavigationAction):
     14        (WebCore::FrameLoader::loadPostRequest):
     15        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
     16        (WebCore::FrameLoader::loadDifferentDocumentItem):
     17        * loader/FrameLoader.h:
     18
    1192020-04-04  David Kilzer  <ddkilzer@apple.com>
    220
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r259523 r259544  
    14221422        request.setSystemPreviewInfo(frameLoadRequest.systemPreviewInfo());
    14231423#endif
    1424     loadWithNavigationAction(request, WTFMove(action), lockHistory, newLoadType, WTFMove(formState), allowNavigationToInvalidURL, frameLoadRequest.downloadAttribute(), [this, isRedirect, sameURL, newLoadType, protectedFrame = makeRef(m_frame), completionHandler = completionHandlerCaller.release()] () mutable {
     1424    loadWithNavigationAction(request, WTFMove(action), newLoadType, WTFMove(formState), allowNavigationToInvalidURL, frameLoadRequest.downloadAttribute(), [this, isRedirect, sameURL, newLoadType, protectedFrame = makeRef(m_frame), completionHandler = completionHandlerCaller.release()] () mutable {
    14251425        if (isRedirect) {
    14261426            m_quickRedirectComing = false;
     
    14991499}
    15001500
    1501 void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, NavigationAction&& action, LockHistory lockHistory, FrameLoadType type, RefPtr<FormState>&& formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL, const String& downloadAttribute, CompletionHandler<void()>&& completionHandler)
     1501void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, NavigationAction&& action, FrameLoadType type, RefPtr<FormState>&& formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL, const String& downloadAttribute, CompletionHandler<void()>&& completionHandler)
    15021502{
    15031503    FRAMELOADER_RELEASE_LOG_IF_ALLOWED(ResourceLoading, "loadWithNavigationAction: frame load started");
     
    15071507    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(m_frame, loader, action.initiatedByMainFrame(), action.shouldOpenExternalURLsPolicy());
    15081508
    1509     if (lockHistory == LockHistory::Yes && m_documentLoader)
     1509    if (action.lockHistory() == LockHistory::Yes && m_documentLoader)
    15101510        loader->setClientRedirectSourceForHistory(m_documentLoader->didCreateGlobalHistoryEntry() ? m_documentLoader->urlForHistory().string() : m_documentLoader->clientRedirectSourceForHistory());
    15111511
     
    30233023
    30243024    NavigationAction action { request.requester(), workingResourceRequest, request.initiatedByMainFrame(), loadType, true, event, request.shouldOpenExternalURLsPolicy(), request.downloadAttribute() };
     3025    action.setLockHistory(lockHistory);
    30253026
    30263027    if (!frameName.isEmpty()) {
    30273028        // The search for a target frame is done earlier in the case of form submission.
    30283029        if (auto* targetFrame = formState ? nullptr : findFrameForNavigation(frameName)) {
    3029             targetFrame->loader().loadWithNavigationAction(workingResourceRequest, WTFMove(action), lockHistory, loadType, WTFMove(formState), allowNavigationToInvalidURL, { }, WTFMove(completionHandler));
     3030            targetFrame->loader().loadWithNavigationAction(workingResourceRequest, WTFMove(action), loadType, WTFMove(formState), allowNavigationToInvalidURL, { }, WTFMove(completionHandler));
    30303031            return;
    30313032        }
     
    30403041    // must grab this now, since this load may stop the previous load and clear this flag
    30413042    bool isRedirect = m_quickRedirectComing;
    3042     loadWithNavigationAction(workingResourceRequest, WTFMove(action), lockHistory, loadType, WTFMove(formState), allowNavigationToInvalidURL, { }, [this, isRedirect, protectedFrame = makeRef(m_frame), completionHandler = WTFMove(completionHandler)] () mutable {
     3043    loadWithNavigationAction(workingResourceRequest, WTFMove(action), loadType, WTFMove(formState), allowNavigationToInvalidURL, { }, [this, isRedirect, protectedFrame = makeRef(m_frame), completionHandler = WTFMove(completionHandler)] () mutable {
    30433044        if (isRedirect) {
    30443045            m_quickRedirectComing = false;
     
    35333534
    35343535    NavigationAction newAction { *frame->document(), request, InitiatedByMainFrame::Unknown, NavigationType::Other, action.shouldOpenExternalURLsPolicy(), nullptr, action.downloadAttribute() };
    3535     mainFrame->loader().loadWithNavigationAction(request, WTFMove(newAction), LockHistory::No, FrameLoadType::Standard, formState, allowNavigationToInvalidURL);
     3536    mainFrame->loader().loadWithNavigationAction(request, WTFMove(newAction), FrameLoadType::Standard, formState, allowNavigationToInvalidURL);
    35363537}
    35373538
     
    38263827    action.setSourceBackForwardItem(fromItem);
    38273828
    3828     loadWithNavigationAction(request, WTFMove(action), LockHistory::No, loadType, { }, AllowNavigationToInvalidURL::Yes);
     3829    loadWithNavigationAction(request, WTFMove(action), loadType, { }, AllowNavigationToInvalidURL::Yes);
    38293830}
    38303831
  • trunk/Source/WebCore/loader/FrameLoader.h

    r259467 r259544  
    389389    void load(DocumentLoader&); // Calls loadWithDocumentLoader
    390390
    391     void loadWithNavigationAction(const ResourceRequest&, NavigationAction&&, LockHistory, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, const String& downloadAttribute = { }, CompletionHandler<void()>&& = [] { }); // Calls loadWithDocumentLoader
     391    void loadWithNavigationAction(const ResourceRequest&, NavigationAction&&, FrameLoadType, RefPtr<FormState>&&, AllowNavigationToInvalidURL, const String& downloadAttribute = { }, CompletionHandler<void()>&& = [] { }); // Calls loadWithDocumentLoader
    392392
    393393    void loadPostRequest(FrameLoadRequest&&, const String& referrer, FrameLoadType, Event*, RefPtr<FormState>&&, CompletionHandler<void()>&&);
Note: See TracChangeset for help on using the changeset viewer.