[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jberlin at webkit.org jberlin at webkit.org
Wed Dec 22 14:26:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fcc983e959070582b69b7afbf0d9ac2016099546
Author: jberlin at webkit.org <jberlin at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 8 19:39:48 2010 +0000

    Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
    representation of a WebKit2 WebSerializedScriptValue.
    https://bugs.webkit.org/show_bug.cgi?id=47390
    
    Reviewed by Sam Weinig.
    
    WebKit:
    
    * WebKit.xcodeproj/project.pbxproj:
    Add WebSerializedJSValuePrivate.h.
    
    WebKit/mac:
    
    * WebView/WebSerializedJSValue.mm:
    (-[WebSerializedJSValue initWithInternalRepresentation:]):
    Set the WebSerializedJSValuePrivate's WebCore::SerializedScriptValue to be the passed in
    internal representation.
    * WebView/WebSerializedJSValuePrivate.h: Added.
    
    WebKit/win:
    
    * Interfaces/WebKit.idl:
    Generate IWebSerializedJSValuePrivate.
    
    * Interfaces/IWebSerializedJSValuePrivate.idl: Added.
    Because it is taking a void* parameter, setInternalRepresentation must be declared [local].
    
    * WebKit.vcproj/Interfaces.vcproj:
    Add IWebSerializedJSValue.idl and IWebSerializedJSValuePrivate.idl.
    
    * WebSerializedJSValue.cpp:
    (WebSerializedJSValue::QueryInterface):
    Since there are now two interfaces that inherit from IUnknown, do not try to cast to
    IUnknown* anymore. Cast to IWebSerializedJSValue* instead.
    (WebSerializedJSValue::setInternalRepresentation):
    Only set the internal representation if it hasn't already been set.
    * WebSerializedJSValue.h:
    
    WebKit2:
    
    * Shared/API/c/WKSerializedScriptValue.cpp:
    (WKSerializedScriptValueGetInternalRepresentation):
    * Shared/API/c/WKSerializedScriptValuePrivate.h: Added.
    
    * Shared/WebSerializedScriptValue.h:
    (WebKit::WebSerializedScriptValue::internalRepresentation):
    Return the WebCore::SerializedScriptValue as a void* so that it can be passed through the
    API.
    
    * WebKit2.xcodeproj/project.pbxproj:
    Add WKSerializedScriptValuePrivate.h.
    * win/WebKit2.vcproj:
    Ditto, also some sorting.
    
    * win/WebKit2Generated.make:
    Copy over WKSerializedScriptValuePrivate.h.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 01ccbd6..01e8574 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-07  Jessie Berlin  <jberlin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+        representation of a WebKit2 WebSerializedScriptValue.
+        https://bugs.webkit.org/show_bug.cgi?id=47390
+
+        * WebKit.xcodeproj/project.pbxproj:
+        Add WebSerializedJSValuePrivate.h.
+
 2010-10-05  John Abd-El-Malek  <jam at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index a2a6091..420695f 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -378,6 +378,7 @@
 		ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = ED7F6D8A0980683500C235ED /* WebNSDataExtrasPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		EDE983800BCDF5FE00FDAE28 /* WebNSArrayExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE9837E0BCDF5FE00FDAE28 /* WebNSArrayExtras.h */; };
 		EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = EDE9837F0BCDF5FE00FDAE28 /* WebNSArrayExtras.m */; };
+		F67DD7E6125E4527007BDCB8 /* WebSerializedJSValuePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F67DD7E5125E4527007BDCB8 /* WebSerializedJSValuePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F834AAD70E64B1C700E2737C /* WebTextIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = F834AAD50E64B1C700E2737C /* WebTextIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F834AAD80E64B1C700E2737C /* WebTextIterator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F834AAD60E64B1C700E2737C /* WebTextIterator.mm */; };
 /* End PBXBuildFile section */
@@ -745,6 +746,7 @@
 		F5F732D202FF4D4F01A80180 /* WebKit.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; name = WebKit.exp; path = mac/WebKit.exp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
 		F5F81C3902B67C26018635CA /* WebRenderNode.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderNode.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		F5F81C3A02B67C26018635CA /* WebRenderNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebRenderNode.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+		F67DD7E5125E4527007BDCB8 /* WebSerializedJSValuePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSerializedJSValuePrivate.h; sourceTree = "<group>"; };
 		F738C9E903FAD3DF0321FBE0 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		F738C9EA03FAD3DF0321FBE0 /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		F79B974804019934036909D2 /* CarbonUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = CarbonUtils.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -1225,6 +1227,7 @@
 				C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */,
 				BC26C69D10B743F400B687ED /* WebSerializedJSValue.h */,
 				BC26C6A410B7447A00B687ED /* WebSerializedJSValue.mm */,
