Skip to content
  • beidson's avatar
    LayoutTests: · ab0e7dcb
    beidson authored
            Reviewed by Geoose
    
            <rdar://problem/4664154> and http://bugs.webkit.org/show_bug.cgi?id=3546
    
            Layout test that covers opening an empty new window, then starting to navigate around in it
    
            * history/new-window-redirect-history-expected.txt: Added.
            * history/new-window-redirect-history.html: Added.
            * history/resources/redirect-1.html: Added.
            * history/resources/redirect-2.html: Added.
    
    WebCore:
    
            Reviewed by Black Sheep
    
            <rdar://problem/4664154> and http://bugs.webkit.org/show_bug.cgi?id=3546
    
            When you click on a link that opens in a new window from within gmail, they first create a new window 
            with an empty URL, then immediately document.write() into the window to schedule a redirect.
    
            Since the initial page doesn't have a URL associated with it, a history item never gets created.  The 
            reasonable solution?  To actually create the history item after the redirect (in updateHistoryForInternalLoad)
    
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::addHistoryForCurrentLocation): Updates global and B/F history with a new history item
            (WebCore::FrameLoader::updateHistoryForStandardLoad): Call addHistoryForCurrentLocation
            (WebCore::FrameLoader::updateHistoryForInternalLoad): Call addHistoryForCurrentLocation if there is not already
              a current history item
            * loader/FrameLoader.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ab0e7dcb