2009-01-23 Brady Eidson <beidson@apple.com>
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2009 19:16:59 +0000 (19:16 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2009 19:16:59 +0000 (19:16 +0000)
        Rubberstamped by Sam Weinig

        Rework ScriptCachedPageData to ScriptCachedFrameData to more accurately reflect its true purpose

        * GNUmakefile.am:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:

        * bindings/js/ScriptCachedFrameData.cpp: Copied from bindings/js/ScriptCachedPageData.cpp.
        (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
        (WebCore::ScriptCachedFrameData::domWindow):
        (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
        (WebCore::ScriptCachedFrameData::restore):
        (WebCore::ScriptCachedFrameData::clear):
        * bindings/js/ScriptCachedFrameData.h: Copied from bindings/js/ScriptCachedPageData.h.
        * bindings/js/ScriptCachedPageData.cpp: Removed.
        * bindings/js/ScriptCachedPageData.h: Removed.

        * history/CachedPage.cpp:
        (WebCore::CachedPage::CachedPage):
        (WebCore::CachedPage::restore):
        * history/CachedPage.h:

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

WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/bindings/js/ScriptCachedFrameData.cpp [moved from WebCore/bindings/js/ScriptCachedPageData.cpp with 82% similarity]
WebCore/bindings/js/ScriptCachedFrameData.h [moved from WebCore/bindings/js/ScriptCachedPageData.h with 85% similarity]
WebCore/history/CachedPage.cpp
WebCore/history/CachedPage.h

index 69a7a6b..7878e74 100644 (file)
@@ -1,3 +1,29 @@
+2009-01-23  Brady Eidson  <beidson@apple.com>
+
+        Rubberstamped by Sam Weinig
+
+        Rework ScriptCachedPageData to ScriptCachedFrameData to more accurately reflect its true purpose
+
+        * GNUmakefile.am:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreSources.bkl:
+
+        * bindings/js/ScriptCachedFrameData.cpp: Copied from bindings/js/ScriptCachedPageData.cpp.
+        (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
+        (WebCore::ScriptCachedFrameData::domWindow):
+        (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
+        (WebCore::ScriptCachedFrameData::restore):
+        (WebCore::ScriptCachedFrameData::clear):
+        * bindings/js/ScriptCachedFrameData.h: Copied from bindings/js/ScriptCachedPageData.h.
+        * bindings/js/ScriptCachedPageData.cpp: Removed.
+        * bindings/js/ScriptCachedPageData.h: Removed.
+
+        * history/CachedPage.cpp:
+        (WebCore::CachedPage::CachedPage):
+        (WebCore::CachedPage::restore):
+        * history/CachedPage.h:
+
 2009-01-23  Steve Falkenburg  <sfalken@apple.com>
 
         Fix build.
index 8c079c8..2b2e322 100644 (file)
@@ -353,8 +353,8 @@ webcore_sources += \
        WebCore/bindings/js/JSXSLTProcessorCustom.cpp \
        WebCore/bindings/js/ScheduledAction.cpp \
        WebCore/bindings/js/ScheduledAction.h \
-       WebCore/bindings/js/ScriptCachedPageData.cpp \
-       WebCore/bindings/js/ScriptCachedPageData.h \
+       WebCore/bindings/js/ScriptCachedFrameData.cpp \
+       WebCore/bindings/js/ScriptCachedFrameData.h \
        WebCore/bindings/js/ScriptCallFrame.cpp \
        WebCore/bindings/js/ScriptCallFrame.h \
        WebCore/bindings/js/ScriptCallStack.cpp \
index 118be20..4fee2bf 100644 (file)
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\bindings\js\ScriptCachedPageData.cpp"\r
+                                       RelativePath="..\bindings\js\ScriptCachedFrameData.cpp"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\bindings\js\ScriptCachedPageData.h"\r
+                                       RelativePath="..\bindings\js\ScriptCachedFrameData.h"\r
                                        >\r
                                </File>\r
                                <File\r
index 4205c2f..f0ed8b6 100644 (file)
                416E75CC0EDF90C700360E1D /* ScriptCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */; };
                416F45F00ED7B311008215B6 /* ScriptString.h in Headers */ = {isa = PBXBuildFile; fileRef = 416F45EF0ED7B311008215B6 /* ScriptString.h */; };
                41C760B10EDE03D300C1655F /* ScriptState.h in Headers */ = {isa = PBXBuildFile; fileRef = 41C760B00EDE03D300C1655F /* ScriptState.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               41F1D21F0EF35C2A00DA8753 /* ScriptCachedPageData.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F1D21D0EF35C2A00DA8753 /* ScriptCachedPageData.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               41F1D2200EF35C2A00DA8753 /* ScriptCachedPageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F1D21E0EF35C2A00DA8753 /* ScriptCachedPageData.cpp */; };
+               41F1D21F0EF35C2A00DA8753 /* ScriptCachedFrameData.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F1D21D0EF35C2A00DA8753 /* ScriptCachedFrameData.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               41F1D2200EF35C2A00DA8753 /* ScriptCachedFrameData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F1D21E0EF35C2A00DA8753 /* ScriptCachedFrameData.cpp */; };
                4415292E0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */; };
                4415292F0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4415292D0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.cpp */; };
                441B05560CD779B6007C1F18 /* DOMCSSStyleSheetPrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 4429AAEA0CB84DC7007647C5 /* DOMCSSStyleSheetPrivate.h */; };
                416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCallFrame.cpp; sourceTree = "<group>"; };
                416F45EF0ED7B311008215B6 /* ScriptString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptString.h; sourceTree = "<group>"; };
                41C760B00EDE03D300C1655F /* ScriptState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptState.h; sourceTree = "<group>"; };
-               41F1D21D0EF35C2A00DA8753 /* ScriptCachedPageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCachedPageData.h; sourceTree = "<group>"; };
-               41F1D21E0EF35C2A00DA8753 /* ScriptCachedPageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCachedPageData.cpp; sourceTree = "<group>"; };
+               41F1D21D0EF35C2A00DA8753 /* ScriptCachedFrameData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCachedFrameData.h; sourceTree = "<group>"; };
+               41F1D21E0EF35C2A00DA8753 /* ScriptCachedFrameData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCachedFrameData.cpp; sourceTree = "<group>"; };
                4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPlugInImageElement.h; sourceTree = "<group>"; };
                4415292D0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPlugInImageElement.cpp; sourceTree = "<group>"; };
                4429AAEA0CB84DC7007647C5 /* DOMCSSStyleSheetPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCSSStyleSheetPrivate.h; sourceTree = "<group>"; };
                                BCE99EC20DCA624100182683 /* JSXSLTProcessorConstructor.h */,
                                BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */,
                                BCA378BB0D15F64200B793D6 /* ScheduledAction.h */,
