WebCore:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2007 07:17:21 +0000 (07:17 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2007 07:17:21 +0000 (07:17 +0000)
        Reviewed by Sam Weinig

        Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)

        All back/forward list and page cache related items used to be in WebKit.
        When they were pushed into WebCore, some sloppy compromises were made to keep the Back/Forward cache working on Mac.
        Namely, a WebCore::HistoryItem had to know how to keep a WebDocumentView alive.  We accomplished this via some #ifdefs
        in CachedPage and having the Mac-only CachedPageMac.mm

        To get rid of that nastiness and pave the way for adding Back/Forward cache on other platforms, this patch adds the
        concept of "CachedPagePlatformData" which can contain anything the platform API wants.

        I also took the opportunity to do other cleanup and renaming client methods to better fit their new purposes.

        * WebCore.base.exp:
        * WebCore.xcodeproj/project.pbxproj:

        * history/CachedPage.cpp:
        (WebCore::CachedPage::~CachedPage): Combined "close()" and "clear()" to just "clear()" - call it from here.
        (WebCore::CachedPage::clear): Call clear() on the CachedPagePlatformData if it exists.  Also delete the CachedPagePlatformData.
        (WebCore::CachedPage::setCachedPagePlatformData):
        (WebCore::CachedPage::cachedPagePlatformData):
        * history/CachedPage.h:

        * history/CachedPagePlatformData.h: Added.
        (WebCore::CachedPagePlatformData::~CachedPagePlatformData): Virtual d'tor.
        (WebCore::CachedPagePlatformData::clear): Virtual method for platforms that need to do cleanup at the same time as CachedPage::clear().

        * history/PageCache.cpp:
        (WebCore::PageCache::releaseAutoreleasedPagesNow): Call "clear()" instead of "close()"

        * history/mac/CachedPageMac.mm: Removed. Functionality replaced with CachedPagePlatformData.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted): Call the new client methods.  Make some work previously done by WebKitMac cross platform
          (setting the cached DocumentLoader to the Frame).
        (WebCore::FrameLoader::cachePageForHistoryItem):  Renamed the client methods

        * loader/FrameLoaderClient.h:  The very Mac-centric "makeDocumentView", "setDocumentViewFromCachedPage", and "saveDocumentViewToCachedPage"
          become "transitionToCommittedForNewPage", "transitionToCommittedFromCachedPage", and "savePlatformDataToCachedPage" accordingly

        * svg/graphics/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::savePlatformDataToCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedForNewPage):

WebKit:

        Reviewed by Sam Weinig

                Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)

        * WebKit.xcodeproj/project.pbxproj: Added a new file

WebKit/gtk:

        Reviewed by Sam Weinig

        As part of doing some CachedPage and client cleanup, keep GTK building

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::savePlatformDataToCachedPage):
        (WebKit::FrameLoaderClient::transitionToCommittedFromCachedPage):
        (WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
        * WebCoreSupport/FrameLoaderClientGtk.h:

WebKit/mac:

        Reviewed by Sam Weinig

        Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)

        * WebCoreSupport/WebCachedPagePlatformData.h: Added.
        (WebCachedPagePlatformData::WebCachedPagePlatformData): Constructor takes a WebDocumentView for later restoration
        (WebCachedPagePlatformData::clear):
        (WebCachedPagePlatformData::webDocumentView):

        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::savePlatformDataToCachedPage):
        (WebFrameLoaderClient::transitionToCommittedFromCachedPage): Don't set the DocumentLoader to the Frame here,
          because that is now done in WebCore.
        (WebFrameLoaderClient::transitionToCommittedForNewPage):

WebKit/qt:

        Reviewed by Sam Weinig

        As part of doing some CachedPage and client cleanup, keep Qt building

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::savePlatformDataToCachedPage):
        (WebCore::FrameLoaderClientQt::transitionToCommittedFromCachedPage):
        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
        * WebCoreSupport/FrameLoaderClientQt.h:

WebKit/win:

        Reviewed by Sam Weinig

        Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)

        Even though this new code isn't exercised yet because the page cache is still turned off for Windows, local testing
        has indicated it works well.

        * WebCachedPagePlatformData.h: Added.
        (WebCachedPagePlatformData::WebCachedPagePlatformData): Constructor takes an IWebDataSource and the object retains it
        (WebCachedPagePlatformData::clear):
        (WebCachedPagePlatformData::webDataSource):

        * WebFrame.cpp:
        (WebFrame::savePlatformDataToCachedPage):
        (WebFrame::transitionToCommittedFromCachedPage):
        (WebFrame::transitionToCommittedForNewPage):
        * WebFrame.h:

        * WebKit.vcproj/WebKit.vcproj:

WebKit/wx:

        Reviewed by Sam Weinig

        As part of doing some CachedPage and client cleanup, keep Wx building

        * WebKitSupport/FrameLoaderClientWx.cpp:
        (WebCore::FrameLoaderClientWx::savePlatformDataToCachedPage):
        (WebCore::FrameLoaderClientWx::transitionToCommittedFromCachedPage):
        (WebCore::FrameLoaderClientWx::transitionToCommittedForNewPage):
        * WebKitSupport/FrameLoaderClientWx.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28672 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/history/CachedPage.cpp
WebCore/history/CachedPage.h
WebCore/history/CachedPagePlatformData.h [new file with mode: 0644]
WebCore/history/PageCache.cpp
WebCore/history/mac/CachedPageMac.mm [deleted file]
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoaderClient.h
WebCore/svg/graphics/SVGImageEmptyClients.h
WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h [new file with mode: 0644]
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
WebKit/win/ChangeLog
WebKit/win/WebCachedPagePlatformData.h [new file with mode: 0644]
WebKit/win/WebFrame.cpp
WebKit/win/WebFrame.h
WebKit/win/WebKit.vcproj/WebKit.vcproj
WebKit/wx/ChangeLog
WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
WebKit/wx/WebKitSupport/FrameLoaderClientWx.h

