2010-07-26  Tony Gentilcore  <tonyg@chromium.org>

        Reviewed by Darin Fisher.

        Move DocumentLoadTiming struct to a new file
        https://bugs.webkit.org/show_bug.cgi?id=42917

        Also makes DocumentLoadTiming Noncopyable.

        No new tests because no new functionality.

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/DocumentLoadTiming.h: Added.
        (WebCore::DocumentLoadTiming::DocumentLoadTiming):
        * loader/DocumentLoader.h:
        * loader/FrameLoader.cpp:
        * loader/FrameLoaderTypes.h:
        * loader/MainResourceLoader.cpp:
        * page/Timing.cpp:

git-svn-id: svn://svn.chromium.org/blink/trunk@64051 bbb929c8-8fbe-4397-9dbb-9b2b20218538
void FrameLoader::loadInSameDocument(const KURL& url, SerializedScriptValue* stateObject, bool isNewNavigation)
{
    ASSERT(!stateObject || (stateObject && !isNewNavigation));

    m_frame->document()->setURL(url);
    documentLoader()->replaceRequestURLForSameDocumentNavigation(url);
    if (isNewNavigation && !shouldTreatURLAsSameAsCurrent(url) && !stateObject) {
        

        history()->updateBackForwardListForFragmentScroll();
    }
    
    String oldURL;
    bool hashChange = equalIgnoringFragmentIdentifier(url, m_URL) && url.fragmentIdentifier() != m_URL.fragmentIdentifier();
    oldURL = m_URL;
    
    m_URL = url;
    history()->updateForSameDocumentNavigation();

    if (hashChange)
        m_frame->eventHandler()->stopAutoscrollTimer();
    
    started();

    if (FrameView* view = m_frame->view())
        view->scrollToFragment(m_URL);
    
    m_isComplete = false;
    checkCompleted();

    if (isNewNavigation) {
        checkLoadComplete();
    }

    m_client->dispatchDidNavigateWithinPage();

    if (stateObject) {
        m_frame->document()->statePopped(stateObject);
        m_client->dispatchDidPopStateWithinPage();
    }
    
    if (hashChange) {
        m_frame->document()->enqueueHashchangeEvent(oldURL, url);
        m_client->dispatchDidChangeLocationWithinPage();
    }
    
    m_client->didFinishLoad();
}

void FrameLoader::loadInSameDocument(const KURL& url, SerializedScriptValue* stateObject, bool isNewNavigation)
{
    ASSERT(!stateObject || (stateObject && !isNewNavigation));

    m_frame->document()->setURL(url);
    documentLoader()->replaceRequestURLForSameDocumentNavigation(url);
    if (isNewNavigation && !shouldTreatURLAsSameAsCurrent(url) && !stateObject) {
        

        history()->updateBackForwardListForFragmentScroll();
    }
    
    String oldURL;
    bool hashChange = equalIgnoringFragmentIdentifier(url, m_URL) && url.fragmentIdentifier() != m_URL.fragmentIdentifier();
    oldURL = m_URL;
    
    m_URL = url;
    history()->updateForSameDocumentNavigation();

    if (hashChange)
        m_frame->eventHandler()->stopAutoscrollTimer();
    
    started();

    if (FrameView* view = m_frame->view())
        view->scrollToFragment(m_URL);
    
    m_isComplete = false;
    checkCompleted();

    if (isNewNavigation) {
        checkLoadComplete();
    }

    m_client->dispatchDidNavigateWithinPage();

    if (stateObject) {
        m_frame->document()->statePopped(stateObject);
        m_client->dispatchDidPopStateWithinPage();
    }
    
    if (hashChange) {
        m_frame->document()->enqueueHashchangeEvent(oldURL, url);
        m_client->dispatchDidChangeLocationWithinPage();
    }
    
    m_client->didFinishLoad();
}