+				F67DD7E5125E4527007BDCB8 /* WebSerializedJSValuePrivate.h */,
 				936A2DE90FD2D08400D312DB /* WebTextCompletionController.h */,
 				936A2DE70FD2D08000D312DB /* WebTextCompletionController.mm */,
 				F834AAD50E64B1C700E2737C /* WebTextIterator.h */,
@@ -1600,6 +1603,7 @@
 				C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */,
 				C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */,
 				BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */,
+				F67DD7E6125E4527007BDCB8 /* WebSerializedJSValuePrivate.h in Headers */,
 				939810270824BF01008DF038 /* WebStringTruncator.h in Headers */,
 				93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */,
 				936A2DEA0FD2D08400D312DB /* WebTextCompletionController.h in Headers */,
@@ -1674,6 +1678,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
 			compatibilityVersion = "Xcode 2.4";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index f8aaea9..db9850b 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-07  Jessie Berlin  <jberlin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+        representation of a WebKit2 WebSerializedScriptValue.
+        https://bugs.webkit.org/show_bug.cgi?id=47390
+
+        * WebView/WebSerializedJSValue.mm:
+        (-[WebSerializedJSValue initWithInternalRepresentation:]):
+        Set the WebSerializedJSValuePrivate's WebCore::SerializedScriptValue to be the passed in
+        internal representation.
+        * WebView/WebSerializedJSValuePrivate.h: Added.
+
 2010-10-07  Antonio Gomes  <agomes at rim.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebKit/mac/WebView/WebSerializedJSValue.mm b/WebKit/mac/WebView/WebSerializedJSValue.mm
index 05a316b..11c795e 100644
--- a/WebKit/mac/WebView/WebSerializedJSValue.mm
+++ b/WebKit/mac/WebView/WebSerializedJSValue.mm
@@ -22,7 +22,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "WebSerializedJSValue.h"
+#import "WebSerializedJSValuePrivate.h"
 
 #import <WebCore/SerializedScriptValue.h>
 #import <wtf/RefPtr.h>
@@ -65,6 +65,30 @@ using namespace WebCore;
     return self;
 }
 