index 3d3cca27cd5972b6b08ff5e8ed9287e19ecdab18..0a5215293f3857b9aa59a2ce5532cbea6e030d93 100644 (file)
@@ -1,3 +1,51 @@
+2007-12-12  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Sam Weinig
+
+        Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
+
+        All back/forward list and page cache related items used to be in WebKit.
+        When they were pushed into WebCore, some sloppy compromises were made to keep the Back/Forward cache working on Mac.
+        Namely, a WebCore::HistoryItem had to know how to keep a WebDocumentView alive.  We accomplished this via some #ifdefs
+        in CachedPage and having the Mac-only CachedPageMac.mm
+
+        To get rid of that nastiness and pave the way for adding Back/Forward cache on other platforms, this patch adds the 
+        concept of "CachedPagePlatformData" which can contain anything the platform API wants.  
+
+        I also took the opportunity to do other cleanup and renaming client methods to better fit their new purposes.
+
+        * WebCore.base.exp:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * history/CachedPage.cpp:
+        (WebCore::CachedPage::~CachedPage): Combined "close()" and "clear()" to just "clear()" - call it from here.
+        (WebCore::CachedPage::clear): Call clear() on the CachedPagePlatformData if it exists.  Also delete the CachedPagePlatformData.
+        (WebCore::CachedPage::setCachedPagePlatformData):
+        (WebCore::CachedPage::cachedPagePlatformData):
+        * history/CachedPage.h:
+
+        * history/CachedPagePlatformData.h: Added.
+        (WebCore::CachedPagePlatformData::~CachedPagePlatformData): Virtual d'tor.
+        (WebCore::CachedPagePlatformData::clear): Virtual method for platforms that need to do cleanup at the same time as CachedPage::clear().
+
+        * history/PageCache.cpp:
+        (WebCore::PageCache::releaseAutoreleasedPagesNow): Call "clear()" instead of "close()"
+
+        * history/mac/CachedPageMac.mm: Removed. Functionality replaced with CachedPagePlatformData.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::transitionToCommitted): Call the new client methods.  Make some work previously done by WebKitMac cross platform 
+          (setting the cached DocumentLoader to the Frame).
+        (WebCore::FrameLoader::cachePageForHistoryItem):  Renamed the client methods
+
+        * loader/FrameLoaderClient.h:  The very Mac-centric "makeDocumentView", "setDocumentViewFromCachedPage", and "saveDocumentViewToCachedPage"
+          become "transitionToCommittedForNewPage", "transitionToCommittedFromCachedPage", and "savePlatformDataToCachedPage" accordingly
+
+        * svg/graphics/SVGImageEmptyClients.h:
+        (WebCore::SVGEmptyFrameLoaderClient::savePlatformDataToCachedPage):
+        (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedFromCachedPage):
+        (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedForNewPage):
+
 2007-12-12  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Oliver Hunt.
index 28d14700c2d924e71519bf4ea4d2c43177ac5de4..6a4ee8f6b1d044db2de99a4adad891a0f3817d87 100644 (file)
@@ -126,10 +126,9 @@ _WebCoreSetShouldUseFontSmoothing
 _WebCoreShouldUseFontSmoothing
 _WebCoreTextFloatWidth
 __Z26ReportBlockedObjCExceptionP11NSException
-__ZN7WebCore10CachedPage12documentViewEv
 __ZN7WebCore10CachedPage14documentLoaderEv
-__ZN7WebCore10CachedPage15setDocumentViewEP11objc_object
-__ZN7WebCore10CachedPageD1Ev
+__ZN7WebCore10CachedPage22cachedPagePlatformDataEv
+__ZN7WebCore10CachedPage25setCachedPagePlatformDataEPNS_22CachedPagePlatformDataE
 __ZN7WebCore10EventNames10clickEventE
 __ZN7WebCore10EventNames12keydownEventE
 __ZN7WebCore10MouseEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowEiiiiibbbbtPNS_15EventTargetNodeEPNS_9ClipboardEb
index 3e26b7783ae56b16abeffa12d9343378144d7f2c..9cdf59ca29e8375894de7ae77fcf5adf6e330cf0 100644 (file)
                515B039A0CD1642A00B7EA9C /* SQLStatement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515B03980CD1642A00B7EA9C /* SQLStatement.cpp */; };
                5160300B0CC4251200C8AC25 /* FileSystemPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */; };
                5160306C0CC4362300C8AC25 /* FileSystemCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */; };
-               5160F3BC0B0A99C900C1D2AF /* CachedPageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5160F3BB0B0A99C900C1D2AF /* CachedPageMac.mm */; };
                5160F4980B0AA75F00C1D2AF /* HistoryItemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */; };
                516BB7930CE91E6800512F79 /* JSSVGPointListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */; };
                516BB7940CE91E6800512F79 /* JSTreeWalkerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */; };
                51AA3F6F0BD5AA9E00892971 /* ResourceLoaderMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51AA3F6E0BD5AA9E00892971 /* ResourceLoaderMac.mm */; };
                51C81B890C4422F70019ECE3 /* FTPDirectoryParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */; };
                51C81B8A0C4422F70019ECE3 /* FTPDirectoryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C81B880C4422F70019ECE3 /* FTPDirectoryParser.h */; };
+               51CBFC990D10E483002DBF51 /* CachedPagePlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51CBFC980D10E483002DBF51 /* CachedPagePlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51DCE8020CAC9F1C00488358 /* JSSQLResultSetRowListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51DCE8010CAC9F1C00488358 /* JSSQLResultSetRowListCustom.cpp */; };
                51DF6D7E0B92A16D00C2DC85 /* ThreadCheck.h in Headers */ = {isa = PBXBuildFile; fileRef = 51DF6D7D0B92A16D00C2DC85 /* ThreadCheck.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */; };
                515B03980CD1642A00B7EA9C /* SQLStatement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLStatement.cpp; sourceTree = "<group>"; };
                5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemPOSIX.cpp; sourceTree = "<group>"; };
                5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemCF.cpp; sourceTree = "<group>"; };
-               5160F3BB0B0A99C900C1D2AF /* CachedPageMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CachedPageMac.mm; path = mac/CachedPageMac.mm; sourceTree = "<group>"; };
                5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = HistoryItemMac.mm; path = mac/HistoryItemMac.mm; sourceTree = "<group>"; };
                516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGPointListCustom.cpp; sourceTree = "<group>"; };
                516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTreeWalkerCustom.cpp; sourceTree = "<group>"; };
                51AA3F6E0BD5AA9E00892971 /* ResourceLoaderMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceLoaderMac.mm; sourceTree = "<group>"; };
                51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryParser.cpp; sourceTree = "<group>"; };
                51C81B880C4422F70019ECE3 /* FTPDirectoryParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FTPDirectoryParser.h; sourceTree = "<group>"; };
+               51CBFC980D10E483002DBF51 /* CachedPagePlatformData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPagePlatformData.h; sourceTree = "<group>"; };
                51DCE8010CAC9F1C00488358 /* JSSQLResultSetRowListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLResultSetRowListCustom.cpp; sourceTree = "<group>"; };
                51DF6D7D0B92A16D00C2DC85 /* ThreadCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadCheck.h; sourceTree = "<group>"; };
                51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ThreadCheck.mm; sourceTree = "<group>"; };
                5160F4920B0AA71500C1D2AF /* mac */ = {
                        isa = PBXGroup;
                        children = (
-                               5160F3BB0B0A99C900C1D2AF /* CachedPageMac.mm */,
                                5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */,
                        );
                        name = mac;
                                51741D0B0B07259A00ED442C /* BackForwardList.h */,
                                510184680B08602A004A825F /* CachedPage.cpp */,
                                510184670B08602A004A825F /* CachedPage.h */,
+                               51CBFC980D10E483002DBF51 /* CachedPagePlatformData.h */,
                                51741D0E0B07259A00ED442C /* HistoryItem.cpp */,
                                51741D0D0B07259A00ED442C /* HistoryItem.h */,
                                1477E7740BF4134A00152872 /* PageCache.cpp */,
                                BCB16C2D0979C3BD00467741 /* loader.h in Headers */,
                                93309DF8099E64920056E581 /* markup.h in Headers */,
                                93309E1E099E64920056E581 /* visible_units.h in Headers */,
+                               51CBFC990D10E483002DBF51 /* CachedPagePlatformData.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                BC64B4CB0CB4295D005F2B62 /* CachedFont.cpp in Sources */,
                                BCB16C1B0979C3BD00467741 /* CachedImage.cpp in Sources */,
                                5101846A0B08602A004A825F /* CachedPage.cpp in Sources */,
-                               5160F3BC0B0A99C900C1D2AF /* CachedPageMac.mm in Sources */,
                                BCB16C1F0979C3BD00467741 /* CachedResource.cpp in Sources */,
                                BCB16C210979C3BD00467741 /* CachedResourceClientWalker.cpp in Sources */,
                                BCB16C230979C3BD00467741 /* CachedScript.cpp in Sources */,
index dd01f1646320de07d8a20f2e48bac1a064d63064..2ae65f76b0f175c4486b3f99e6c5e7ea85254839 100644 (file)
@@ -27,6 +27,7 @@
 #include "CachedPage.h"
 
 #include "AnimationController.h"
+#include "CachedPagePlatformData.h"
 #include "Document.h"
 #include "Element.h"
 #include "EventHandler.h"
@@ -118,7 +119,7 @@ CachedPage::~CachedPage()
     --CachedPageCounter::count;
 #endif
 
-    close();
+    clear();
 }
 
 void CachedPage::restore(Page* page)
