[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

mjs at apple.com mjs at apple.com
Sun Feb 20 23:08:39 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 7e42b490129a34a951b620bdb03ecc7d5bb3ecbf
Author: mjs at apple.com <mjs at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 18 03:49:08 2011 +0000

    2011-01-17  Maciej Stachowiak  <mjs at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Some WebKit2 layout tests crash due to focus being on a frame in the page cache
            https://bugs.webkit.org/show_bug.cgi?id=52607
    
            No new tests. Existing tests crash in WebKit2 without this fix.
    
            I suspect there are other consequences besides the WebKit2 crash, but I
            was unable to identify any for certain.
    
            * history/CachedFrame.cpp:
            (WebCore::CachedFrame::CachedFrame): If a frame still has focus when its page
            goes in the page cache, reset focus to the main frame.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75994 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index e8fe2cd..375817f 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-17  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Some WebKit2 layout tests crash due to focus being on a frame in the page cache
+        https://bugs.webkit.org/show_bug.cgi?id=52607
+
+        No new tests. Existing tests crash in WebKit2 without this fix.
+        
+        I suspect there are other consequences besides the WebKit2 crash, but I
+        was unable to identify any for certain.
+
+        * history/CachedFrame.cpp:
+        (WebCore::CachedFrame::CachedFrame): If a frame still has focus when its page
+        goes in the page cache, reset focus to the main frame.
+
 2011-01-17  Adam Roben  <aroben at apple.com>
 
         Simplify WKCACFLayerRenderer's API
diff --git a/Source/WebCore/history/CachedFrame.cpp b/Source/WebCore/history/CachedFrame.cpp
index d21f958..ab6b4d6 100644
--- a/Source/WebCore/history/CachedFrame.cpp
+++ b/Source/WebCore/history/CachedFrame.cpp
@@ -30,6 +30,7 @@
 #include "DocumentLoader.h"
 #include "ExceptionCode.h"
 #include "EventNames.h"
+#include "FocusController.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
 #include "FrameView.h"
@@ -131,6 +132,9 @@ CachedFrame::CachedFrame(Frame* frame)
     ASSERT(m_documentLoader);
     ASSERT(m_view);
 
+    if (frame->page()->focusController()->focusedFrame() == frame)
+        frame->page()->focusController()->setFocusedFrame(frame->page()->mainFrame());
+
     // Active DOM objects must be suspended before we cached the frame script data
     m_document->suspendActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInactive);
     m_cachedFrameScriptData = adoptPtr(new ScriptCachedFrameData(frame));

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list