Diff
Modified: trunk/LayoutTests/ChangeLog (209751 => 209752)
--- trunk/LayoutTests/ChangeLog 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/ChangeLog 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,3 +1,15 @@
+2016-12-12 Darin Adler <[email protected]>
+
+ Remove bindings generation support for legacy WebCore::Dictionary
+ https://bugs.webkit.org/show_bug.cgi?id=165762
+
+ Reviewed by Sam Weinig.
+
+ * 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.
+
2016-12-12 Chris Dumez <[email protected]>
Add Document.onvisibilitychange event handler attribute
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt (209751 => 209752)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt 2016-12-13 05:17:28 UTC (rev 209752)
@@ -3,10 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS new RTCPeerConnection(null); threw exception TypeError: RTCPeerConnection argument must be a valid Dictionary.
-PASS new RTCPeerConnection(undefined); threw exception TypeError: RTCPeerConnection argument must be a valid Dictionary.
+PASS new RTCPeerConnection(null); threw exception TypeError: RTCPeerConnection argument must be a valid dictionary.
+PASS new RTCPeerConnection(undefined); threw exception TypeError: RTCPeerConnection argument must be a valid dictionary.
PASS new RTCPeerConnection(); threw exception TypeError: Not enough arguments.
-PASS new RTCPeerConnection(''); threw exception TypeError: RTCPeerConnection argument must be a valid Dictionary.
+PASS new RTCPeerConnection(''); threw exception TypeError: RTCPeerConnection argument must be a valid dictionary.
PASS new RTCPeerConnection({}); did not throw exception.
PASS new RTCPeerConnection({iceServers:[]}); did not throw exception.
PASS new RTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}); threw exception TypeError: Error creating RTCPeerConnection.
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt (209751 => 209752)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt 2016-12-13 05:17:28 UTC (rev 209752)
@@ -22,8 +22,8 @@
*** Bad input
PASS promise pc.createOffer({}, emptyFunc) rejected with TypeError: Argument 1 ('successCallback') to RTCPeerConnection.createOffer must be a function
PASS promise pc.createOffer(emptyFunc, {}) rejected with TypeError: Argument 2 ('errorCallback') to RTCPeerConnection.createOffer must be a function
-PASS promise pc.createOffer(1) rejected with TypeError: Argument 1 ('options') to RTCPeerConnection.createOffer must be a Dictionary
-PASS promise pc.createOffer(emptyFunc, emptyFunc, 1) rejected with TypeError: Argument 3 ('options') to RTCPeerConnection.createOffer must be a Dictionary
+PASS promise pc.createOffer(1) rejected with TypeError: Argument 1 ('options') to RTCPeerConnection.createOffer must be a dictionary
+PASS promise pc.createOffer(emptyFunc, emptyFunc, 1) rejected with TypeError: Argument 3 ('options') to RTCPeerConnection.createOffer must be a dictionary
*** Test createAnswer
PASS promise pc.createAnswer() did not reject with TypeError.
@@ -43,8 +43,8 @@
*** Bad input
PASS promise pc.createAnswer({}, emptyFunc) rejected with TypeError: Argument 1 ('successCallback') to RTCPeerConnection.createAnswer must be a function
PASS promise pc.createAnswer(emptyFunc, {}) rejected with TypeError: Argument 2 ('errorCallback') to RTCPeerConnection.createAnswer must be a function
-PASS promise pc.createAnswer(1) rejected with TypeError: Argument 1 ('options') to RTCPeerConnection.createAnswer must be a Dictionary
-PASS promise pc.createAnswer(emptyFunc, emptyFunc, 1) rejected with TypeError: Argument 3 ('options') to RTCPeerConnection.createAnswer must be a Dictionary
+PASS promise pc.createAnswer(1) rejected with TypeError: Argument 1 ('options') to RTCPeerConnection.createAnswer must be a dictionary
+PASS promise pc.createAnswer(emptyFunc, emptyFunc, 1) rejected with TypeError: Argument 3 ('options') to RTCPeerConnection.createAnswer must be a dictionary
*** Test setLocalDescription
PASS promise pc.setLocalDescription(desc) did not reject with TypeError.
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params.html (209751 => 209752)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params.html 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params.html 2016-12-13 05:17:28 UTC (rev 209752)
@@ -71,11 +71,11 @@
return promiseShouldReject(`pc.${functionName}(emptyFunc, {})`, "reason");
})
.then(function () {
- reason = `TypeError: Argument 1 ('options') to RTCPeerConnection.${functionName} must be a Dictionary`;
+ reason = `TypeError: Argument 1 ('options') to RTCPeerConnection.${functionName} must be a dictionary`;
return promiseShouldReject(`pc.${functionName}(1)`, "reason");
})
.then(function () {
- reason = `TypeError: Argument 3 ('options') to RTCPeerConnection.${functionName} must be a Dictionary`;
+ reason = `TypeError: Argument 3 ('options') to RTCPeerConnection.${functionName} must be a dictionary`;
return promiseShouldReject(`pc.${functionName}(emptyFunc, emptyFunc, 1)`, "reason");
})
.then(function () {
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (209751 => 209752)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,3 +1,17 @@
+2016-12-12 Darin Adler <[email protected]>
+
+ Remove bindings generation support for legacy WebCore::Dictionary
+ https://bugs.webkit.org/show_bug.cgi?id=165762
+
+ Reviewed by Sam Weinig.
+
+ * 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.
+
2016-12-10 Jiewen Tan <[email protected]>
[WebCrypto] RSA algorithms should allow importing keys without usages
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/datachannel-emptystring-expected.txt (209751 => 209752)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/datachannel-emptystring-expected.txt 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/datachannel-emptystring-expected.txt 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,5 +1,5 @@
-FAIL Can send empty strings across a WebRTC data channel. RTCPeerConnection argument must be a valid Dictionary
+FAIL Can send empty strings across a WebRTC data channel. RTCPeerConnection argument must be a valid dictionary
Messages exchanged
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call-expected.txt (209751 => 209752)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call-expected.txt 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call-expected.txt 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,5 +1,5 @@
-FAIL Can set up a basic WebRTC call with no data. RTCPeerConnection argument must be a valid Dictionary
+FAIL Can set up a basic WebRTC call with no data. RTCPeerConnection argument must be a valid dictionary
iceConnectionState info
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/promises-call-expected.txt (209751 => 209752)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/promises-call-expected.txt 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/promises-call-expected.txt 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,5 +1,5 @@
-FAIL Can set up a basic WebRTC call with only data using promises. RTCPeerConnection argument must be a valid Dictionary
+FAIL Can set up a basic WebRTC call with only data using promises. RTCPeerConnection argument must be a valid dictionary
iceConnectionState info
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt (209751 => 209752)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,8 +1,8 @@
PASS RTCPeerConnection.length
FAIL new RTCPeerConnection() Not enough arguments
-FAIL new RTCPeerConnection(null) RTCPeerConnection argument must be a valid Dictionary
-FAIL new RTCPeerConnection(undefined) RTCPeerConnection argument must be a valid Dictionary
+FAIL new RTCPeerConnection(null) RTCPeerConnection argument must be a valid dictionary
+FAIL new RTCPeerConnection(undefined) RTCPeerConnection argument must be a valid dictionary
PASS new RTCPeerConnection({})
PASS new RTCPeerConnection({ iceServers: null })
PASS new RTCPeerConnection({ iceServers: undefined })
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt (209751 => 209752)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,9 +1,9 @@
-CONSOLE MESSAGE: line 100: TypeError: RTCPeerConnection argument must be a valid Dictionary
+CONSOLE MESSAGE: line 100: TypeError: RTCPeerConnection argument must be a valid dictionary
Description
This test verifies the availability of the RTCPeerConnection interface.
-Harness Error (FAIL), message = TypeError: RTCPeerConnection argument must be a valid Dictionary
+Harness Error (FAIL), message = TypeError: RTCPeerConnection argument must be a valid dictionary
Modified: trunk/Source/WebCore/ChangeLog (209751 => 209752)
--- trunk/Source/WebCore/ChangeLog 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/ChangeLog 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1,3 +1,52 @@
+2016-12-12 Darin Adler <[email protected]>
+
+ Remove bindings generation support for legacy WebCore::Dictionary
+ https://bugs.webkit.org/show_bug.cgi?id=165762
+
+ Reviewed by Sam Weinig.
+
+ 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.
+
2016-12-12 Chris Dumez <[email protected]>
Drop unnecessary null check in removeDetachedChildrenInContainer()
Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp (209751 => 209752)
--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp 2016-12-13 05:17:28 UTC (rev 209752)
@@ -635,7 +635,7 @@
return true;
}
-ExceptionOr<Ref<ApplePaySession>> ApplePaySession::create(Document& document, unsigned version, const Dictionary& dictionary)
+ExceptionOr<Ref<ApplePaySession>> ApplePaySession::create(JSC::ExecState& state, Document& document, unsigned version, JSC::JSValue arguments)
{
DOMWindow& window = *document.domWindow();
@@ -657,7 +657,7 @@
return Exception { INVALID_ACCESS_ERR };
}
- auto paymentRequest = createPaymentRequest(version, window, dictionary);
+ auto paymentRequest = createPaymentRequest(version, window, { &state, arguments });
if (!paymentRequest)
return Exception { TYPE_MISMATCH_ERR };
@@ -818,12 +818,12 @@
return { };
}
-ExceptionOr<void> ApplePaySession::completeMerchantValidation(const Dictionary& merchantSessionDictionary)
+ExceptionOr<void> ApplePaySession::completeMerchantValidation(JSC::ExecState& state, JSC::JSValue merchantSessionValue)
{
if (!canCompleteMerchantValidation())
return Exception { INVALID_ACCESS_ERR };
- if (!merchantSessionDictionary.initializerObject())
+ if (!merchantSessionValue.isObject())
return Exception { TypeError };
auto& document = *downcast<Document>(scriptExecutionContext());
@@ -830,7 +830,7 @@
auto& window = *document.domWindow();
String errorMessage;
- auto merchantSession = PaymentMerchantSession::fromJS(*merchantSessionDictionary.execState(), merchantSessionDictionary.initializerObject(), errorMessage);
+ auto merchantSession = PaymentMerchantSession::fromJS(state, asObject(merchantSessionValue), errorMessage);
if (!merchantSession) {
window.printErrorMessage(errorMessage);
return Exception { INVALID_ACCESS_ERR };
Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.h (209751 => 209752)
--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.h 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.h 2016-12-13 05:17:28 UTC (rev 209752)
@@ -48,7 +48,7 @@
class ApplePaySession final : public RefCounted<ApplePaySession>, public ActiveDOMObject, public EventTargetWithInlineData {
public:
- static ExceptionOr<Ref<ApplePaySession>> create(Document&, unsigned version, const Dictionary&);
+ static ExceptionOr<Ref<ApplePaySession>> create(JSC::ExecState&, Document&, unsigned version, JSC::JSValue);
virtual ~ApplePaySession();
// DOM API.
@@ -68,7 +68,7 @@
ExceptionOr<void> begin();
ExceptionOr<void> abort();
- ExceptionOr<void> completeMerchantValidation(const Dictionary& merchantSessionDictionary);
+ ExceptionOr<void> completeMerchantValidation(JSC::ExecState&, JSC::JSValue merchantSessionDictionary);
ExceptionOr<void> completeShippingMethodSelection(unsigned short status, const Dictionary& newTotal, const ArrayValue& newLineItems);
ExceptionOr<void> completeShippingContactSelection(unsigned short status, const ArrayValue& newShippingMethods, const Dictionary& newTotal, const ArrayValue& newLineItems);
ExceptionOr<void> completePaymentMethodSelection(const Dictionary& newTotal, const ArrayValue& newLineItems);
Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl (209751 => 209752)
--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl 2016-12-13 05:17:28 UTC (rev 209752)
@@ -26,8 +26,8 @@
[
ActiveDOMObject,
Conditional=APPLE_PAY,
- Constructor(unsigned long version, Dictionary paymentRequest),
- ConstructorCallWith=Document,
+ Constructor(unsigned long version, any paymentRequest),
+ ConstructorCallWith=Document&ScriptState,
ConstructorMayThrowException,
EnabledBySetting=ApplePay,
] interface ApplePaySession : EventTarget {
@@ -47,10 +47,10 @@
[MayThrowException] void begin();
[MayThrowException] void abort();
- [MayThrowException] void completeMerchantValidation(Dictionary merchantSession);
- [Custom, MayThrowException] void completeShippingMethodSelection(unsigned short status, Dictionary newTotal, sequence<Dictionary> newLineItems);
- [Custom, MayThrowException] void completeShippingContactSelection(unsigned short status, sequence<Dictionary> newShippingMethods, Dictionary newTotal, sequence<Dictionary> newLineItems);
- [Custom, MayThrowException] void completePaymentMethodSelection(Dictionary newTotal, sequence<Dictionary> newLineItems);
+ [CallWith=ScriptState, MayThrowException] void completeMerchantValidation(any merchantSession);
+ [Custom, MayThrowException] void completeShippingMethodSelection(unsigned short status, any newTotal, any newLineItems);
+ [Custom, MayThrowException] void completeShippingContactSelection(unsigned short status, any newShippingMethods, any newTotal, any newLineItems);
+ [Custom, MayThrowException] void completePaymentMethodSelection(any newTotal, any newLineItems);
[MayThrowException] void completePayment(unsigned short status);
attribute EventHandler onvalidatemerchant;
Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl (209751 => 209752)
--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl 2016-12-13 05:17:28 UTC (rev 209752)
@@ -34,6 +34,6 @@
] interface MediaDevices {
MediaTrackSupportedConstraints getSupportedConstraints();
- [Custom, MayThrowException, PrivateIdentifier, PublicIdentifier] Promise<MediaStream> getUserMedia(Dictionary options);
+ [Custom, MayThrowException, PrivateIdentifier, PublicIdentifier] Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
Promise<sequence<MediaDeviceInfo>> enumerateDevices();
};
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js (209751 => 209752)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js 2016-12-13 05:17:28 UTC (rev 209752)
@@ -38,7 +38,7 @@
@throwTypeError("Not enough arguments");
if (!@isObject(configuration))
- @throwTypeError("RTCPeerConnection argument must be a valid Dictionary");
+ @throwTypeError("RTCPeerConnection argument must be a valid dictionary");
// FIXME: Handle errors in a better way than catching and re-throwing (http://webkit.org/b/158936)
try {
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js (209751 => 209752)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js 2016-12-13 05:17:28 UTC (rev 209752)
@@ -104,7 +104,7 @@
// Zero or one arguments: Promise mode
const options = args[0];
if (args.length && !@isDictionary(options))
- return @Promise.@reject(new @TypeError(`Argument 1 ('options') to RTCPeerConnection.${functionName} must be a Dictionary`));
+ return @Promise.@reject(new @TypeError(`Argument 1 ('options') to RTCPeerConnection.${functionName} must be a dictionary`));
return promiseMode(options);
}
@@ -121,7 +121,7 @@
return @Promise.@reject(new @TypeError(`Argument 2 ('errorCallback') to RTCPeerConnection.${functionName} must be a function`));
if (args.length > 2 && !@isDictionary(options))
- return @Promise.@reject(new @TypeError(`Argument 3 ('options') to RTCPeerConnection.${functionName} must be a Dictionary`));
+ return @Promise.@reject(new @TypeError(`Argument 3 ('options') to RTCPeerConnection.${functionName} must be a dictionary`));
return legacyMode(successCallback, errorCallback, args[2]);
}
Modified: trunk/Source/WebCore/bindings/generic/IDLTypes.h (209751 => 209752)
--- trunk/Source/WebCore/bindings/generic/IDLTypes.h 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/bindings/generic/IDLTypes.h 2016-12-13 05:17:28 UTC (rev 209752)
@@ -165,7 +165,6 @@
};
template<typename T> struct IDLSerializedScriptValue : IDLWrapper<T> { };
-template<typename T> struct IDLLegacyDictionary : IDLType<T> { };
template<typename T> struct IDLEventListener : IDLWrapper<T> { };
template<typename T> struct IDLXPathNSResolver : IDLWrapper<T> { };
Modified: trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp (209751 => 209752)
--- trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp 2016-12-13 05:17:28 UTC (rev 209752)
@@ -104,7 +104,7 @@
static bool getHashAlgorithm(Dictionary& dictionary, CryptoAlgorithmIdentifier& result, HashRequirement isRequired)
{
- // FXIME: Teach Dictionary how to return JSValues, and use that to get hash element value.
+ // FIXME: Teach Dictionary how to return JSValues, and use that to get hash element value.
ExecState* exec = dictionary.execState();
VM& vm = exec->vm();
Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (209751 => 209752)
--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h 2016-12-13 05:17:28 UTC (rev 209752)
@@ -1462,18 +1462,6 @@
};
// MARK: -
-// MARK: Legacy dictionary type
-
-template<typename T> struct Converter<IDLLegacyDictionary<T>> : DefaultConverter<IDLLegacyDictionary<T>> {
- using ReturnType = T;
-
- static ReturnType convert(JSC::ExecState& state, JSC::JSValue value)
- {
- return T(&state, value);
- }
-};
-
-// MARK: -
// MARK: Event Listener type
template<typename T> struct Converter<IDLEventListener<T>> : DefaultConverter<IDLEventListener<T>> {
Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (209751 => 209752)
--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2016-12-13 05:17:28 UTC (rev 209752)
@@ -868,7 +868,6 @@
return 1 if $type->name eq "Promise";
return 1 if $type->name eq "XPathNSResolver";
return 1 if $type->name eq "EventListener";
- return 1 if $type->name eq "Dictionary";
return 1 if $type->name eq "SerializedScriptValue";
return 0;
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (209751 => 209752)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-12-13 05:17:28 UTC (rev 209752)
@@ -309,7 +309,7 @@
return;
}
- if ($type->name eq "SerializedScriptValue" || $type->name eq "Dictionary") {
+ if ($type->name eq "SerializedScriptValue") {
AddToIncludes($type->name . ".h", $includesRef, $conditional);
return;
}
@@ -2151,7 +2151,7 @@
my $isDictionary = sub {
my $type = shift;
- return $type->name eq "Dictionary" || $codeGenerator->IsDictionaryType($type);
+ return $codeGenerator->IsDictionaryType($type);
};
my $isCallbackFunctionOrDictionary = sub {
my $type = shift;
@@ -2281,7 +2281,7 @@
};
my $isDictionaryOrRecordParameter = sub {
my ($type, $optionality) = @_;
- return $type->name eq "Dictionary" || $codeGenerator->IsDictionaryType($type) || $codeGenerator->IsRecordType($type);
+ return $codeGenerator->IsDictionaryType($type) || $codeGenerator->IsRecordType($type);
};
my $isNullableOrDictionaryOrRecordOrUnionContainingOne = sub {
my ($type, $optionality) = @_;
@@ -4328,9 +4328,6 @@
"DOMString" => "\"undefined\"",
"USVString" => "\"undefined\"",
- # Dictionary(state, undefined) will construct an empty Dictionary.
- "Dictionary" => "[]",
-
# JSValue::toBoolean() will convert undefined to false.
"boolean" => "false",
@@ -4418,7 +4415,7 @@
if ($argument->isOptional && !defined($argument->default)) {
# As per Web IDL, optional dictionary arguments are always considered to have a default value of an empty dictionary, unless otherwise specified.
- $argument->default("[]") if $type->name eq "Dictionary" or $codeGenerator->IsDictionaryType($type);
+ $argument->default("[]") if $codeGenerator->IsDictionaryType($type);
# Treat undefined the same as an empty sequence Or frozen array.
$argument->default("[]") if $codeGenerator->IsSequenceOrFrozenArrayType($type);
@@ -5015,7 +5012,6 @@
"DOMString" => "String",
"USVString" => "String",
"Date" => "double",
- "Dictionary" => "Dictionary",
"EventListener" => "RefPtr<EventListener>",
"SerializedScriptValue" => "RefPtr<SerializedScriptValue>",
"XPathNSResolver" => "RefPtr<XPathNSResolver>",
@@ -5114,7 +5110,6 @@
# Non-WebIDL extensions
"Date" => "IDLDate",
"SerializedScriptValue" => "IDLSerializedScriptValue<SerializedScriptValue>",
- "Dictionary" => "IDLLegacyDictionary<Dictionary>",
"EventListener" => "IDLEventListener<JSEventListener>",
"XPathNSResolver" => "IDLXPathNSResolver<XPathNSResolver>",
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (209751 => 209752)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-12-13 05:17:28 UTC (rev 209752)
@@ -21,7 +21,6 @@
#include "config.h"
#include "JSTestObj.h"
-#include "Dictionary.h"
#include "Document.h"
#include "EventNames.h"
#include "Frame.h"
@@ -1087,7 +1086,6 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNullableByteStringArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyString(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithRecord(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithExceptionReturningLong(JSC::ExecState*);
@@ -1725,7 +1723,6 @@
{ "methodWithNullableByteStringArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNullableByteStringArg), (intptr_t) (1) } },
{ "methodWithByteStringArgTreatingNullAsEmptyString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyString), (intptr_t) (1) } },
{ "serializedValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t) (1) } },
- { "optionsObject", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOptionsObject), (intptr_t) (1) } },
{ "methodWithRecord", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithRecord), (intptr_t) (1) } },
{ "methodWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithException), (intptr_t) (0) } },
{ "methodWithExceptionReturningLong", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithExceptionReturningLong), (intptr_t) (0) } },
@@ -5781,28 +5778,6 @@
return JSValue::encode(jsUndefined());
}
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOptionsObjectCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
-
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* state)
-{
- return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionOptionsObjectCaller>(state, "optionsObject");
-}
-
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionOptionsObjectCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope)
-{
- UNUSED_PARAM(state);
- UNUSED_PARAM(throwScope);
- auto& impl = castedThis->wrapped();
- if (UNLIKELY(state->argumentCount() < 1))
- return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
- auto oo = convert<IDLLegacyDictionary<Dictionary>>(*state, state->uncheckedArgument(0));
- RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
- auto ooo = convert<IDLLegacyDictionary<Dictionary>>(*state, state->argument(1));
- RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
- impl.optionsObject(WTFMove(oo), WTFMove(ooo));
- return JSValue::encode(jsUndefined());
-}
-
static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithRecordCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithRecord(ExecState* state)
Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (209751 => 209752)
--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2016-12-13 02:20:58 UTC (rev 209751)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2016-12-13 05:17:28 UTC (rev 209752)
@@ -151,7 +151,6 @@
void methodWithByteStringArgTreatingNullAsEmptyString([TreatNullAs=EmptyString] ByteString str);
void serializedValue(SerializedScriptValue serializedArg);
- void optionsObject(Dictionary oo, optional Dictionary ooo);
void methodWithRecord(record<DOMString, long> recordParameter);