@@ -161,6 +162,9 @@ void CachedPage::clear()
     if (!m_document)
         return;
 
+    if (m_cachedPagePlatformData)
+        m_cachedPagePlatformData->clear();
+        
     ASSERT(m_view);
     ASSERT(m_document->frame() == m_view->frame());
 
@@ -188,6 +192,7 @@ void CachedPage::clear()
     m_locationProperties.clear();
     m_windowBuiltins.clear();
     m_pausedTimeouts.clear();
+    m_cachedPagePlatformData.clear();
 
     gcController().garbageCollectSoon();
 }
@@ -217,4 +222,14 @@ double CachedPage::timeStamp() const
     return m_timeStamp;
 }
 
+void CachedPage::setCachedPagePlatformData(CachedPagePlatformData* data)
+{
+    m_cachedPagePlatformData.set(data);
+}
+
+CachedPagePlatformData* CachedPage::cachedPagePlatformData()
+{
+    return m_cachedPagePlatformData.get();
+}
+
 } // namespace WebCore
index e27b259009063d437333ff77227dd0ff71e50877..ee467125473ba27e10c61a8b18845e029bde602c 100644 (file)
@@ -45,7 +45,8 @@ namespace KJS {
 }
 
 namespace WebCore {
-
+    
+    class CachedPagePlatformData;
     class Document;
     class FrameView;
     class Node;
@@ -62,19 +63,15 @@ public:
     Node* mousePressNode() const { return m_mousePressNode.get(); }
     const KURL& url() const { return m_URL; }
     void restore(Page*);
-    
-    void close();
-    
+        
     void setTimeStamp(double);
     void setTimeStampToNow();
     double timeStamp() const;
     void setDocumentLoader(PassRefPtr<DocumentLoader>);
     DocumentLoader* documentLoader();
-#if PLATFORM(MAC)
-    void setDocumentView(id);
-    id documentView();
-#endif
 
+    void setCachedPagePlatformData(CachedPagePlatformData*);
+    CachedPagePlatformData* cachedPagePlatformData();
 private:
     CachedPage(Page*);
     RefPtr<DocumentLoader> m_documentLoader;
@@ -88,11 +85,8 @@ private:
     OwnPtr<KJS::SavedProperties> m_locationProperties;
     OwnPtr<KJS::SavedBuiltins> m_windowBuiltins;
     OwnPtr<KJS::PausedTimeouts> m_pausedTimeouts;
-        
-#if PLATFORM(MAC)
-    RetainPtr<id> m_documentView;
-#endif
-}; // class CachedPage
+    OwnPtr<CachedPagePlatformData> m_cachedPagePlatformData;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/history/CachedPagePlatformData.h b/WebCore/history/CachedPagePlatformData.h
new file mode 100644 (file)
index 0000000..c623f2f
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef CachedPagePlatformData_h
+#define CachedPagePlatformData_h
+
+namespace WebCore {
+
+// The purpose of this class is to give each platform a vessel to store platform data when a page
+// goes into the Back/Forward page cache, and perform some action with that data when the page comes out.  
+// Each platform should subclass this class as neccessary
+
+class CachedPagePlatformData {
+public:
+    virtual ~CachedPagePlatformData() { }
+    virtual void clear() { }
+};
+
+} // namespace WebCore
+
+#endif // CachedPagePlatformData_h
index fb58fa9c7ac088b80f2f36b8864c59b0c1f0a049..dc24fd2e460452c75d369d20937596973fff161e 100644 (file)
@@ -164,7 +164,7 @@ void PageCache::releaseAutoreleasedPagesNow()
 
     CachedPageSet::iterator end = tmp.end();
     for (CachedPageSet::iterator it = tmp.begin(); it != end; ++it)
-        (*it)->close();
+        (*it)->clear();
 
     // Now do the prune.
     cache()->setPruneEnabled(true);
diff --git a/WebCore/history/mac/CachedPageMac.mm b/WebCore/history/mac/CachedPageMac.mm
deleted file mode 100644 (file)
index dfdb0fe..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "config.h"
-#include "CachedPage.h"
-
-#import <objc/objc-runtime.h>
-
-namespace WebCore {
-
-void CachedPage::close()
-{
-    if (!m_document)
-        return;
-        
-    // FIXME: <rdar://problem/4886844>
-    // The current method of tracking the "document view" is messy and quite platform specific
-    // Having a WebCore-way to track this would be great.
-    if (m_documentView)
-        objc_msgSend(m_documentView.get(), @selector(closeIfNotCurrentView));
-
-    clear();
-}
-
-void CachedPage::setDocumentView(id documentView)
-{
-    m_documentView = documentView;
-}
-
-id CachedPage::documentView()
-{
-    return m_documentView.get();
-}
-
-} //namespace WebCore
-
index e2642112b83a3afe0d92a78afe847ddf2e480fb7..e78e3105453ab91bc93f1644948817348d32eb44 100644 (file)
@@ -2606,10 +2606,14 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
                     updateHistoryForBackForwardNavigation();
 
                     // Create a document view for this document, or used the cached view.
-                    if (cachedPage)
-                        m_client->setDocumentViewFromCachedPage(cachedPage.get());
-                    else
-                        m_client->makeDocumentView();
+                    if (cachedPage) {
+                        DocumentLoader* cachedDocumentLoader = cachedPage->documentLoader();
+                        ASSERT(cachedDocumentLoader);
+                        cachedDocumentLoader->setFrame(m_frame);
+                        m_client->transitionToCommittedFromCachedPage(cachedPage.get());
+                        
+                    } else
+                        m_client->transitionToCommittedForNewPage();
                 }
             break;
 
@@ -2617,12 +2621,12 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
         case FrameLoadTypeSame:
         case FrameLoadTypeReplace:
             updateHistoryForReload();
-            m_client->makeDocumentView();
+            m_client->transitionToCommittedForNewPage();
             break;
 
         // FIXME - just get rid of this case, and merge FrameLoadTypeReloadAllowingStaleData with the above case
         case FrameLoadTypeReloadAllowingStaleData:
-            m_client->makeDocumentView();
+            m_client->transitionToCommittedForNewPage();
             break;
 
         case FrameLoadTypeStandard:
@@ -2633,12 +2637,12 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
             if (m_frame->view())
                 m_frame->view()->suppressScrollbars(true);
 #endif
