Reviewed by Hyatt.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2007 00:04:32 +0000 (00:04 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2007 00:04:32 +0000 (00:04 +0000)
commit596e7654e9403d2b84bcea98854ad849ff8d1deb
tree9a09d05715337604876ef96834eff90555d69cbf
parentc315deb4402ae2f6d63193ebfc8ed2457fca368b
    Reviewed by Hyatt.

        <rdar://problem/5242145> REGRESSION: Clicking on symbol in documentation often doesn't scroll to symbol

        A renderer for the anchor wasn't always available at the time parsing finished. So we need
        to bail out of gotoAnchor if stylesheets are pending and remember to call gotoAnchor later
        once all of the pending stylesheets load.

        * dom/Document.cpp:
        (WebCore::Document::Document): Initialize m_gotoAnchorNeededAfterStylesheetsLoad to false.
        (WebCore::Document::stylesheetLoaded): If we have no more pending stylesheets, call gotoAnchor if needed.
        * dom/Document.h:
        (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad): New method.
        (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad): Ditto.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::gotoAnchor): Bail early if the document still has pending stylesheets.
        * loader/FrameLoader.h: Make gotoAnchor() public.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoader.h