Reviewed by Mark.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2007 13:24:35 +0000 (13:24 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2007 13:24:35 +0000 (13:24 +0000)
        <rdar://problem/4980176>

        * page/Frame.cpp:
        (WebCore::Frame::pageDestroyed): Since this frame is getting
        disconnected from its page, ensure it is not the focus node.

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

WebCore/ChangeLog
WebCore/page/Frame.cpp

index c028d6bb4355fd82e23fc63a27f5a391cfbc2404..0cae0684cd04a5270ad69a50fc3dadb35b3f6eef 100644 (file)
@@ -1,3 +1,13 @@
+2007-02-09  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Mark.
+
+        <rdar://problem/4980176>
+
+        * page/Frame.cpp:
+        (WebCore::Frame::pageDestroyed): Since this frame is getting
+        disconnected from its page, ensure it is not the focus node.
+
 2007-02-09  Krzysztof  <kkowalczyk@gmail.com>
 
         Reviewed by Maciej.
index 65c136b289799dc995434ae38cc666ab2849870a..04b7fdbf66114d94bdf24919f84f845cac6e9e3c 100644 (file)
@@ -1459,6 +1459,9 @@ EventHandler* Frame::eventHandler() const
 
 void Frame::pageDestroyed()
 {
+    if (d->m_page && d->m_page->focusController()->focusedFrame() == this)
+        d->m_page->focusController()->setFocusedFrame(0);
+
     d->m_page = 0;
 
     // This will stop any JS timers