Skip to content
  • beidson@apple.com's avatar
    More partial work towards "Page Cache should support pages with Frames" · f845d1e8
    beidson@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=13631
    
    Reviewed by Sam Weinig.
    
    This patch is primarily about the "CachedFrame tree" and making slightly different decisions
    based on whether a CachedFrame is the main frame or a subframe.
    
    - Store whether a CachedFrame represents the main frame or a subframe.
    - "Chop off the frame tree" for the main frame when creating its CachedFrame, as main frames 
      are reused and need to start new page loads with an empty frame tree.
    - Reattach the frame tree to the main frame when restoring it.
    - open() the cached subframes in their respective loaders when restoring.
    - Properly clear() and destroy() cached subframes.
    - When committing to a new page load, and after caching the previous page, only clear the
      FrameView for the main frame.
    
    Note that all of above will eventually be necessary as I continue to land this work in pieces,
    but doesn't actually change any behavior right now because we still refuse to even *try* to
    cache pages with frames.
    
    No new tests. No change in behavior, and current tests continue to pass.
    
    * history/CachedFrame.cpp:
    (WebCore::CachedFrame::CachedFrame):
    (WebCore::CachedFrame::restore):
    (WebCore::CachedFrame::clear):
    (WebCore::CachedFrame::destroy):
    * history/CachedFrame.h:
    (WebCore::CachedFrame::isMainFrame):
    
    * loader/FrameLoader.cpp:
    (WebCore::FrameLoader::clear):
    (WebCore::FrameLoader::open):
    * loader/FrameLoader.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f845d1e8