-                               41F1D21E0EF35C2A00DA8753 /* ScriptCachedPageData.cpp */,
-                               41F1D21D0EF35C2A00DA8753 /* ScriptCachedPageData.h */,
+                               41F1D21E0EF35C2A00DA8753 /* ScriptCachedFrameData.cpp */,
+                               41F1D21D0EF35C2A00DA8753 /* ScriptCachedFrameData.h */,
                                416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */,
                                416E75C90EDF90C700360E1D /* ScriptCallFrame.h */,
                                416E75BD0EDF8FD700360E1D /* ScriptCallStack.cpp */,
                                1CEFC9B90D78DC8C007D2579 /* SchedulePair.h in Headers */,
                                5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */,
                                BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */,
-                               41F1D21F0EF35C2A00DA8753 /* ScriptCachedPageData.h in Headers */,
+                               41F1D21F0EF35C2A00DA8753 /* ScriptCachedFrameData.h in Headers */,
                                416E75CB0EDF90C700360E1D /* ScriptCallFrame.h in Headers */,
                                416E75BE0EDF8FD700360E1D /* ScriptCallStack.h in Headers */,
                                93B70D7009EB0C7C009D8468 /* ScriptController.h in Headers */,
                                1CE24F970D7CAF0E007E04C2 /* SchedulePairMac.mm in Sources */,
                                5DFE8F560D16477B0076E937 /* ScheduledAction.cpp in Sources */,
                                BCEC01BD0C274DAC009F4EC9 /* Screen.cpp in Sources */,
-                               41F1D2200EF35C2A00DA8753 /* ScriptCachedPageData.cpp in Sources */,
+                               41F1D2200EF35C2A00DA8753 /* ScriptCachedFrameData.cpp in Sources */,
                                416E75CC0EDF90C700360E1D /* ScriptCallFrame.cpp in Sources */,
                                416E75BF0EDF8FD700360E1D /* ScriptCallStack.cpp in Sources */,
                                93B70D6F09EB0C7C009D8468 /* ScriptController.cpp in Sources */,
index b4cf181..2f31270 100644 (file)
@@ -117,7 +117,7 @@ This file contains the list of files needed to build WebCore.
         bindings/js/JSDOMBinding.cpp
         bindings/js/JSEventListener.cpp
         bindings/js/JSPluginElementFunctions.cpp
-        bindings/js/ScriptCachedPageData.cpp
+        bindings/js/ScriptCachedFrameData.cpp
         bindings/js/ScriptCallFrame.cpp
         bindings/js/ScriptCallStack.cpp
         bindings/js/ScriptController.cpp
similarity index 82%
rename from WebCore/bindings/js/ScriptCachedPageData.cpp
rename to WebCore/bindings/js/ScriptCachedFrameData.cpp
index eeccf43..955a368 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2008, Google Inc. All rights reserved.
+ * Copyright (C) 2008 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
@@ -29,7 +30,7 @@
  */
 
 #include "config.h"
