| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 m_cachedFrameScriptData->restore(frame); | 87 m_cachedFrameScriptData->restore(frame); |
| 88 | 88 |
| 89 #if ENABLE(SVG) | 89 #if ENABLE(SVG) |
| 90 if (m_document->svgExtensions()) | 90 if (m_document->svgExtensions()) |
| 91 m_document->accessSVGExtensions()->unpauseAnimations(); | 91 m_document->accessSVGExtensions()->unpauseAnimations(); |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 frame->animation()->resumeAnimationsForDocument(m_document.get()); | 94 frame->animation()->resumeAnimationsForDocument(m_document.get()); |
| 95 frame->eventHandler()->setMousePressNode(m_mousePressNode.get()); | 95 frame->eventHandler()->setMousePressNode(m_mousePressNode.get()); |
| 96 m_document->resumeActiveDOMObjects(); | 96 m_document->resumeActiveDOMObjects(); |
| 97 m_document->resumeScriptedAnimationControllerCallbacks(); |
| 97 | 98 |
| 98 // It is necessary to update any platform script objects after restoring the | 99 // It is necessary to update any platform script objects after restoring the |
| 99 // cached page. | 100 // cached page. |
| 100 frame->script()->updatePlatformScriptObjects(); | 101 frame->script()->updatePlatformScriptObjects(); |
| 101 | 102 |
| 102 frame->loader()->client()->didRestoreFromPageCache(); | 103 frame->loader()->client()->didRestoreFromPageCache(); |
| 103 | 104 |
| 104 // Reconstruct the FrameTree | 105 // Reconstruct the FrameTree |
| 105 for (unsigned i = 0; i < m_childFrames.size(); ++i) | 106 for (unsigned i = 0; i < m_childFrames.size(); ++i) |
| 106 frame->tree()->appendChild(m_childFrames[i]->view()->frame()); | 107 frame->tree()->appendChild(m_childFrames[i]->view()->frame()); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 129 cachedFrameCounter().increment(); | 130 cachedFrameCounter().increment(); |
| 130 #endif | 131 #endif |
| 131 ASSERT(m_document); | 132 ASSERT(m_document); |
| 132 ASSERT(m_documentLoader); | 133 ASSERT(m_documentLoader); |
| 133 ASSERT(m_view); | 134 ASSERT(m_view); |
| 134 | 135 |
| 135 if (frame->page()->focusController()->focusedFrame() == frame) | 136 if (frame->page()->focusController()->focusedFrame() == frame) |
| 136 frame->page()->focusController()->setFocusedFrame(frame->page()->mainFra
me()); | 137 frame->page()->focusController()->setFocusedFrame(frame->page()->mainFra
me()); |
| 137 | 138 |
| 138 // Active DOM objects must be suspended before we cached the frame script da
ta | 139 // Active DOM objects must be suspended before we cached the frame script da
ta |
| 140 m_document->suspendScriptedAnimationControllerCallbacks(); |
| 139 m_document->suspendActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInact
ive); | 141 m_document->suspendActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInact
ive); |
| 140 m_cachedFrameScriptData = adoptPtr(new ScriptCachedFrameData(frame)); | 142 m_cachedFrameScriptData = adoptPtr(new ScriptCachedFrameData(frame)); |
| 141 | 143 |
| 142 // Custom scrollbar renderers will get reattached when the document comes ou
t of the page cache | 144 // Custom scrollbar renderers will get reattached when the document comes ou
t of the page cache |
| 143 m_view->detachCustomScrollbars(); | 145 m_view->detachCustomScrollbars(); |
| 144 | 146 |
| 145 m_document->documentWillBecomeInactive(); | 147 m_document->documentWillBecomeInactive(); |
| 146 frame->clearTimers(); | 148 frame->clearTimers(); |
| 147 m_document->setInPageCache(true); | 149 m_document->setInPageCache(true); |
| 148 frame->loader()->stopLoading(UnloadEventPolicyUnloadAndPageHide); | 150 frame->loader()->stopLoading(UnloadEventPolicyUnloadAndPageHide); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 int CachedFrame::descendantFrameCount() const | 262 int CachedFrame::descendantFrameCount() const |
| 261 { | 263 { |
| 262 int count = m_childFrames.size(); | 264 int count = m_childFrames.size(); |
| 263 for (size_t i = 0; i < m_childFrames.size(); ++i) | 265 for (size_t i = 0; i < m_childFrames.size(); ++i) |
| 264 count += m_childFrames[i]->descendantFrameCount(); | 266 count += m_childFrames[i]->descendantFrameCount(); |
| 265 | 267 |
| 266 return count; | 268 return count; |
| 267 } | 269 } |
| 268 | 270 |
| 269 } // namespace WebCore | 271 } // namespace WebCore |
| OLD | NEW |