2011-06-23 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Jun 2011 00:09:37 +0000 (00:09 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Jun 2011 00:09:37 +0000 (00:09 +0000)
commit7746468a86dbbd428db6f56adc72cb3461ee4dad
tree4e725db12703621ffd767a7a7a0c2403feae6187
parentbeb326ec23224be05c74e341a8697fee609ce69b
2011-06-23  Darin Adler  <darin@apple.com>

        Reviewed by Adam Barth.

        Remove some unneeded functions from FrameLoader
        https://bugs.webkit.org/show_bug.cgi?id=63295

        Removing 7 of the functions in FrameLoader.h is probably a step
        in the right direction.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::handledOnloadEvents):
        Moved the call to stopDeferringEvents in here from FrameLoader.
        * loader/DocumentLoader.h: Ditto.

        * loader/DocumentWriter.h: Fixed a typo.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::setFirstPartyForCookies): Changed this to
        use a non-recursive tree walk instead of recursion.
        (WebCore::FrameLoader::stopAllLoaders): Moved the code from
        stopLoadingSubframes inline, since it's only two lines of code.
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Moved
        the code from markLoadComplete inline, since it's only one line.
        (WebCore::FrameLoader::checkLoadComplete): Changed this to use a
        non-recursive tree walk instead of recursion, eliminating the
        recursiveCheckLoadComplete function completely.
        (WebCore::FrameLoader::handledOnloadEvents): Moved the call to
        stopDeferringEvents into DocumentLoader.

        * loader/FrameLoader.h: Removed unneeded forward declarations,
        and now-unneeded functions setupForReplaceByMIMEType,
        isStopping, isLoadingFromCachedPage, stopLoadingSubframes,
        markLoadComplete, mainReceivedError, and recursiveCheckLoadComplete.
        Also made allChildrenAreComplete private.

        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::continueAfterContentPolicy):
        Call DocumentLoader::isStopping so we can remove the function
        from FrameLoader that just calls through. Other call sites were
        using DocumentLoader::isStopping directly.
        (WebCore::MainResourceLoader::didReceiveResponse): Call
        DocumentLoader::setupForReplaceByMIMEType so we can remove the
        function from FrameLoader that just calls through. This was
        the only call site.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::init): Call the
        ResourceLoader::cancelledError function instead of calling
        directly to FrameLoader.

        * loader/ResourceLoader.h: Made response an inline function.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/DocumentWriter.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/MainResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.h