[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
beidson at apple.com
beidson at apple.com
Fri Jan 21 14:59:23 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 81c6ccf477e419c146335217f389aeb8876dbf68
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 6 00:32:53 2011 +0000
https://bugs.webkit.org/show_bug.cgi?id=51953
Add a "SessionState" object for IPC messaging.
Reviewed by Darin Adler.
This object includes all data necessary to restore a session state;
For now, this is just the back/forward list to restore.
* Shared/SessionState.cpp: Added.
(WebKit::SessionState::SessionState):
(WebKit::SessionState::encode):
(WebKit::SessionState::decode):
* Shared/SessionState.h: Added.
(WebKit::SessionState::list):
(WebKit::SessionState::currentIndex):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2263064..15a7545 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,25 @@
+2011-01-05 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51953
+ Add a "SessionState" object for IPC messaging.
+
+ This object includes all data necessary to restore a session state;
+ For now, this is just the back/forward list to restore.
+
+ * Shared/SessionState.cpp: Added.
+ (WebKit::SessionState::SessionState):
+ (WebKit::SessionState::encode):
+ (WebKit::SessionState::decode):
+ * Shared/SessionState.h: Added.
+ (WebKit::SessionState::list):
+ (WebKit::SessionState::currentIndex):
+
+ * WebKit2.pro:
+ * WebKit2.xcodeproj/project.pbxproj:
+ * win/WebKit2.vcproj:
+
2011-01-05 Laszlo Gombos <laszlo.1.gombos at nokia.com>
Unreviewed build fix.
diff --git a/WebKit2/Shared/SessionState.cpp b/WebKit2/Shared/SessionState.cpp
new file mode 100644
index 0000000..4bde599
--- /dev/null
+++ b/WebKit2/Shared/SessionState.cpp
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2011 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "SessionState.h"
+
+namespace CoreIPC {
+
+// This assumes that when we encode a RefPtr we want to encode the object it points to and it is never null.
+template<typename T> struct ArgumentCoder<RefPtr<T> > {
+ static void encode(ArgumentEncoder* encoder, const RefPtr<T>& item)
+ {
+ item->encode(*encoder);
+ }
+
+ static bool decode(ArgumentDecoder* decoder, RefPtr<T>& item)
+ {
+ item = T::decode(*decoder);
+ return item;
+ }
+};
+
+} // namespace CoreIPC
+
+namespace WebKit {
+
+SessionState::SessionState()
+ : m_currentIndex(0)
+{
+}
+
+SessionState::SessionState(const BackForwardListItemVector& list, uint32_t currentIndex)
+ : m_list(list)
+ , m_currentIndex(currentIndex)
+{
+}
+
+void SessionState::encode(CoreIPC::ArgumentEncoder* encoder) const
+{
+ encoder->encode(m_list);
+ encoder->encode(m_currentIndex);
+}
+
+bool SessionState::decode(CoreIPC::ArgumentDecoder* decoder, SessionState& state)
+{
+ if (!decoder->decode(state.m_list))
+ return false;
+ if (!decoder->decode(state.m_currentIndex))
+ return false;
+ return true;
+}
+
+} // namespace WebKit
diff --git a/WebKit2/Shared/SessionState.h b/WebKit2/Shared/SessionState.h
new file mode 100644
index 0000000..80b35cb
--- /dev/null
+++ b/WebKit2/Shared/SessionState.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2011 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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 SessionState_h
+#define SessionState_h
+
+#include "WebBackForwardList.h"
+
+namespace CoreIPC {
+ class ArgumentDecoder;
+ class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+class SessionState {
+public:
+ SessionState();
+ SessionState(const BackForwardListItemVector&, uint32_t currentIndex);
+
+ const BackForwardListItemVector& list() const { return m_list; }
+ uint32_t currentIndex() const { return m_currentIndex; }
+
+ void encode(CoreIPC::ArgumentEncoder*) const;
+ static bool decode(CoreIPC::ArgumentDecoder*, SessionState&);
+
+private:
+ BackForwardListItemVector m_list;
+ uint32_t m_currentIndex;
+};
+
+} // namespace WebKit
+
+#endif // SessionState_h
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index 2615eeb..aad8b0a 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -254,6 +254,7 @@ HEADERS += \
Shared/OriginAndDatabases.h \
Shared/PlatformPopupMenuData.h \
Shared/SameDocumentNavigationType.h \
+ Shared/SessionState.h \
Shared/StringPairVector.h \
Shared/UserMessageCoders.h \
Shared/VisitedLinkTable.h \
@@ -467,6 +468,7 @@ SOURCES += \
Shared/MutableDictionary.cpp \
Shared/OriginAndDatabases.cpp \
Shared/PlatformPopupMenuData.cpp \
+ Shared/SessionState.cpp \
Shared/VisitedLinkTable.cpp \
Shared/WebBackForwardListItem.cpp \
Shared/WebContextMenuItem.cpp \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 99c7980..411f4d6 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -251,6 +251,8 @@
518ACF1112B015F800B04B83 /* WKCredentialTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 518ACF1012B015F800B04B83 /* WKCredentialTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
518D2CAD12D5153B003BB93B /* WebBackForwardListItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518D2CAB12D5153B003BB93B /* WebBackForwardListItem.cpp */; };
518D2CAE12D5153B003BB93B /* WebBackForwardListItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 518D2CAC12D5153B003BB93B /* WebBackForwardListItem.h */; };
+ 518D2CCA12D51DFB003BB93B /* SessionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518D2CC812D51DFB003BB93B /* SessionState.cpp */; };
+ 518D2CCB12D51DFB003BB93B /* SessionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 518D2CC912D51DFB003BB93B /* SessionState.h */; };
51A555F5128C6C47009ABCEC /* WKContextMenuItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A555F3128C6C47009ABCEC /* WKContextMenuItem.cpp */; };
51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A555F4128C6C47009ABCEC /* WKContextMenuItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A55600128C6D92009ABCEC /* WKContextMenuItemTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -931,6 +933,8 @@
518ACF1012B015F800B04B83 /* WKCredentialTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKCredentialTypes.h; sourceTree = "<group>"; };
518D2CAB12D5153B003BB93B /* WebBackForwardListItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebBackForwardListItem.cpp; sourceTree = "<group>"; };
518D2CAC12D5153B003BB93B /* WebBackForwardListItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardListItem.h; sourceTree = "<group>"; };
+ 518D2CC812D51DFB003BB93B /* SessionState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionState.cpp; sourceTree = "<group>"; };
+ 518D2CC912D51DFB003BB93B /* SessionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionState.h; sourceTree = "<group>"; };
51A555F3128C6C47009ABCEC /* WKContextMenuItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKContextMenuItem.cpp; sourceTree = "<group>"; };
51A555F4128C6C47009ABCEC /* WKContextMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuItem.h; sourceTree = "<group>"; };
51A55600128C6D92009ABCEC /* WKContextMenuItemTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuItemTypes.h; sourceTree = "<group>"; };
@@ -1645,6 +1649,8 @@
BC2D021612AC41CB00E732A3 /* SameDocumentNavigationType.h */,
1AAB4A8C1296F0A20023952F /* SandboxExtension.h */,
1AA41AB412C02EC4002BE67B /* SelectionState.h */,
+ 518D2CC812D51DFB003BB93B /* SessionState.cpp */,
+ 518D2CC912D51DFB003BB93B /* SessionState.h */,
BCBD3C3A125BFA7A00D2C29F /* StringPairVector.h */,
1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */,
BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */,
@@ -2846,6 +2852,7 @@
93FC67C012D3CCF200A60610 /* EncoderAdapter.h in Headers */,
1A5E4DA412D3BD3D0099A2BB /* TextCheckerState.h in Headers */,
518D2CAE12D5153B003BB93B /* WebBackForwardListItem.h in Headers */,
+ 518D2CCB12D51DFB003BB93B /* SessionState.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3278,6 +3285,7 @@
93FC67BD12D3CCF200A60610 /* DecoderAdapter.cpp in Sources */,
93FC67BF12D3CCF200A60610 /* EncoderAdapter.cpp in Sources */,
518D2CAD12D5153B003BB93B /* WebBackForwardListItem.cpp in Sources */,
+ 518D2CCA12D51DFB003BB93B /* SessionState.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 09a57a7..fd660d5 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -495,6 +495,14 @@
>
</File>
<File
+ RelativePath="..\Shared\SessionState.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Shared\SessionState.h"
+ >
+ </File>
+ <File
RelativePath="..\Shared\StringPairVector.h"
>
</File>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list