Author: stippi Date: Thu Mar 4 15:23:15 2010 New Revision: 282 URL: http://mmlr.dyndns.org/changeset/282 Log: * Don't force layout on frames in the page cache. * Reuse forceLayout() in forceLayoutForNonHTML(). * Removed debug output from restoreViewState(), I've confirmed it this hook not important for us. * Added comments about eventually adding platform data to cached pages. Modified: webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp Modified: webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp Thu Mar 4 14:59:02 2010 (r281) +++ webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp Thu Mar 4 15:23:15 2010 (r282) @@ -109,16 +109,18 @@ void FrameLoaderClientHaiku::forceLayout() { - FrameView* view = m_webFrame->Frame()->view(); + Frame* frame = m_webFrame->Frame(); + if (frame->document() && frame->document()->inPageCache()) + return; + + FrameView* view = frame->view(); if (view) view->forceLayout(true); } void FrameLoaderClientHaiku::forceLayoutForNonHTML() { - FrameView* view = m_webFrame->Frame()->view(); - if (view) - view->forceLayout(); + forceLayout(); } void FrameLoaderClientHaiku::setCopiesOnScroll() @@ -788,7 +790,10 @@ void FrameLoaderClientHaiku::restoreViewState() { -printf("FrameLoaderClientHaiku::restoreViewState()\n"); + // This seems unimportant, the Qt port mentions this for it's corresponding signal: + // "This signal is emitted when the load of \a frame is finished and the application + // may now update its state accordingly." + // Could be this is important for ports which use actual platform widgets. notImplemented(); } @@ -820,9 +825,9 @@ notImplemented(); } -void FrameLoaderClientHaiku::savePlatformDataToCachedFrame(CachedFrame*) +void FrameLoaderClientHaiku::savePlatformDataToCachedFrame(CachedFrame* cachedPage) { - // Nothing to be done here for the moment. + // Nothing to be done here for the moment. We don't associate any platform data } void FrameLoaderClientHaiku::transitionToCommittedFromCachedFrame(CachedFrame* cachedFrame) @@ -833,6 +838,9 @@ if (frame != frame->page()->mainFrame()) return; + // TODO: I guess we would have to restore platform data from the cachedFrame here, + // data associated in savePlatformDataToCachedFrame(). + postCommitFrameViewSetup(m_webFrame, cachedFrame->view(), false); }