+- (id)initWithInternalRepresentation:(void *)internalRepresenatation
+{
+    ASSERT_ARG(internalRepresenatation, internalRepresenatation);
+
+    if (!internalRepresenatation) {
+        [self release];
+        return nil;
+    }
+
+    self = [super init];
+    if (!self)
+        return nil;
+    
+    _private = [[WebSerializedJSValuePrivate alloc] init];
+
+    _private->value = ((SerializedScriptValue*)internalRepresenatation);
+    if (!_private->value) {
+        [self release];
+        return nil;
+    }
+    
+    return self;
+}
+
 - (JSValueRef)deserialize:(JSContextRef)destinationContext
 {
     if (!_private || !_private->value)
diff --git a/WebKit/mac/WebView/WebSerializedJSValuePrivate.h b/WebKit/mac/WebView/WebSerializedJSValuePrivate.h
new file mode 100644
index 0000000..8f0a189
--- /dev/null
+++ b/WebKit/mac/WebView/WebSerializedJSValuePrivate.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2005 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. 
+ * 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 <WebKit/WebSerializedJSValue.h>
+
+ at interface WebSerializedJSValue(WebPrivate)
+- (id)initWithInternalRepresentation:(void*)internalRepresenatation;
+ at end
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index e80714a..15a1217 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,28 @@
+2010-10-07  Jessie Berlin  <jberlin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+        representation of a WebKit2 WebSerializedScriptValue.
+        https://bugs.webkit.org/show_bug.cgi?id=47390
+
+        * Interfaces/WebKit.idl:
+        Generate IWebSerializedJSValuePrivate.
+        
+        * Interfaces/IWebSerializedJSValuePrivate.idl: Added.
+        Because it is taking a void* parameter, setInternalRepresentation must be declared [local].
+
+        * WebKit.vcproj/Interfaces.vcproj:
+        Add IWebSerializedJSValue.idl and IWebSerializedJSValuePrivate.idl.
+
+        * WebSerializedJSValue.cpp:
+        (WebSerializedJSValue::QueryInterface):
+        Since there are now two interfaces that inherit from IUnknown, do not try to cast to
+        IUnknown* anymore. Cast to IWebSerializedJSValue* instead.
+        (WebSerializedJSValue::setInternalRepresentation):
+        Only set the internal representation if it hasn't already been set.
+        * WebSerializedJSValue.h:
+
 2010-10-04  Jon Honeycutt  <jhoneycutt at apple.com>
 
         Prevent an assertion failure when trying to create a protection space
diff --git a/WebKit/win/Interfaces/IWebSerializedJSValuePrivate.idl b/WebKit/win/Interfaces/IWebSerializedJSValuePrivate.idl
new file mode 100644
index 0000000..74771d9
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebSerializedJSValuePrivate.idl
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 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 DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+[
+    object,
+    oleautomation,
+    hidden,
+    uuid(F695AF5F-35FE-44fb-9EC6-23ABCAC8C515),
+    pointer_default(unique)
+]
+interface IWebSerializedJSValuePrivate : IUnknown
+{
+    [local] HRESULT setInternalRepresentation([in] void* internalRepresentation);
+}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index 8938501..efe2271 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -123,6 +123,7 @@ import "ocidl.idl";
 #include "IWebScrollBarPrivate.idl"
 #include "IWebSecurityOrigin.idl"
 #include "IWebSerializedJSValue.idl"
+#include "IWebSerializedJSValuePrivate.idl"
 #include "IWebTextRenderer.idl"
 #include "IWebUIDelegate.idl"
 #include "IWebUIDelegate2.idl"
diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
index 0dab8a8..0971602 100644
--- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj
+++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
@@ -1484,6 +1484,46 @@
 			</FileConfiguration>
 		</File>
 		<File
+			RelativePath="..\Interfaces\IWebSerializedJSValue.idl"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				ExcludedFromBuild="true"
+				>
+				<Tool
+					Name="VCMIDLTool"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				ExcludedFromBuild="true"
+				>
+				<Tool
+					Name="VCMIDLTool"
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\Interfaces\IWebSerializedJSValuePrivate.idl"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				ExcludedFromBuild="true"
+				>
+				<Tool
+					Name="VCMIDLTool"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				ExcludedFromBuild="true"
+				>
+				<Tool
+					Name="VCMIDLTool"
+				/>
+			</FileConfiguration>
+		</File>
+		<File
 			RelativePath="..\Interfaces\IWebTextRenderer.idl"
 			>
 			<FileConfiguration
diff --git a/WebKit/win/WebSerializedJSValue.cpp b/WebKit/win/WebSerializedJSValue.cpp
index 307df90..de822d5 100644
--- a/WebKit/win/WebSerializedJSValue.cpp
+++ b/WebKit/win/WebSerializedJSValue.cpp
@@ -69,10 +69,12 @@ HRESULT WebSerializedJSValue::QueryInterface(REFIID riid, void** ppvObject)
 
     if (IsEqualIID(riid, __uuidof(WebSerializedJSValue)))
         *ppvObject = this;
+    else if (IsEqualGUID(riid, IID_IUnknown))
+        *ppvObject = static_cast<IWebSerializedJSValue*>(this);
     else if (IsEqualIID(riid, __uuidof(IWebSerializedJSValue)))
         *ppvObject = static_cast<IWebSerializedJSValue*>(this);
-    else if (IsEqualIID(riid, IID_IUnknown))
-        *ppvObject = static_cast<IUnknown*>(this);
+    else if (IsEqualIID(riid, __uuidof(IWebSerializedJSValuePrivate)))
+        *ppvObject = static_cast<IWebSerializedJSValuePrivate*>(this);
     else
         return E_NOINTERFACE;
 
@@ -105,3 +107,13 @@ HRESULT WebSerializedJSValue::deserialize(JSContextRef destinationContext, JSVal
 
     return S_OK;
 }
+
+HRESULT WebSerializedJSValue::setInternalRepresentation(void* internalRepresentation)
+{
+    if (!internalRepresentation || m_value)
+        return E_POINTER;
+
+    m_value = reinterpret_cast<SerializedScriptValue*>(internalRepresentation);
+
+    return S_OK;
+}
diff --git a/WebKit/win/WebSerializedJSValue.h b/WebKit/win/WebSerializedJSValue.h
index d39323c..826fd22 100644
--- a/WebKit/win/WebSerializedJSValue.h
+++ b/WebKit/win/WebSerializedJSValue.h
@@ -34,7 +34,7 @@ namespace WebCore {
     class SerializedScriptValue;
 }
 
-class WebSerializedJSValue : public Noncopyable, public IWebSerializedJSValue {
+class WebSerializedJSValue : public Noncopyable, public IWebSerializedJSValue, public IWebSerializedJSValuePrivate {
 public:
     static COMPtr<WebSerializedJSValue> createInstance();
 
@@ -43,6 +43,7 @@ public:
 
     virtual HRESULT STDMETHODCALLTYPE serialize(JSContextRef, JSValueRef value, JSValueRef* exception);
     virtual HRESULT STDMETHODCALLTYPE deserialize(JSContextRef, JSValueRef* result);
+    virtual HRESULT STDMETHODCALLTYPE setInternalRepresentation(void* internalRepresentation);
 
 private:
     WebSerializedJSValue();
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index c400217..73ad2e7 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,28 @@
+2010-10-07  Jessie Berlin  <jberlin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+        representation of a WebKit2 WebSerializedScriptValue.
+        https://bugs.webkit.org/show_bug.cgi?id=47390
+
+        * Shared/API/c/WKSerializedScriptValue.cpp:
+        (WKSerializedScriptValueGetInternalRepresentation):
+        * Shared/API/c/WKSerializedScriptValuePrivate.h: Added.
+
+        * Shared/WebSerializedScriptValue.h:
+        (WebKit::WebSerializedScriptValue::internalRepresentation):
+        Return the WebCore::SerializedScriptValue as a void* so that it can be passed through the
+        API.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add WKSerializedScriptValuePrivate.h.
+        * win/WebKit2.vcproj:
+        Ditto, also some sorting.
+
+        * win/WebKit2Generated.make:
+        Copy over WKSerializedScriptValuePrivate.h.
+
 2010-10-08  Jocelyn Turcotte  <jocelyn.turcotte at nokia.com>
 
         Reviewed by Andreas Kling.
diff --git a/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp b/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
index e3940a8..276f236 100644
--- a/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
+++ b/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
@@ -24,6 +24,7 @@
  */
 
 #include "WKSerializedScriptValue.h"
+#include "WKSerializedScriptValuePrivate.h"
 
 #include "WKAPICast.h"
 #include "WebSerializedScriptValue.h"
@@ -45,3 +46,8 @@ JSValueRef WKSerializedScriptValueDeserialize(WKSerializedScriptValueRef scriptV
 {
     return toImpl(scriptValueRef)->deserialize(contextRef, exception);
 }
+
+void* WKSerializedScriptValueGetInternalRepresentation(WKSerializedScriptValueRef scriptValueRef)
+{
+    return toImpl(scriptValueRef)->internalRepresentation();
+}
diff --git a/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h b/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h
new file mode 100644
index 0000000..6f0a472
--- /dev/null
+++ b/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 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 WKSerializedScriptValuePrivate_h
+#define WKSerializedScriptValuePrivate_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT void* WKSerializedScriptValueGetInternalRepresentation(WKSerializedScriptValueRef scriptValueRef);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKSerializedScriptValuePrivate_h */
diff --git a/WebKit2/Shared/WebSerializedScriptValue.h b/WebKit2/Shared/WebSerializedScriptValue.h
index 55513ad..8252aaf 100644
--- a/WebKit2/Shared/WebSerializedScriptValue.h
+++ b/WebKit2/Shared/WebSerializedScriptValue.h
@@ -62,6 +62,8 @@ public:
     
     const Vector<uint8_t>& data() { return m_serializedScriptValue->data(); }
 
+    void* internalRepresentation() { return m_serializedScriptValue.get(); }
+
 private:
     explicit WebSerializedScriptValue(PassRefPtr<WebCore::SerializedScriptValue> serializedScriptValue)
         : m_serializedScriptValue(serializedScriptValue)
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index c2125c1..2f7c579 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -432,6 +432,7 @@
 		D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B9484511FF4B6500032B39 /* WebSearchPopupMenu.h */; };
 		E1EE53E311F8CFC000CCBEE4 /* InjectedBundlePageEditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */; };
 		E1EE53E711F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */; };
+		F67DD7BA125E40D9007BDCB8 /* WKSerializedScriptValuePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F67DD7B9125E40D9007BDCB8 /* WKSerializedScriptValuePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -904,6 +905,7 @@
 		D3B9484511FF4B6500032B39 /* WebSearchPopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSearchPopupMenu.h; sourceTree = "<group>"; };
 		E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageEditorClient.h; sourceTree = "<group>"; };
 		E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageEditorClient.cpp; sourceTree = "<group>"; };
+		F67DD7B9125E40D9007BDCB8 /* WKSerializedScriptValuePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSerializedScriptValuePrivate.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -1691,6 +1693,7 @@
 				BC4075E6124FF0270068F20A /* WKNumber.h */,
 				BC4075E7124FF0270068F20A /* WKSerializedScriptValue.cpp */,
 				BC4075E8124FF0270068F20A /* WKSerializedScriptValue.h */,
+				F67DD7B9125E40D9007BDCB8 /* WKSerializedScriptValuePrivate.h */,
 				BCDDB32A124EC2AB0048D13C /* WKSharedAPICast.h */,
 				BC4075E9124FF0270068F20A /* WKString.cpp */,
 				BC4075EA124FF0270068F20A /* WKString.h */,
@@ -1857,6 +1860,7 @@
 				BCD597D0112B56AC00EC8C23 /* WKPreferences.h in Headers */,
 				762B748D120BC75C00819339 /* WKPreferencesPrivate.h in Headers */,
 				BC8A501511765F5600757573 /* WKRetainPtr.h in Headers */,
+				F67DD7BA125E40D9007BDCB8 /* WKSerializedScriptValuePrivate.h in Headers */,
 				BC8699B5116AADAA002A925B /* WKView.h in Headers */,
 				BC8699B7116AADAA002A925B /* WKViewInternal.h in Headers */,
 				BC2E6E8C1141971500A63B1E /* WorkItem.h in Headers */,
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index a4dc66d..dcf0238 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -452,13 +452,13 @@
 				RelativePath="..\Shared\NotImplemented.h"
 				>
 			</File>
-  			<File
+			<File
 				RelativePath="..\Shared\StringPairVector.h"
- 				>
- 			</File>
- 			<File
- 				RelativePath="..\Shared\UserMessageCoders.h"
- 				>
+				>
+			</File>
+			<File
+				RelativePath="..\Shared\UserMessageCoders.h"
+				>
 			</File>
 			<File
 				RelativePath="..\Shared\VisitedLinkTable.cpp"
@@ -505,19 +505,19 @@
 				>
 			</File>
 			<File
-				RelativePath="..\Shared\WebProcessCreationParameters.cpp"
+				RelativePath="..\Shared\WebPreferencesStore.cpp"
 				>
 			</File>
 			<File
-				RelativePath="..\Shared\WebProcessCreationParameters.h"
+				RelativePath="..\Shared\WebPreferencesStore.h"
 				>
 			</File>
 			<File
-				RelativePath="..\Shared\WebPreferencesStore.cpp"
+				RelativePath="..\Shared\WebProcessCreationParameters.cpp"
 				>
 			</File>
 			<File
-				RelativePath="..\Shared\WebPreferencesStore.h"
+				RelativePath="..\Shared\WebProcessCreationParameters.h"
 				>
 			</File>
 			<File
@@ -640,6 +640,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\Shared\API\c\WKSerializedScriptValuePrivate.h"
+					>
+				</File>
+				<File
 					RelativePath="..\Shared\API\c\WKSharedAPICast.h"
 					>
 				</File>
@@ -1524,7 +1528,7 @@
 				RelativePath="..\UIProcess\WebPageProxy.h"
 				>
 			</File>
-  			<File
+			<File
 				RelativePath="..\UIProcess\WebPageProxy.messages.in"
 				>
 			</File>
@@ -1900,15 +1904,15 @@
 					>
 				</File>
 				<File
-					RelativePath="..\Platform\CoreIPC\DataReference.cpp"
+					RelativePath="..\Platform\CoreIPC\CoreIPCMessageKinds.h"
 					>
 				</File>
 				<File
-					RelativePath="..\Platform\CoreIPC\DataReference.h"
+					RelativePath="..\Platform\CoreIPC\DataReference.cpp"
 					>
 				</File>
 				<File
-					RelativePath="..\Platform\CoreIPC\CoreIPCMessageKinds.h"
+					RelativePath="..\Platform\CoreIPC\DataReference.h"
 					>
 				</File>
 				<File
@@ -2051,15 +2055,15 @@
 			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageMessages.h"
 				>
- 			</File>
-            <File
- 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessageReceiver.cpp"
- 				>
- 			</File>
- 			<File
- 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessages.h"
- 				>
- 			</File>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessageReceiver.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessages.h"
+				>
+			</File>
 			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebProcessMessageReceiver.cpp"
 				>
diff --git a/WebKit2/win/WebKit2Generated.make b/WebKit2/win/WebKit2Generated.make
index 1f434d1..eb4d71e 100644
--- a/WebKit2/win/WebKit2Generated.make
+++ b/WebKit2/win/WebKit2Generated.make
@@ -18,6 +18,7 @@ all:
     xcopy /y /d "..\Shared\API\c\WKMutableDictionary.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKNumber.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKSerializedScriptValue.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
+    xcopy /y /d "..\Shared\API\c\WKSerializedScriptValuePrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKString.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKStringPrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKType.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list