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)
commit976805e0ffca8746455483e5bbd6be62f7b6dbb8
treec408417c815a7bdb3f6e37c47275ff466ee065ce
parent42f7cab4c8cca1ee5495964afee2343a27c7cf9d
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: 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