void CachedFrame::restore(Frame* frame) { ASSERT(m_document->view() == m_view); m_cachedFrameScriptData->restore(frame); #if ENABLE(SVG) if (m_document->svgExtensions()) m_document->accessSVGExtensions()->unpauseAnimations(); #endif frame->animation()->resumeAnimations(m_document.get()); frame->eventHandler()->setMousePressNode(mousePressNode()); m_document->resumeActiveDOMObjects(); }
void CachedFrame::restore() { ASSERT(m_document->view() == m_view); Frame* frame = m_view->frame(); m_cachedFrameScriptData->restore(frame); #if ENABLE(SVG) if (m_document->svgExtensions()) m_document->accessSVGExtensions()->unpauseAnimations(); #endif frame->animation()->resumeAnimations(m_document.get()); frame->eventHandler()->setMousePressNode(mousePressNode()); m_document->resumeActiveDOMObjects(); // It is necessary to update any platform script objects after restoring the // cached page. frame->script()->updatePlatformScriptObjects(); }
void CachedPage::restore(Page* page) { ASSERT(m_document->view() == m_view); Frame* mainFrame = page->mainFrame(); JSLock lock(false); ScriptController* proxy = mainFrame->script(); if (proxy->haveWindowShell()) { JSDOMWindowShell* windowShell = proxy->windowShell(); if (m_window) { windowShell->setWindow(m_window.get()); windowShell->window()->resumeTimeouts(m_pausedTimeouts); } else { windowShell->setWindow(mainFrame->domWindow()); proxy->attachDebugger(page->debugger()); windowShell->window()->setProfileGroup(page->group().identifier()); } } #if ENABLE(SVG) if (m_document && m_document->svgExtensions()) m_document->accessSVGExtensions()->unpauseAnimations(); #endif mainFrame->animation()->resumeAnimations(m_document.get()); mainFrame->eventHandler()->setMousePressNode(mousePressNode()); // Restore the focus appearance for the focused element. // FIXME: Right now we don't support pages w/ frames in the b/f cache. This may need to be tweaked when we add support for that. Document* focusedDocument = page->focusController()->focusedOrMainFrame()->document(); if (Node* node = focusedDocument->focusedNode()) { if (node->isElementNode()) static_cast<Element*>(node)->updateFocusAppearance(true); } }