Remove bindings generation support for legacy WebCore::Dictionary
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2016 05:17:28 +0000 (05:17 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2016 05:17:28 +0000 (05:17 +0000)
commitcb82d0e1e60e8b5d65a3a9227e6dee96e9cfaf39
tree91c91ef54dc58bc8cc4e817e114197b1083eeeca
parent7cd3dcdc8f110dc6769bf49dc10233452b537347
Remove bindings generation support for legacy WebCore::Dictionary
https://bugs.webkit.org/show_bug.cgi?id=165762

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/datachannel-emptystring-expected.txt:
* web-platform-tests/webrtc/no-media-call-expected.txt:
* web-platform-tests/webrtc/promises-call-expected.txt:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:
Updated to expect error messages with "dictionary" with a lowercase D.

Source/WebCore:

After this patch, all use of legacy WebCore::Dictionary is within custom bindings or
inside the DOM code itself. Bindings generation machinery no longer has a special
type named "Dictionary" but has increasingly good support for IDL-defined dictionaries.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create): Take ExecState and a JSValue rather than a Dictionary.
(WebCore::ApplePaySession::completeMerchantValidation): Ditto.
* Modules/applepay/ApplePaySession.h: Updated for the above changes.
* Modules/applepay/ApplePaySession.idl: For this last file using Dictionary in IDL, move
to "[CallWith=ScriptState]" and "any" as a stopgap. Later we can return and use IDL
dictionaries or other more modern solutions.

* Modules/mediastream/MediaDevices.idl: For the custom binding written in JavaScript,
use the type mentioned in the specification rather than Dictionary. The bindings generator
ignores the type, so this is more like changing a comment rather than changing source code.

* Modules/mediastream/RTCPeerConnection.js:
(initializeRTCPeerConnection): Refer to a non-object as not a valid "dictionary", lowercase
rather than "Dictionary".
* Modules/mediastream/RTCPeerConnectionInternals.js:
(callbacksAndDictionaryOverload): Ditto.

* bindings/generic/IDLTypes.h: Removed IDLLegacyDictionary.

* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::getHashAlgorithm): Fixed a comment.

* bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLLegacyDictionary<T>>::convert): Deleted.

* bindings/scripts/CodeGenerator.pm:
(IsBuiltinType): Removed special case for "Dictionary".
* bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType): Ditto.
(AreTypesDistinguishableForOverloadResolution): Ditto.
(GenerateOverloadedFunctionOrConstructor): Ditto.
(GenerateParametersCheck): Ditto.
(GetBaseIDLType): Ditto.

* bindings/scripts/test/JS/JSTestObj.cpp: Regenerated results.
* bindings/scripts/test/TestObj.idl: Removed test case for Dictionary.

LayoutTests:

* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt:
* fast/mediastream/RTCPeerConnection-overloaded-operations-params.html:
Updated to expect error messages with "dictionary" with a lowercase D.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/datachannel-emptystring-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/promises-call-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/applepay/ApplePaySession.cpp
Source/WebCore/Modules/applepay/ApplePaySession.h
Source/WebCore/Modules/applepay/ApplePaySession.idl
Source/WebCore/Modules/mediastream/MediaDevices.idl
Source/WebCore/Modules/mediastream/RTCPeerConnection.js
Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js
Source/WebCore/bindings/generic/IDLTypes.h
Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp
Source/WebCore/bindings/js/JSDOMConvert.h
Source/WebCore/bindings/scripts/CodeGenerator.pm
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/TestObj.idl