-            m_client->makeDocumentView();
+            m_client->transitionToCommittedForNewPage();
             break;
 
         case FrameLoadTypeRedirectWithLockedHistory:
             updateHistoryForRedirectWithLockedHistory();
-            m_client->makeDocumentView();
+            m_client->transitionToCommittedForNewPage();
             break;
 
         // FIXME Remove this check when dummy ds is removed (whatever "dummy ds" is).
@@ -3764,7 +3768,7 @@ void FrameLoader::cachePageForHistoryItem(HistoryItem* item)
         RefPtr<CachedPage> cachedPage = CachedPage::create(page);
         cachedPage->setTimeStampToNow();
         cachedPage->setDocumentLoader(documentLoader());
-        m_client->saveDocumentViewToCachedPage(cachedPage.get());
+        m_client->savePlatformDataToCachedPage(cachedPage.get());
 
         pageCache()->add(item, cachedPage.release());
     }
index 88dacf5de93a24f78b1151aea7b04eff2439d976..f299405e71249f22fe6e2b0ab8540ee618c309fe 100644 (file)
@@ -78,9 +78,7 @@ namespace WebCore {
 
         virtual bool hasHTMLView() const { return true; }
 
-        virtual void makeDocumentView() = 0;
         virtual void makeRepresentation(DocumentLoader*) = 0;
-        virtual void setDocumentViewFromCachedPage(CachedPage*) = 0;
         virtual void forceLayout() = 0;
         virtual void forceLayoutForNonHTML() = 0;
 
@@ -190,7 +188,10 @@ namespace WebCore {
 
         virtual String userAgent(const KURL&) = 0;
         
-        virtual void saveDocumentViewToCachedPage(CachedPage*) = 0;
+        virtual void savePlatformDataToCachedPage(CachedPage*) = 0;
+        virtual void transitionToCommittedFromCachedPage(CachedPage*) = 0;
+        virtual void transitionToCommittedForNewPage() = 0;
+
         virtual bool canCachePage() const = 0;
         virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&) = 0;
 
index bb2f25ce92d3b72dccd9a81992864c4278a9491f..69ba92634fa29f8fe390262b7a8e1248b0a0b78c 100644 (file)
@@ -128,7 +128,6 @@ public:
     virtual bool hasWebView() const { return true; } // mainly for assertions
     virtual bool hasFrameView() const { return true; } // ditto
     
-    virtual void makeDocumentView() { }
     virtual void makeRepresentation(DocumentLoader*) { }
     virtual void forceLayout() { }
     virtual void forceLayoutForNonHTML() { }
@@ -244,13 +243,15 @@ public:
     virtual void setTitle(const String& title, const KURL&) { }
     
     virtual String userAgent(const KURL&) { return ""; }
-    
-    virtual void setDocumentViewFromCachedPage(CachedPage*) { }
+
+    virtual void savePlatformDataToCachedPage(CachedPage*) { }
+    virtual void transitionToCommittedFromCachedPage(CachedPage*) { }
+    virtual void transitionToCommittedForNewPage() { }    
+
     virtual void updateGlobalHistoryForStandardLoad(const KURL&) { }
     virtual void updateGlobalHistoryForReload(const KURL&) { }
     virtual bool shouldGoToHistoryItem(HistoryItem*) const { return false; }
     virtual void saveViewStateToItem(HistoryItem*) { }
-    virtual void saveDocumentViewToCachedPage(CachedPage*) { }
     virtual bool canCachePage() const { return false; }
 
     virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
index ba2adb8e20be06d7b89f056d332c09ac56a9fa31..bb56c64823f01921bff86f9dfd2633f61004b8e4 100644 (file)
@@ -1,3 +1,11 @@
+2007-12-12  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Sam Weinig
+
+                Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
+
+        * WebKit.xcodeproj/project.pbxproj: Added a new file
+
 2007-12-12  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Dave Kilzer.
index 388493622365c70d4137d9019587d55faccb0be9..1abd78d1a797c5287ed7d7c8aa334a4c27dff9f3 100644 (file)
@@ -49,6 +49,7 @@
                51AEDEF10CECF45700854328 /* WebDatabaseManagerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51AEDEF00CECF45700854328 /* WebDatabaseManagerInternal.h */; };
                51B2A1000ADB15D0002A9BEE /* WebIconDatabaseDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B2A0FF0ADB15D0002A9BEE /* WebIconDatabaseDelegate.h */; };
                51C714FB0B20F79F00E5E33C /* WebBackForwardListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C714FA0B20F79F00E5E33C /* WebBackForwardListInternal.h */; };
