Skip to content
  • ggaren@apple.com's avatar
    WebCore: · 858c1b45
    ggaren@apple.com authored
    2009-02-06  Geoffrey Garen  <ggaren@apple.com>
    
            Reviewed by Sam Weinig.
    
            Part III of <rdar://problem/6552272>.
            
            Make redirect data available to WebKit. (I tried having WebKit track this
            data for itself, but that went wrong -- it's just too hard to figure
            out the weird corners of the WebCore loader from within another framework.)
    
            * loader/DocumentLoader.cpp:
            (WebCore::DocumentLoader::DocumentLoader):
            * loader/DocumentLoader.h: Store a flag indicating whether we created
            a global history entry. If we didn't, then we know that the next redirect
            should not link to us, since we're not in history.
            
            (WebCore::DocumentLoader::clientRedirectSourceForHistory):
            (WebCore::DocumentLoader::clientRedirectDestinationForHistory):
            (WebCore::DocumentLoader::setClientRedirectSourceForHistory):
            (WebCore::DocumentLoader::serverRedirectSourceForHistory):
            (WebCore::DocumentLoader::serverRedirectDestinationForHistory):
            (WebCore::DocumentLoader::didCreateGlobalHistoryEntry):
            (WebCore::DocumentLoader::setDidCreateGlobalHistoryEntry): Added accessors
            to help WebKit wade through the muck of WebCore history.
    
            * loader/EmptyClients.h:
            (WebCore::EmptyFrameLoaderClient::updateGlobalHistoryRedirectLinks): Renamed
            this client function to say what it does, instead of when it's called.
    
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::load):
            (WebCore::FrameLoader::loadWithNavigationAction): In the case of a redirect,
            store a link to the previous history URL in the new DocumentLoader, so
            it can update WebKit with that link when the load commits.
    
            (WebCore::FrameLoader::updateHistory*): Use our new flags and names,
            described above.
    
            * loader/FrameLoader.h:
            (WebCore::FrameLoader::documentLoader):
            (WebCore::FrameLoader::policyDocumentLoader):
            (WebCore::FrameLoader::provisionalDocumentLoader):
            (WebCore::FrameLoader::state): Inlined a few trivial functions because
            performance mistakes give me the itches.
            
            * loader/FrameLoaderClient.h: Renamed this client function to say what
            it does, instead of when it's called.
    
    WebKit/mac:
    
    2009-02-06  Geoffrey Garen  <ggaren@apple.com>
    
            Reviewed by Sam Weinig.
    
            Part III of <rdar://problem/6552272>.
            
            Refactored to use the redirect data WebCore makes available, instead of
            tracking loading state in WebKit.
            
            * History/WebHistory.mm:
            (-[WebHistoryPrivate dealloc]):
            (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
            (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
            * History/WebHistoryInternal.h:
            * WebCoreSupport/WebFrameLoaderClient.h:
            * WebCoreSupport/WebFrameLoaderClient.mm:
            (WebFrameLoaderClient::updateGlobalHistory):
            (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
    
    WebKit/win:
    
    2009-02-06  Geoffrey Garen  <ggaren@apple.com>
    
            Reviewed by Sam Weinig.
    
            Part III of <rdar://problem/6552272>.
            
            Refactored to use the redirect data WebCore makes available, instead of
            tracking loading state in WebKit.
            
            * WebCoreSupport/WebFrameLoaderClient.cpp:
            (WebFrameLoaderClient::updateGlobalHistory):
            (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
            * WebCoreSupport/WebFrameLoaderClient.h:
            * WebHistory.cpp:
            (WebHistory::visitedURL):
            * WebHistory.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    858c1b45