summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/history/CachedFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/history/CachedFrame.cpp')
-rw-r--r--Source/WebCore/history/CachedFrame.cpp4
1 files changed, 4 insertions, 0 deletions
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));