Reviewed by Brady.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jan 2007 05:45:47 +0000 (05:45 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jan 2007 05:45:47 +0000 (05:45 +0000)
        - fixed <rdar://problem/4939366> REGRESSION: Assertion failure and crash when going back in history (12314)

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::createWindow): special case a frame name of "_blank"
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19289 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/FrameLoader.cpp

index 7100482fdef5d8779a0fd2c0c3ff964a19a9af65..cfa26a1813b8c642a3467e3b5226dda741cc97ea 100644 (file)
@@ -1,3 +1,13 @@
+2007-01-30  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Brady.
+
+        - fixed <rdar://problem/4939366> REGRESSION: Assertion failure and crash when going back in history (12314)
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::createWindow): special case a frame name of "_blank"
+        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): ditto
+
 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Anders.
index e539ad4001e30a00519588cf0fb9c6b831ba7321..930c8b33287667ff4557f62e70671de9722e4848 100644 (file)
@@ -268,7 +268,7 @@ Frame* FrameLoader::createWindow(const FrameLoadRequest& request, const WindowFe
 { 
     ASSERT(!features.dialog || request.frameName().isEmpty());
 
-    if (!request.frameName().isEmpty())
+    if (!request.frameName().isEmpty() && request.frameName() != "_blank")
         if (Frame* frame = m_frame->tree()->find(request.frameName())) {
             if (!request.resourceRequest().url().isEmpty())
                 frame->loader()->load(request, true, 0, 0, HashMap<String, String>());
@@ -289,7 +289,8 @@ Frame* FrameLoader::createWindow(const FrameLoadRequest& request, const WindowFe
         return 0;
 
     Frame* frame = page->mainFrame();
-    frame->tree()->setName(request.frameName());
+    if (request.frameName() != "_blank")
+        frame->tree()->setName(request.frameName());
 
     page->chrome()->setToolbarsVisible(features.toolBarVisible || features.locationBarVisible);
     page->chrome()->setStatusbarVisible(features.statusBarVisible);
@@ -3389,7 +3390,8 @@ void FrameLoader::continueLoadAfterNewWindowPolicy(const ResourceRequest& reques
     if (!mainFrame)
         return;
 
-    mainFrame->tree()->setName(frameName);
+    if (frameName != "_blank")
+        mainFrame->tree()->setName(frameName);
     mainFrame->loader()->m_client->dispatchShow();
     mainFrame->loader()->setOpener(frame.get());
     mainFrame->loader()->load(request, NavigationAction(), FrameLoadTypeStandard, formState);