+               51CBFCAD0D10E6C5002DBF51 /* WebCachedPagePlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51CBFCAC0D10E6C5002DBF51 /* WebCachedPagePlatformData.h */; };
                51FDC4D30B0AF5C100F84EB3 /* WebHistoryItemPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FDC4D20B0AF5C100F84EB3 /* WebHistoryItemPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5241ADF50B1BC48A004012BD /* WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5241ADF30B1BC48A004012BD /* WebCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5241ADF40B1BC48A004012BD /* WebCache.mm */; };
                51B2A0FF0ADB15D0002A9BEE /* WebIconDatabaseDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseDelegate.h; sourceTree = "<group>"; };
                51C16E4006138EB400A1657B /* npfunctions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = npfunctions.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51C714FA0B20F79F00E5E33C /* WebBackForwardListInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardListInternal.h; sourceTree = "<group>"; };
+               51CBFCAC0D10E6C5002DBF51 /* WebCachedPagePlatformData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCachedPagePlatformData.h; sourceTree = "<group>"; };
                51E94C3406C0321200A9B09E /* WebPDFView.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPDFView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51E94C3506C0321200A9B09E /* WebPDFView.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPDFView.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51E94C6806C0347500A9B09E /* WebPDFRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPDFRepresentation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F5B36B400281DE87018635CB /* WebCoreSupport */ = {
                        isa = PBXGroup;
                        children = (
-                               A70936AD0B5608DC00CDB48E /* WebDragClient.h */,
-                               A70936AE0B5608DC00CDB48E /* WebDragClient.mm */,
+                               51CBFCAC0D10E6C5002DBF51 /* WebCachedPagePlatformData.h */,
                                14D8252D0AF955090004F057 /* WebChromeClient.h */,
                                14D8252E0AF955090004F057 /* WebChromeClient.mm */,
                                065AD5A10B0C32C7005A2B1D /* WebContextMenuClient.h */,
                                065AD5A20B0C32C7005A2B1D /* WebContextMenuClient.mm */,
                                9305892A070868B300E79D96 /* WebDashboardRegion.h */,
+                               A70936AD0B5608DC00CDB48E /* WebDragClient.h */,
+                               A70936AE0B5608DC00CDB48E /* WebDragClient.mm */,
                                4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */,
                                4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */,
                                F5AFB45E02B94DC8018635CA /* WebFrameBridge.h */,
                                9398109B0824BF01008DF038 /* WebViewInternal.h in Headers */,
                                939810710824BF01008DF038 /* WebViewPrivate.h in Headers */,
                                939810970824BF01008DF038 /* npfunctions.h in Headers */,
+                               51CBFCAD0D10E6C5002DBF51 /* WebCachedPagePlatformData.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index d12cc8f8c9392ce26a6f3fd287b36dc625c63e5d..95d3ecb5c16cb661e7626dc489ab6b5c9044c8a8 100644 (file)
@@ -1,3 +1,15 @@
+2007-12-12  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Sam Weinig
+
+        As part of doing some CachedPage and client cleanup, keep GTK building
+
+        * WebCoreSupport/FrameLoaderClientGtk.cpp:
+        (WebKit::FrameLoaderClient::savePlatformDataToCachedPage):
+        (WebKit::FrameLoaderClient::transitionToCommittedFromCachedPage):
+        (WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
+        * WebCoreSupport/FrameLoaderClientGtk.h:
+
 2007-12-12  Alp Toker  <alp@atoker.com>
 
         Reviewed by Holger Freyther.
index 0aa2c8494dbc65d876c7887044c6677a01e644c2..11b351ea7957c4f3b1afcaa85691bf87d58b2562 100644 (file)
@@ -427,7 +427,6 @@ bool FrameLoaderClient::shouldGoToHistoryItem(HistoryItem* item) const
     return item != 0;
 }
 
-void FrameLoaderClient::makeDocumentView() { notImplemented(); }
 void FrameLoaderClient::makeRepresentation(DocumentLoader*) { notImplemented(); }
 void FrameLoaderClient::forceLayout() { notImplemented(); }
 void FrameLoaderClient::forceLayoutForNonHTML() { notImplemented(); }
@@ -516,7 +515,6 @@ void FrameLoaderClient::setTitle(const String& title, const KURL& url)
         g_signal_emit_by_name(page, "title-changed", titleString.data(), urlString.data());
 }
 
-void FrameLoaderClient::setDocumentViewFromCachedPage(WebCore::CachedPage*) { notImplemented(); }
 void FrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader*, unsigned long  identifier, int lengthReceived) { notImplemented(); }
 void FrameLoaderClient::dispatchDidFinishLoading(DocumentLoader*, unsigned long  identifier) { notImplemented(); }
 void FrameLoaderClient::dispatchDidFailLoading(DocumentLoader*, unsigned long  identifier, const ResourceError&) { notImplemented(); }
@@ -541,7 +539,6 @@ ResourceError FrameLoaderClient::cannotShowMIMETypeError(const ResourceResponse&
 ResourceError FrameLoaderClient::fileDoesNotExistError(const ResourceResponse&) { notImplemented(); return ResourceError(); }
 bool FrameLoaderClient::shouldFallBack(const ResourceError&) { notImplemented(); return false; }
 bool FrameLoaderClient::willUseArchive(ResourceLoader*, const ResourceRequest&, const KURL& originalURL) const { notImplemented(); return false; }
-void FrameLoaderClient::saveDocumentViewToCachedPage(CachedPage*) { notImplemented(); }
 bool FrameLoaderClient::canCachePage() const { notImplemented(); return false; }
 Frame* FrameLoaderClient::dispatchCreatePage() { notImplemented(); return 0; }
 void FrameLoaderClient::dispatchUnableToImplementPolicy(const ResourceError&) { notImplemented(); }
@@ -550,4 +547,7 @@ void FrameLoaderClient::startDownload(const ResourceRequest&) { notImplemented()
 void FrameLoaderClient::updateGlobalHistoryForStandardLoad(const KURL&) { notImplemented(); }
 void FrameLoaderClient::updateGlobalHistoryForReload(const KURL&) { notImplemented(); }
 
+void FrameLoaderClient::savePlatformDataToCachedPage(CachedPage*) { notImplemented(); }
+void FrameLoaderClient::transitionToCommittedFromCachedPage(CachedPage*) { notImplemented(); }
+void FrameLoaderClient::transitionToCommittedForNewPage() { notImplemented(); }
 }
index 771806a34677e13441346c57c6de07cdc20cc82f..13c416111be88ee06afe1d15ec85aa1f6f835c5a 100644 (file)
@@ -47,9 +47,7 @@ namespace WebKit {
         virtual bool hasWebView() const;
         virtual bool hasFrameView() const;
 
-        virtual void makeDocumentView();
         virtual void makeRepresentation(WebCore::DocumentLoader*);
-        virtual void setDocumentViewFromCachedPage(WebCore::CachedPage*);
         virtual void forceLayout();
         virtual void forceLayoutForNonHTML();
 
@@ -172,7 +170,10 @@ namespace WebKit {
 
         virtual WebCore::String userAgent(const WebCore::KURL&);
 
-        virtual void saveDocumentViewToCachedPage(WebCore::CachedPage*);
+        virtual void savePlatformDataToCachedPage(WebCore::CachedPage*);
+        virtual void transitionToCommittedFromCachedPage(WebCore::CachedPage*);
+        virtual void transitionToCommittedForNewPage();
+        
         virtual bool canCachePage() const;
         virtual void download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
     private:
index 73ff4275be11a23a1099806ab46fd94191ce5952..d4dde7252e9f29fd1b6db305cb9593aca60e998d 100644 (file)
@@ -1,3 +1,21 @@
+2007-12-12  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Sam Weinig
+
+        Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
+
+        * WebCoreSupport/WebCachedPagePlatformData.h: Added.
+        (WebCachedPagePlatformData::WebCachedPagePlatformData): Constructor takes a WebDocumentView for later restoration
+        (WebCachedPagePlatformData::clear):
+        (WebCachedPagePlatformData::webDocumentView):
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::savePlatformDataToCachedPage):
+        (WebFrameLoaderClient::transitionToCommittedFromCachedPage): Don't set the DocumentLoader to the Frame here, 
+          because that is now done in WebCore.
+        (WebFrameLoaderClient::transitionToCommittedForNewPage):
+
 2007-12-12  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Dave Kilzer.
diff --git a/WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h b/WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h
new file mode 100644 (file)
index 0000000..3b0ab32
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <objc/objc-runtime.h>
+#import <WebCore/CachedPagePlatformData.h>
+#import <wtf/RetainPtr.h>
+
+class WebCachedPagePlatformData : public WebCore::CachedPagePlatformData {
+public:
+    WebCachedPagePlatformData(id webDocumentView) : m_webDocumentView(webDocumentView) { }
+    
+    virtual void clear() { objc_msgSend(m_webDocumentView.get(), @selector(closeIfNotCurrentView)); }
+
+    id webDocumentView() { return m_webDocumentView.get(); }
+private:
+    RetainPtr<id> m_webDocumentView;
+};
+
index 1c4911c15ef90dc9e9616f846f3c7a14366cd6ad..88788ee70e354bd202d3be2d4b05d0759f8c02b4 100644 (file)
@@ -62,10 +62,8 @@ private:
     virtual bool hasWebView() const; // mainly for assertions
     virtual bool hasFrameView() const; // ditto
 
-    virtual void makeDocumentView();
     virtual void makeRepresentation(WebCore::DocumentLoader*);
     virtual bool hasHTMLView() const;
-    virtual void setDocumentViewFromCachedPage(WebCore::CachedPage*);
     virtual void forceLayout();
     virtual void forceLayoutForNonHTML();
 
@@ -159,6 +157,10 @@ private:
     virtual void setDefersLoading(bool);
 
     virtual WebCore::String userAgent(const WebCore::KURL&);
+    
+    virtual void savePlatformDataToCachedPage(WebCore::CachedPage*);
+    virtual void transitionToCommittedFromCachedPage(WebCore::CachedPage*);
+    virtual void transitionToCommittedForNewPage();
 
     virtual bool willUseArchive(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, const WebCore::KURL& originalURL) const;
     virtual bool isArchiveLoadPending(WebCore::ResourceLoader*) const;
@@ -207,8 +209,6 @@ private:
     RetainPtr<WebFramePolicyListener> setUpPolicyListener(WebCore::FramePolicyFunction);
 
     NSDictionary *actionDictionary(const WebCore::NavigationAction&) const;
-
-    void saveDocumentViewToCachedPage(WebCore::CachedPage* cachedPage);
     
     virtual bool canCachePage() const;
 
index 5bf611251f7d50dbcfa10f60a1441d634a63a59c..bde1c5aa00261980bc141b7a4caf5f1e448fc0cb 100644 (file)
@@ -35,6 +35,7 @@
 
 #import "DOMElementInternal.h"
 #import "WebBackForwardList.h"
+#import "WebCachedPagePlatformData.h"
 #import "WebChromeClient.h"
 #import "WebDataSourceInternal.h"
 #import "WebPolicyDelegatePrivate.h"
@@ -147,54 +148,12 @@ bool WebFrameLoaderClient::hasFrameView() const
     return m_webFrame->_private->webFrameView != nil;
 }
 
-void WebFrameLoaderClient::makeDocumentView()
-{
-    WebFrameView *v = m_webFrame->_private->webFrameView;
-    WebDataSource *ds = [m_webFrame.get() _dataSource];
-
-    bool willProduceHTMLView = [[WebFrameView class] _viewClassForMIMEType:[ds _responseMIMEType]] == [WebHTMLView class];
-    bool canSkipCreation = [m_webFrame.get() _frameLoader]->committingFirstRealLoad() && willProduceHTMLView;
-    if (canSkipCreation) {
-        [[v documentView] setDataSource:ds];
-        return;
-    }
-
-    // Don't suppress scrollbars before the view creation if we're making the view for a non-HTML view.
-    if (!willProduceHTMLView)
-        [[v _scrollView] setScrollBarsSuppressed:NO repaintOnUnsuppress:NO];
-    
-    NSView <WebDocumentView> *documentView = [v _makeDocumentViewForDataSource:ds];
-    if (!documentView)
-        return;
-
-    WebFrameBridge *bridge = m_webFrame->_private->bridge;
-
-    // FIXME: We could save work and not do this for a top-level view that is not a WebHTMLView.
-    [bridge createFrameViewWithNSView:documentView marginWidth:[v _marginWidth] marginHeight:[v _marginHeight]];
-    [m_webFrame.get() _updateBackground];
-    [bridge installInFrame:[v _scrollView]];
-
-    // Call setDataSource on the document view after it has been placed in the view hierarchy.
-    // This what we for the top-level view, so should do this for views in subframes as well.
-    [documentView setDataSource:ds];
-}
 
 void WebFrameLoaderClient::makeRepresentation(DocumentLoader* loader)
 {
     [dataSource(loader) _makeRepresentation];
 }
 
-void WebFrameLoaderClient::setDocumentViewFromCachedPage(CachedPage* cachedPage)
-{
-    DocumentLoader* cachedDocumentLoader = cachedPage->documentLoader();
-    ASSERT(cachedDocumentLoader);
-    cachedDocumentLoader->setFrame(core(m_webFrame.get()));
-    NSView <WebDocumentView> *cachedView = cachedPage->documentView();
-    ASSERT(cachedView != nil);
-    [cachedView setDataSource:dataSource(cachedDocumentLoader)];
-    [m_webFrame->_private->webFrameView _setDocumentView:cachedView];
-}
-
 bool WebFrameLoaderClient::hasHTMLView() const
 {
     NSView <WebDocumentView> *view = [m_webFrame->_private->webFrameView documentView];
@@ -1053,9 +1012,52 @@ void WebFrameLoaderClient::deliverArchivedResources(Timer<WebFrameLoaderClient>*
     }
 }
 
-void WebFrameLoaderClient::saveDocumentViewToCachedPage(CachedPage* cachedPage)
+void WebFrameLoaderClient::savePlatformDataToCachedPage(CachedPage* cachedPage)
 {
-    cachedPage->setDocumentView([m_webFrame->_private->webFrameView documentView]);
+    WebCachedPagePlatformData* webPlatformData = new WebCachedPagePlatformData([m_webFrame->_private->webFrameView documentView]);
+    cachedPage->setCachedPagePlatformData(webPlatformData);
+}
+
+void WebFrameLoaderClient::transitionToCommittedFromCachedPage(CachedPage* cachedPage)
+{
+    WebCachedPagePlatformData* platformData = reinterpret_cast<WebCachedPagePlatformData*>(cachedPage->cachedPagePlatformData());
+    NSView <WebDocumentView> *cachedView = platformData->webDocumentView();
+    ASSERT(cachedView != nil);
+    ASSERT(cachedPage->documentLoader());
+    [cachedView setDataSource:dataSource(cachedPage->documentLoader())];
+    [m_webFrame->_private->webFrameView _setDocumentView:cachedView];
+}
+
+void WebFrameLoaderClient::transitionToCommittedForNewPage()
+{
+    WebFrameView *v = m_webFrame->_private->webFrameView;
+    WebDataSource *ds = [m_webFrame.get() _dataSource];
+
+    bool willProduceHTMLView = [[WebFrameView class] _viewClassForMIMEType:[ds _responseMIMEType]] == [WebHTMLView class];
+    bool canSkipCreation = [m_webFrame.get() _frameLoader]->committingFirstRealLoad() && willProduceHTMLView;
+    if (canSkipCreation) {
+        [[v documentView] setDataSource:ds];
+        return;
+    }
+
+    // Don't suppress scrollbars before the view creation if we're making the view for a non-HTML view.
+    if (!willProduceHTMLView)
+        [[v _scrollView] setScrollBarsSuppressed:NO repaintOnUnsuppress:NO];
+    
+    NSView <WebDocumentView> *documentView = [v _makeDocumentViewForDataSource:ds];
+    if (!documentView)
+        return;
+
+    WebFrameBridge *bridge = m_webFrame->_private->bridge;
+
+    // FIXME: We could save work and not do this for a top-level view that is not a WebHTMLView.
+    [bridge createFrameViewWithNSView:documentView marginWidth:[v _marginWidth] marginHeight:[v _marginHeight]];
+    [m_webFrame.get() _updateBackground];
+    [bridge installInFrame:[v _scrollView]];
+
+    // Call setDataSource on the document view after it has been placed in the view hierarchy.
+    // This what we for the top-level view, so should do this for views in subframes as well.
+    [documentView setDataSource:ds];
 }
 
 RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(FramePolicyFunction function)
index 84c904cdf01d519c129ed179a2a295bb2eb41df2..c35def065aae3a0e205b37a043d1b1b558a6f02a 100644 (file)
@@ -1,3 +1,15 @@
+2007-12-12  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Sam Weinig
+
+        As part of doing some CachedPage and client cleanup, keep Qt building
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::savePlatformDataToCachedPage):
+        (WebCore::FrameLoaderClientQt::transitionToCommittedFromCachedPage):
+        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
+        * WebCoreSupport/FrameLoaderClientQt.h:
+
 2007-12-12  Sam Weinig  <sam@webkit.org>
 
         Build fix.
index 702a14e625b84a158e785e60f5a5e4fdd5473e26..143d240179878d1c3cea0c094c00a692ab2bece8 100644 (file)
@@ -158,9 +158,18 @@ void FrameLoaderClientQt::invalidateCurrentItemPageCache()
     notImplemented();
 }
 
+void FrameLoaderClientQt::savePlatformDataToCachedPage(CachedPage*) 
+{ 
+    notImplemented();
+}
 
-void FrameLoaderClientQt::makeDocumentView()
-{
+void FrameLoaderClientQt::transitionToCommittedFromCachedPage(CachedPage*)
+{ 
+    notImplemented();
+}
+
+void FrameLoaderClientQt::transitionToCommittedForNewPage() 
+{ 
 //    qDebug() << "FrameLoaderClientQt::makeDocumentView" << m_frame->document();
 
 //     if (!m_frame->document())
@@ -586,11 +595,6 @@ void FrameLoaderClientQt::registerForIconNotification(bool)
     notImplemented();
 }
 
-void FrameLoaderClientQt::setDocumentViewFromCachedPage(CachedPage*)
-{
-    notImplemented();
-}
-
 void FrameLoaderClientQt::updateGlobalHistoryForStandardLoad(const WebCore::KURL& url)
 {
     emit m_webFrame->page()->addToHistory(QUrl(url.prettyURL()));
@@ -614,11 +618,6 @@ void FrameLoaderClientQt::saveViewStateToItem(WebCore::HistoryItem*)
     notImplemented();
 }
 
-void FrameLoaderClientQt::saveDocumentViewToCachedPage(CachedPage*)
-{
-    notImplemented();
-}
-
 bool FrameLoaderClientQt::canCachePage() const
 {
     // don't do any caching for now
@@ -985,6 +984,7 @@ QString FrameLoaderClientQt::chooseFile(const QString& oldFile)
     return webFrame()->page()->chooseFile(webFrame(), oldFile);
 }
 
+
 }
 
 #include "moc_FrameLoaderClientQt.cpp"
index 5c5f3b5adf9304ace4e205cfbb0f481d609cd93f..fe528de73b013351e6ceb70d08075374ff508e23 100644 (file)
@@ -80,7 +80,6 @@ namespace WebCore {
         virtual bool loadProvisionalItemFromPageCache();
         virtual void invalidateCurrentItemPageCache();
 
-        virtual void makeDocumentView();
         virtual void makeRepresentation(DocumentLoader*);
         virtual void forceLayout();
         virtual void forceLayoutForNonHTML();
@@ -153,12 +152,14 @@ namespace WebCore {
 
         virtual String userAgent(const WebCore::KURL&);
 
-        virtual void setDocumentViewFromCachedPage(CachedPage*);
+        virtual void savePlatformDataToCachedPage(WebCore::CachedPage*);
+        virtual void transitionToCommittedFromCachedPage(WebCore::CachedPage*);
+        virtual void transitionToCommittedForNewPage();
+        
         virtual void updateGlobalHistoryForStandardLoad(const WebCore::KURL&);
         virtual void updateGlobalHistoryForReload(const WebCore::KURL&);
         virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const;
         virtual void saveViewStateToItem(WebCore::HistoryItem*);
-        virtual void saveDocumentViewToCachedPage(CachedPage*);
         virtual bool canCachePage() const;
         
         virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
index 001a66992c3c557e42c0fc1cc35ac50656f0ee53..1f3b0b013b6822226de8bef02cab29d2e0e4e85e 100644 (file)
@@ -1,3 +1,25 @@
+2007-12-12  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Sam Weinig
+
+        Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
+
+        Even though this new code isn't exercised yet because the page cache is still turned off for Windows, local testing
+        has indicated it works well.
+
+        * WebCachedPagePlatformData.h: Added.
+        (WebCachedPagePlatformData::WebCachedPagePlatformData): Constructor takes an IWebDataSource and the object retains it
+        (WebCachedPagePlatformData::clear):
+        (WebCachedPagePlatformData::webDataSource):
+
+        * WebFrame.cpp:
+        (WebFrame::savePlatformDataToCachedPage):
+        (WebFrame::transitionToCommittedFromCachedPage):
+        (WebFrame::transitionToCommittedForNewPage):
+        * WebFrame.h:
+
+        * WebKit.vcproj/WebKit.vcproj:
+
 2007-12-12  Steve Falkenburg  <sfalken@apple.com>
 
         Build fix.
diff --git a/WebKit/win/WebCachedPagePlatformData.h b/WebKit/win/WebCachedPagePlatformData.h
new file mode 100644 (file)
index 0000000..f5a5388
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef WebCachedPagePlatformData_h
+#define WebCachedPagePlatformData_h
+
+#include "WebDataSource.h"
+
+#include <WebCore/CachedPagePlatformData.h>
+
+class WebCachedPagePlatformData : public WebCore::CachedPagePlatformData {
+public:
+    WebCachedPagePlatformData(IWebDataSource* webDataSource) : m_webDataSource(webDataSource) { }
+
+    IWebDataSource* webDataSource() { return m_webDataSource.get(); }
+
+private:
+    COMPtr<IWebDataSource> m_webDataSource;
+};
+
+#endif // CachedPagePlatformData_h
index 2d30d5100430f6686a4e9b1041dc78924a04cd45..e457326d1627893275302113051badb2321ad07b 100644 (file)
@@ -40,6 +40,7 @@
 #include "IWebUIDelegatePrivate.h"
 #include "MarshallingHelpers.h"
 #include "WebActionPropertyBag.h"
+#include "WebCachedPagePlatformData.h"
 #include "WebChromeClient.h"
 #include "WebDocumentLoader.h"
 #include "WebDownload.h"
@@ -1493,15 +1494,6 @@ bool WebFrame::hasFrameView() const
     return !!d->frameView();
 }
 
-void WebFrame::makeDocumentView()
-{
-    ASSERT(core(this));
-    
-    // On the mac, this is done in Frame::setView, but since we don't have separate 
-    // frame views, we'll just do it here instead.
-    core(this)->loader()->resetMultipleFormSubmissionProtection();
-}
-
 void WebFrame::makeRepresentation(DocumentLoader*)
 {
     notImplemented();
@@ -1542,11 +1534,6 @@ void WebFrame::detachedFromParent4()
     notImplemented();
 }
 
-void WebFrame::loadedFromCachedPage()
-{
-    notImplemented();
-}
-
 void WebFrame::dispatchDidReceiveServerRedirectForProvisionalLoad()
 {
     COMPtr<IWebFrameLoadDelegate> frameLoadDelegate;
@@ -1840,9 +1827,30 @@ String WebFrame::userAgent(const KURL& url)
     return d->webView->userAgentForKURL(url);
 }
 
-void WebFrame::setDocumentViewFromCachedPage(CachedPage*)
+void WebFrame::savePlatformDataToCachedPage(CachedPage* cachedPage)
 {
-    notImplemented();
+    Frame* coreFrame = core(this);
+    if (!coreFrame)
+        return;
+
+    ASSERT(coreFrame->loader()->documentLoader() == cachedPage->documentLoader());
+
+    WebCachedPagePlatformData* webPlatformData = new WebCachedPagePlatformData(static_cast<IWebDataSource*>(getWebDataSource(coreFrame->loader()->documentLoader())));
+    cachedPage->setCachedPagePlatformData(webPlatformData);
+}
+
+void WebFrame::transitionToCommittedFromCachedPage(CachedPage*)
+{
+    transitionToCommittedForNewPage();
+}
+
+void WebFrame::transitionToCommittedForNewPage()
+{
+    ASSERT(core(this));
+
+    // On the mac, this is done in Frame::setView, but since we don't have separate
+    // frame views, we'll just do it here instead.
+    core(this)->loader()->resetMultipleFormSubmissionProtection();
 }
 
 void WebFrame::updateGlobalHistoryForStandardLoad(const KURL& url)
@@ -1893,11 +1901,6 @@ void WebFrame::saveViewStateToItem(HistoryItem*)
     notImplemented();
 }
 
-void WebFrame::saveDocumentViewToCachedPage(CachedPage*)
-{
-    notImplemented();
-}
-
 bool WebFrame::canCachePage() const
 {
     notImplemented();
index a8c5569c1ef9d7d21980139b77684abbe7ffa92e..0729a6a8c5346ecc3dca5ecc0533ebf180af5017 100644 (file)
@@ -229,7 +229,6 @@ public:
     virtual void frameLoaderDestroyed();
     virtual bool hasWebView() const;
     virtual bool hasFrameView() const;
-    virtual void makeDocumentView();
     virtual void makeRepresentation(WebCore::DocumentLoader*);
     virtual void forceLayout();
     virtual void forceLayoutForNonHTML();
@@ -238,7 +237,6 @@ public:
     virtual void detachedFromParent2();
     virtual void detachedFromParent3();
     virtual void detachedFromParent4();
-    virtual void loadedFromCachedPage();
     virtual void dispatchDidHandleOnloadEvents();
     virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
     virtual void dispatchDidCancelClientRedirect();
@@ -280,12 +278,13 @@ public:
     virtual void prepareForDataSourceReplacement();
     virtual void setTitle(const WebCore::String& title, const WebCore::KURL&);
     virtual WebCore::String userAgent(const WebCore::KURL&);
-    virtual void setDocumentViewFromCachedPage(WebCore::CachedPage *);
+    virtual void savePlatformDataToCachedPage(WebCore::CachedPage*);
+    virtual void transitionToCommittedFromCachedPage(WebCore::CachedPage*);
+    virtual void transitionToCommittedForNewPage();
     virtual void updateGlobalHistoryForStandardLoad(const WebCore::KURL &);
     virtual void updateGlobalHistoryForReload(const WebCore::KURL &);
     virtual bool shouldGoToHistoryItem(WebCore::HistoryItem *) const;
     virtual void saveViewStateToItem(WebCore::HistoryItem *);
-    virtual void saveDocumentViewToCachedPage(WebCore::CachedPage *);
     virtual bool canCachePage(void) const;
     virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
     virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
index 4c1a5a88cfe0028bc4b712eb9620cb8b0217a9ed..055c4790cf9b17edded72249c8c2545266ea607b 100644 (file)
                                RelativePath="..\WebCache.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\WebCachedPagePlatformData.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\WebChromeClient.h"\r
                                >\r
index 78b449831d6fe8026c2a60dd35b54e443c5951ab..493e6346363d8638c7e530de93d1a3567af4d5d7 100644 (file)
@@ -1,3 +1,15 @@
+2007-12-12  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Sam Weinig
+
+        As part of doing some CachedPage and client cleanup, keep Wx building
+
+        * WebKitSupport/FrameLoaderClientWx.cpp:
+        (WebCore::FrameLoaderClientWx::savePlatformDataToCachedPage):
+        (WebCore::FrameLoaderClientWx::transitionToCommittedFromCachedPage):
+        (WebCore::FrameLoaderClientWx::transitionToCommittedForNewPage):
+        * WebKitSupport/FrameLoaderClientWx.h:
+
 2007-12-12  Sam Weinig  <sam@webkit.org>
 
         Build fix.
index 40ad721c1407d6994677e3d24dcaafe9fb3fec00..1ab80fd4906ff8f9a201a63433bbfc829efb3c11 100644 (file)
@@ -130,13 +130,6 @@ bool FrameLoaderClientWx::provisionalItemIsTarget() const
     return false;
 }
 
-
-void FrameLoaderClientWx::makeDocumentView()
-{
-    notImplemented();
-}
-
-
 void FrameLoaderClientWx::makeRepresentation(DocumentLoader*)
 {
     notImplemented();
@@ -581,11 +574,6 @@ void FrameLoaderClientWx::partClearedInBegin()
     notImplemented();
 }
 
-void FrameLoaderClientWx::setDocumentViewFromCachedPage(WebCore::CachedPage*)
-{
-    notImplemented();
-}
-
 void FrameLoaderClientWx::updateGlobalHistoryForStandardLoad(const WebCore::KURL&)
 {
     notImplemented();
@@ -607,11 +595,6 @@ void FrameLoaderClientWx::saveScrollPositionAndViewStateToItem(WebCore::HistoryI
     notImplemented();
 }
 
-void FrameLoaderClientWx::saveDocumentViewToCachedPage(WebCore::CachedPage*)
-{
-    notImplemented();
-}
-
 bool FrameLoaderClientWx::canCachePage() const
 {
     return false;
@@ -903,4 +886,19 @@ void FrameLoaderClientWx::registerForIconNotification(bool listen)
     notImplemented();
 }
 
+void FrameLoaderClientWx::savePlatformDataToCachedPage(CachedPage*)
+{ 
+    notImplemented();
+}
+
+void FrameLoaderClientWx::transitionToCommittedFromCachedPage(CachedPage*)
+{ 
+    notImplemented();
+}
+
+void FrameLoaderClientWx::transitionToCommittedForNewPage()
+{ 
+    notImplemented();
+}
+
 }
index f681e299e8e9c3a400e31644a0529b3a22a6fef3..37dd8313c822fd1e5dadec026fa13579485e10a2 100644 (file)
@@ -65,7 +65,6 @@ namespace WebCore {
 
         virtual bool provisionalItemIsTarget() const;
 
-        virtual void makeDocumentView();
         virtual void makeRepresentation(DocumentLoader*);
         virtual void forceLayout();
         virtual void forceLayoutForNonHTML();
@@ -153,13 +152,14 @@ namespace WebCore {
 
         virtual String userAgent(const KURL&);
 
-
-        virtual void setDocumentViewFromCachedPage(CachedPage*);
+        virtual void savePlatformDataToCachedPage(WebCore::CachedPage*);
+        virtual void transitionToCommittedFromCachedPage(WebCore::CachedPage*);
+        virtual void transitionToCommittedForNewPage();
+        
         virtual void updateGlobalHistoryForStandardLoad(const KURL&);
         virtual void updateGlobalHistoryForReload(const KURL&);
         virtual bool shouldGoToHistoryItem(HistoryItem*) const;
         virtual void saveScrollPositionAndViewStateToItem(HistoryItem*);
-        virtual void saveDocumentViewToCachedPage(CachedPage*);
         virtual bool canCachePage() const;
         
         virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);