Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Oct 2010 19:39:48 +0000 (19:39 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Oct 2010 19:39:48 +0000 (19:39 +0000)
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: https://svn.webkit.org/repository/webkit/trunk@69415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebSerializedJSValue.mm
WebKit/mac/WebView/WebSerializedJSValuePrivate.h [new file with mode: 0644]
WebKit/win/ChangeLog
WebKit/win/Interfaces/IWebSerializedJSValuePrivate.idl [new file with mode: 0644]
WebKit/win/Interfaces/WebKit.idl
WebKit/win/WebKit.vcproj/Interfaces.vcproj
WebKit/win/WebSerializedJSValue.cpp
WebKit/win/WebSerializedJSValue.h
WebKit2/ChangeLog
WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h [new file with mode: 0644]
WebKit2/Shared/WebSerializedScriptValue.h
WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKit2/win/WebKit2.vcproj
WebKit2/win/WebKit2Generated.make

index 01ccbd6..01e8574 100644 (file)
@@ -1,3 +1,14 @@
+2010-10-07  Jessie Berlin  <jberlin@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@chromium.org>
 
         Reviewed by Darin Fisher.
index a2a6091..420695f 100644 (file)
                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 */
                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; };
                                C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */,
                                BC26C69D10B743F400B687ED /* WebSerializedJSValue.h */,
                                BC26C6A410B7447A00B687ED /* WebSerializedJSValue.mm */,
+                               F67DD7E5125E4527007BDCB8 /* WebSerializedJSValuePrivate.h */,
                                936A2DE90FD2D08400D312DB /* WebTextCompletionController.h */,
                                936A2DE70FD2D08000D312DB /* WebTextCompletionController.mm */,
                                F834AAD50E64B1C700E2737C /* WebTextIterator.h */,
                                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 */,
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
                        compatibilityVersion = "Xcode 2.4";
+                       developmentRegion = English;
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
index f8aaea9..db9850b 100644 (file)
@@ -1,3 +1,17 @@
+2010-10-07  Jessie Berlin  <jberlin@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@rim.com>
 
         Reviewed by Simon Fraser.
index 05a316b..11c795e 100644 (file)
@@ -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 (file)
index 0000000..8f0a189
--- /dev/null
@@ -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>
+
+@interface WebSerializedJSValue(WebPrivate)
+- (id)initWithInternalRepresentation:(void*)internalRepresenatation;
+@end
index e80714a..15a1217 100644 (file)
@@ -1,3 +1,28 @@
+2010-10-07  Jessie Berlin  <jberlin@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@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 (file)
index 0000000..74771d9
--- /dev/null
@@ -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);
+}
index 8938501..efe2271 100644 (file)
@@ -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"
index 0dab8a8..0971602 100644 (file)
                        </FileConfiguration>\r
                </File>\r
                <File\r
+                       RelativePath="..\Interfaces\IWebSerializedJSValue.idl"\r
+                       >\r
+                       <FileConfiguration\r
+                               Name="Debug|Win32"\r
+                               ExcludedFromBuild="true"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCMIDLTool"\r
+                               />\r
+                       </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Release|Win32"\r
+                               ExcludedFromBuild="true"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCMIDLTool"\r
+                               />\r
+                       </FileConfiguration>\r
+               </File>\r
+               <File\r
+                       RelativePath="..\Interfaces\IWebSerializedJSValuePrivate.idl"\r
+                       >\r
+                       <FileConfiguration\r
+                               Name="Debug|Win32"\r
+                               ExcludedFromBuild="true"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCMIDLTool"\r
+                               />\r
+                       </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Release|Win32"\r
+                               ExcludedFromBuild="true"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCMIDLTool"\r
+                               />\r
+                       </FileConfiguration>\r
+               </File>\r
+               <File\r
                        RelativePath="..\Interfaces\IWebTextRenderer.idl"\r
                        >\r
                        <FileConfiguration\r
index 307df90..de822d5 100644 (file)
@@ -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;
+}
index d39323c..826fd22 100644 (file)
@@ -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();
index c400217..73ad2e7 100644 (file)
@@ -1,3 +1,28 @@
+2010-10-07  Jessie Berlin  <jberlin@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@nokia.com>
 
         Reviewed by Andreas Kling.
index e3940a8..276f236 100644 (file)
@@ -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 (file)
index 0000000..6f0a472
--- /dev/null
@@ -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 */
index 55513ad..8252aaf 100644 (file)
@@ -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)
index c2125c1..2f7c579 100644 (file)
                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 */
                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 */
                                BC4075E6124FF0270068F20A /* WKNumber.h */,
                                BC4075E7124FF0270068F20A /* WKSerializedScriptValue.cpp */,
                                BC4075E8124FF0270068F20A /* WKSerializedScriptValue.h */,
+                               F67DD7B9125E40D9007BDCB8 /* WKSerializedScriptValuePrivate.h */,
                                BCDDB32A124EC2AB0048D13C /* WKSharedAPICast.h */,
                                BC4075E9124FF0270068F20A /* WKString.cpp */,
                                BC4075EA124FF0270068F20A /* WKString.h */,
                                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 */,
index a4dc66d..dcf0238 100755 (executable)
                                RelativePath="..\Shared\NotImplemented.h"\r
                                >\r
                        </File>\r
-                       <File\r
+                       <File\r
                                RelativePath="..\Shared\StringPairVector.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Shared\UserMessageCoders.h"\r
-                               >\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\Shared\UserMessageCoders.h"\r
+                               >\r
                        </File>\r
                        <File\r
                                RelativePath="..\Shared\VisitedLinkTable.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Shared\WebProcessCreationParameters.cpp"\r
+                               RelativePath="..\Shared\WebPreferencesStore.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Shared\WebProcessCreationParameters.h"\r
+                               RelativePath="..\Shared\WebPreferencesStore.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Shared\WebPreferencesStore.cpp"\r
+                               RelativePath="..\Shared\WebProcessCreationParameters.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Shared\WebPreferencesStore.h"\r
+                               RelativePath="..\Shared\WebProcessCreationParameters.h"\r
                                >\r
                        </File>\r
                        <File\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath="..\Shared\API\c\WKSerializedScriptValuePrivate.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath="..\Shared\API\c\WKSharedAPICast.h"\r
                                        >\r
                                </File>\r
                                RelativePath="..\UIProcess\WebPageProxy.h"\r
                                >\r
                        </File>\r
-                       <File\r
+                       <File\r
                                RelativePath="..\UIProcess\WebPageProxy.messages.in"\r
                                >\r
                        </File>\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\Platform\CoreIPC\DataReference.cpp"\r
+                                       RelativePath="..\Platform\CoreIPC\CoreIPCMessageKinds.h"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\Platform\CoreIPC\DataReference.h"\r
+                                       RelativePath="..\Platform\CoreIPC\DataReference.cpp"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\Platform\CoreIPC\CoreIPCMessageKinds.h"\r
+                                       RelativePath="..\Platform\CoreIPC\DataReference.h"\r
                                        >\r
                                </File>\r
                                <File\r
                        <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageMessages.h"\r
                                >\r
-                       </File>\r
-            <File\r
-                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessageReceiver.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessages.h"\r
-                               >\r
-                       </File>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessageReceiver.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebPageProxyMessages.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\WebProcessMessageReceiver.cpp"\r
                                >\r
index 1f434d1..eb4d71e 100644 (file)
@@ -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"