-#include "ScriptCachedPageData.h"
+#include "ScriptCachedFrameData.h"
 
 #include "Frame.h"
 #include "GCController.h"
@@ -42,45 +43,45 @@ using namespace JSC;
 
 namespace WebCore {
 
-ScriptCachedPageData::ScriptCachedPageData(Page* page)
+ScriptCachedFrameData::ScriptCachedFrameData(Frame* frame)
 {
     JSLock lock(false);
 
-    ScriptController* scriptController = page->mainFrame()->script();
+    ScriptController* scriptController = frame->script();
     if (scriptController->haveWindowShell()) {
         m_window = scriptController->windowShell()->window();
     }
 }
 
-DOMWindow* ScriptCachedPageData::domWindow() const {
+DOMWindow* ScriptCachedFrameData::domWindow() const {
     return m_window ? m_window->impl() : 0;
 }
 
-ScriptCachedPageData::~ScriptCachedPageData()
+ScriptCachedFrameData::~ScriptCachedFrameData()
 {
     clear();
 }
 
-void ScriptCachedPageData::restore(Page* page)
+void ScriptCachedFrameData::restore(Frame* frame)
 {
-    Frame* mainFrame = page->mainFrame();
+    Page* page = frame->page();
 
     JSLock lock(false);
 
-    ScriptController* scriptController = mainFrame->script();
+    ScriptController* scriptController = frame->script();
     if (scriptController->haveWindowShell()) {
         JSDOMWindowShell* windowShell = scriptController->windowShell();
         if (m_window) {
             windowShell->setWindow(m_window.get());
         } else {
-            windowShell->setWindow(mainFrame->domWindow());
+            windowShell->setWindow(frame->domWindow());
             scriptController->attachDebugger(page->debugger());
             windowShell->window()->setProfileGroup(page->group().identifier());
         }
     }
 }
 
-void ScriptCachedPageData::clear()
+void ScriptCachedFrameData::clear()
 {
     JSLock lock(false);
 
similarity index 85%
rename from WebCore/bindings/js/ScriptCachedPageData.h
rename to WebCore/bindings/js/ScriptCachedFrameData.h
index 91e47d0..c661f28 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2008, Google Inc. All rights reserved.
+ * Copyright (C) 2008 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
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ScriptCachedPageData_h
-#define ScriptCachedPageData_h
+#ifndef ScriptCachedFrameData_h
+#define ScriptCachedFrameData_h
 
 #include <runtime/Protect.h>
 
 namespace WebCore {
+    class Frame;
     class JSDOMWindow;
-    class Page;
     class DOMWindow;
 
-    class ScriptCachedPageData  {
+    class ScriptCachedFrameData  {
     public:
-        ScriptCachedPageData(Page*);
-        ~ScriptCachedPageData();
+        ScriptCachedFrameData(Frame*);
+        ~ScriptCachedFrameData();
 
-        void restore(Page*);
+        void restore(Frame*);
         void clear();
         DOMWindow* domWindow() const;
 
@@ -53,4 +54,4 @@ namespace WebCore {
 
 } // namespace WebCore
 
-#endif // ScriptCachedPageData_h
+#endif // ScriptCachedFrameData_h
index 290446e..4598b3b 100644 (file)
@@ -65,7 +65,7 @@ CachedPage::CachedPage(Page* page)
     , m_view(page->mainFrame()->view())
     , m_mousePressNode(page->mainFrame()->eventHandler()->mousePressNode())
     , m_URL(page->mainFrame()->loader()->url())
-    , m_cachedPageScriptData(page)
+    , m_cachedPageScriptData(page->mainFrame())
 {
 #ifndef NDEBUG
     cachedPageCounter.increment();
@@ -99,7 +99,7 @@ void CachedPage::restore(Page* page)
 
     Frame* mainFrame = page->mainFrame();
 
-    m_cachedPageScriptData.restore(page);
+    m_cachedPageScriptData.restore(mainFrame);
 
 #if ENABLE(SVG)
     if (m_document && m_document->svgExtensions())
index 7602e20..a7a82b6 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "KURL.h"
 #include <wtf/OwnPtr.h>
-#include "ScriptCachedPageData.h"
+#include "ScriptCachedFrameData.h"
 
 namespace WebCore {
     
@@ -74,7 +74,7 @@ private:
     RefPtr<FrameView> m_view;
     RefPtr<Node> m_mousePressNode;
     KURL m_URL;
-    ScriptCachedPageData m_cachedPageScriptData;
+    ScriptCachedFrameData m_cachedPageScriptData;
     OwnPtr<CachedPagePlatformData> m_cachedPagePlatformData;
 };