Changeset 263662 in webkit


Ignore:
Timestamp:
Jun 29, 2020 9:32:33 AM (4 years ago)
Author:
Chris Dumez
Message:

On load from back/forward cache, call checkCompleted() for ALL frames inside FrameLoader::commitProvisionalLoad()
https://bugs.webkit.org/show_bug.cgi?id=213657

Reviewed by Youenn Fablet.

On load from back/forward cache, call checkCompleted() for ALL frames inside FrameLoader::commitProvisionalLoad().
Previously, we were doing it for the main frame in FrameLoader::commitProvisionalLoad() and for subframes in
FrameLoader::open(). Doing it all in one place results in more understandable code and is less error-prone.

Note that calling checkCompleted() for subframes was new in r262221 and is covered by:
fast/history/multiple-back-forward-navigations.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::open):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r263659 r263662  
     12020-06-29  Chris Dumez  <cdumez@apple.com>
     2
     3        On load from back/forward cache, call checkCompleted() for ALL frames inside FrameLoader::commitProvisionalLoad()
     4        https://bugs.webkit.org/show_bug.cgi?id=213657
     5
     6        Reviewed by Youenn Fablet.
     7
     8        On load from back/forward cache, call checkCompleted() for ALL frames inside FrameLoader::commitProvisionalLoad().
     9        Previously, we were doing it for the main frame in FrameLoader::commitProvisionalLoad() and for subframes in
     10        FrameLoader::open(). Doing it all in one place results in more understandable code and is less error-prone.
     11
     12        Note that calling checkCompleted() for subframes was new in r262221 and is covered by:
     13        fast/history/multiple-back-forward-navigations.html
     14
     15        * loader/FrameLoader.cpp:
     16        (WebCore::FrameLoader::commitProvisionalLoad):
     17        (WebCore::FrameLoader::open):
     18
    1192020-06-09  Sergio Villar Senin  <svillar@igalia.com>
    220
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r263548 r263662  
    20782078            nullptr, static_cast<int>(m_documentLoader->response().expectedContentLength()), 0, mainResouceError);
    20792079
    2080         checkCompleted();
     2080        Vector<Ref<Frame>> targetFrames;
     2081        targetFrames.append(m_frame);
     2082        for (auto* child = m_frame.tree().firstChild(); child; child = child->tree().traverseNext(&m_frame))
     2083            targetFrames.append(*child);
     2084
     2085        for (auto& frame : targetFrames)
     2086            frame->loader().checkCompleted();
    20812087    } else
    20822088        didOpenURL();
     
    23512357
    23522358    cachedFrame.restore();
    2353 
    2354     // For the main frame, this gets called in FrameLoader::commitProvisionalLoad().
    2355     if (!m_frame.isMainFrame())
    2356         checkCompleted();
    23572359}
    23582360
Note: See TracChangeset for help on using the changeset viewer.