Commit 7e42b490 authored by mjs@apple.com's avatar mjs@apple.com
Browse files

2011-01-17 Maciej Stachowiak <mjs@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
parent 95d4bfae
2011-01-17 Maciej Stachowiak <mjs@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@apple.com>
 
Simplify WKCACFLayerRenderer's API
......
......@@ -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));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment