Title: [200192] trunk
Revision
200192
Author
[email protected]
Date
2016-04-28 08:41:46 -0700 (Thu, 28 Apr 2016)

Log Message

[Web IDL] Specify default values for optional parameters of type 'DOMString'
https://bugs.webkit.org/show_bug.cgi?id=157116

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack-expected.txt:

Source/WebCore:

Specify default values for optional parameters of type 'DOMString' so
that this default value is used if the parameter is either omitted or
undefined. For parameters of type DOMString and that are not nullable,
the bindings generator now uses the null string as implicit default
value (unless explicitely specified otherwise in the IDL). This
simplifies the IDL a little and makes it a bit less confusing (it is
a bit weird to see something like "optional DOMString param = null",
considering the parameter is not nullable). I also think it makes
more sense to use the null String() rather than Optional<String> in
this case.

No new tests, existing tests were rebaselined.

* Modules/encryptedmedia/MediaKeys.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::openCursor): Deleted.
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
(CanUseWTFOptionalForParameter): Deleted.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue): Deleted.
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
* bindings/scripts/test/TestNamedConstructor.idl:
* css/FontFaceSet.cpp:
* css/FontFaceSet.h:
* css/FontFaceSet.idl:
* css/WebKitCSSMatrix.idl:
* dom/Comment.idl:
* dom/DOMImplementation.idl:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::clearData):
(WebCore::DataTransfer::getData): Deleted.
* dom/DataTransfer.h:
* dom/Document.idl:
* dom/Text.idl:
* fileapi/FileReader.cpp:
(WebCore::FileReader::readAsDataURL): Deleted.
* fileapi/FileReader.h:
* fileapi/FileReaderSync.h:
* fileapi/FileReaderSync.idl:
* html/HTMLAudioElement.idl:
* html/HTMLInputElement.idl:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::addTextTrack):
Throw a TypeError if the 'kind' parameter is not a valid string in the
TextTrackKind enum:
https://html.spec.whatwg.org/multipage/embedded-content.html#htmlmediaelement

We previously threw a SYNTAX_ERR instead of a TypeError in such case,
which was not correct as per Web IDL specification.

* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setShadow):
* html/canvas/CanvasRenderingContext2D.h:
* page/Performance.idl:

LayoutTests:

* media/track/w3c/interfaces/HTMLMediaElement/addTextTrack.html:
Resync test from upstream so that it expects a TypeError to be thrown if a
wrong 'kind' parameter is passed, and so that it expects the label / language
parameter to have the empty string as default value.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (200191 => 200192)


--- trunk/LayoutTests/ChangeLog	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/LayoutTests/ChangeLog	2016-04-28 15:41:46 UTC (rev 200192)
@@ -1,3 +1,15 @@
+2016-04-28  Chris Dumez  <[email protected]>
+
+        [Web IDL] Specify default values for optional parameters of type 'DOMString'
+        https://bugs.webkit.org/show_bug.cgi?id=157116
+
+        Reviewed by Darin Adler.
+
+        * media/track/w3c/interfaces/HTMLMediaElement/addTextTrack.html:
+        Resync test from upstream so that it expects a TypeError to be thrown if a
+        wrong 'kind' parameter is passed, and so that it expects the label / language
+        parameter to have the empty string as default value.
+
 2016-04-28  Skachkov Oleksandr  <[email protected]>
 
         Crash for non-static super property call in derived class constructor

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (200191 => 200192)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-04-28 15:41:46 UTC (rev 200192)
@@ -1,3 +1,14 @@
+2016-04-28  Chris Dumez  <[email protected]>
+
+        [Web IDL] Specify default values for optional parameters of type 'DOMString'
+        https://bugs.webkit.org/show_bug.cgi?id=157116
+
+        Reviewed by Darin Adler.
+
+        Rebaseline now that more checks are passing.
+
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack-expected.txt:
+
 2016-04-26  Ryosuke Niwa  <[email protected]>
 
         Update tests in web-platform-tests/html/semantics/scripting-1/

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack-expected.txt (200191 => 200192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack-expected.txt	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack-expected.txt	2016-04-28 15:41:46 UTC (rev 200192)
@@ -1,16 +1,12 @@
 
-FAIL HTMLMediaElement.addTextTrack bogus first arg assert_throws: function "function (){
-        video.addTextTrack('foo');
-    }" threw object "Error: SyntaxError: DOM Exception 12" ("SyntaxError") expected object "TypeError" ("TypeError")
-FAIL HTMLMediaElement.addTextTrack uppercase first arg assert_throws: function "function (){
-        video.addTextTrack('SUBTITLES');
-    }" threw object "Error: SyntaxError: DOM Exception 12" ("SyntaxError") expected object "TypeError" ("TypeError")
+PASS HTMLMediaElement.addTextTrack bogus first arg 
+PASS HTMLMediaElement.addTextTrack uppercase first arg 
 PASS HTMLMediaElement.addTextTrack subtitles first arg 
 PASS HTMLMediaElement.addTextTrack captions first arg 
 PASS HTMLMediaElement.addTextTrack descriptions first arg 
 PASS HTMLMediaElement.addTextTrack chapters first arg 
 PASS HTMLMediaElement.addTextTrack metadata first arg 
-FAIL HTMLMediaElement.addTextTrack undefined second and third arg assert_equals: expected "" but got "undefined"
+PASS HTMLMediaElement.addTextTrack undefined second and third arg 
 PASS HTMLMediaElement.addTextTrack null second and third arg 
 PASS HTMLMediaElement.addTextTrack foo and bar second and third arg 
 PASS HTMLMediaElement.addTextTrack foo second arg, third arg omitted 

Modified: trunk/LayoutTests/media/track/track-addtrack-kind-expected.txt (200191 => 200192)


--- trunk/LayoutTests/media/track/track-addtrack-kind-expected.txt	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/LayoutTests/media/track/track-addtrack-kind-expected.txt	2016-04-28 15:41:46 UTC (rev 200192)
@@ -3,7 +3,7 @@
 
 ++ Test invalid 'kind'.
 EXPECTED (video.textTracks.length == '0') OK
-TEST(video.addTextTrack('kaptions')) THROWS(DOMException.SYNTAX_ERR) OK
+TEST(video.addTextTrack('kaptions')) THROWS('TypeError: Type error') OK
 EXPECTED (video.textTracks.length == '0') OK
 
 ++ Test all valid 'kind' keywords.

Modified: trunk/LayoutTests/media/track/track-addtrack-kind.html (200191 => 200192)


--- trunk/LayoutTests/media/track/track-addtrack-kind.html	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/LayoutTests/media/track/track-addtrack-kind.html	2016-04-28 15:41:46 UTC (rev 200192)
@@ -21,7 +21,7 @@
 
                 consoleWrite("<em>++ Test invalid 'kind'.</em>");
                 testExpected("video.textTracks.length", 0);
-                testDOMException("video.addTextTrack('kaptions')", "DOMException.SYNTAX_ERR");
+                testException("video.addTextTrack('kaptions')", "'TypeError: Type error'");
                 testExpected("video.textTracks.length", 0);
                 consoleWrite("");
 

Modified: trunk/LayoutTests/media/track/w3c/interfaces/HTMLMediaElement/addTextTrack.html (200191 => 200192)


--- trunk/LayoutTests/media/track/w3c/interfaces/HTMLMediaElement/addTextTrack.html	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/LayoutTests/media/track/w3c/interfaces/HTMLMediaElement/addTextTrack.html	2016-04-28 15:41:46 UTC (rev 200192)
@@ -6,19 +6,19 @@
 <script>
 var video = document.createElement('video');
 test(function(){
-    assert_throws('SYNTAX_ERR', function(){
+    assert_throws(new TypeError(), function(){
         video.addTextTrack('foo');
     });
-    assert_throws('SYNTAX_ERR', function(){
+    assert_throws(new TypeError(), function(){
         video.addTextTrack(undefined);
     });
-    assert_throws('SYNTAX_ERR', function(){
+    assert_throws(new TypeError(), function(){
         video.addTextTrack(null);
     });
 }, document.title + ' bogus first arg');
 
 test(function(){
-    assert_throws('SYNTAX_ERR', function(){
+    assert_throws(new TypeError(), function(){
         video.addTextTrack('SUBTITLES');
     });
 }, document.title + ' uppercase first arg');
@@ -29,6 +29,7 @@
     assert_equals(t.label, '');
     assert_equals(t.language, '');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' subtitles first arg');
 
@@ -38,6 +39,7 @@
     assert_equals(t.label, '');
     assert_equals(t.language, '');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' captions first arg');
 
@@ -47,6 +49,7 @@
     assert_equals(t.label, '');
     assert_equals(t.language, '');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' descriptions first arg');
 
@@ -56,6 +59,7 @@
     assert_equals(t.label, '');
     assert_equals(t.language, '');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' chapters first arg');
 
@@ -65,15 +69,17 @@
     assert_equals(t.label, '');
     assert_equals(t.language, '');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' metadata first arg');
 
 test(function(){
     var t = video.addTextTrack('subtitles', undefined, undefined);
     assert_equals(t.kind, 'subtitles');
-    assert_equals(t.label, 'undefined');
-    assert_equals(t.language, 'undefined');
+    assert_equals(t.label, '');
+    assert_equals(t.language, '');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' undefined second and third arg');
 
@@ -83,6 +89,7 @@
     assert_equals(t.label, 'null');
     assert_equals(t.language, 'null');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' null second and third arg');
 
@@ -92,6 +99,7 @@
     assert_equals(t.label, 'foo');
     assert_equals(t.language, 'bar');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' foo and bar second and third arg');
 
@@ -101,6 +109,7 @@
     assert_equals(t.label, 'foo');
     assert_equals(t.language, '');
     assert_equals(t.mode, 'hidden');
+    assert_true(t.cues instanceof TextTrackCueList);
     assert_equals(t.cues.length, 0);
 }, document.title + ' foo second arg, third arg omitted');
 

Modified: trunk/Source/WebCore/ChangeLog (200191 => 200192)


--- trunk/Source/WebCore/ChangeLog	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/ChangeLog	2016-04-28 15:41:46 UTC (rev 200192)
@@ -1,3 +1,81 @@
+2016-04-28  Chris Dumez  <[email protected]>
+
+        [Web IDL] Specify default values for optional parameters of type 'DOMString'
+        https://bugs.webkit.org/show_bug.cgi?id=157116
+
+        Reviewed by Darin Adler.
+
+        Specify default values for optional parameters of type 'DOMString' so
+        that this default value is used if the parameter is either omitted or
+        undefined. For parameters of type DOMString and that are not nullable,
+        the bindings generator now uses the null string as implicit default
+        value (unless explicitely specified otherwise in the IDL). This
+        simplifies the IDL a little and makes it a bit less confusing (it is
+        a bit weird to see something like "optional DOMString param = null",
+        considering the parameter is not nullable). I also think it makes
+        more sense to use the null String() rather than Optional<String> in
+        this case.
+
+        No new tests, existing tests were rebaselined.
+
+        * Modules/encryptedmedia/MediaKeys.idl:
+        * Modules/indexeddb/IDBDatabase.idl:
+        * Modules/indexeddb/IDBIndex.h:
+        * Modules/indexeddb/IDBIndex.idl:
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::openCursor): Deleted.
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBObjectStore.idl:
+        * Modules/speech/SpeechSynthesisUtterance.idl:
+        * Modules/websockets/WebSocket.idl:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateParametersCheck):
+        (CanUseWTFOptionalForParameter): Deleted.
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicString):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue): Deleted.
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
+        * bindings/scripts/test/TestNamedConstructor.idl:
+        * css/FontFaceSet.cpp:
+        * css/FontFaceSet.h:
+        * css/FontFaceSet.idl:
+        * css/WebKitCSSMatrix.idl:
+        * dom/Comment.idl:
+        * dom/DOMImplementation.idl:
+        * dom/DataTransfer.cpp:
+        (WebCore::DataTransfer::clearData):
+        (WebCore::DataTransfer::getData): Deleted.
+        * dom/DataTransfer.h:
+        * dom/Document.idl:
+        * dom/Text.idl:
+        * fileapi/FileReader.cpp:
+        (WebCore::FileReader::readAsDataURL): Deleted.
+        * fileapi/FileReader.h:
+        * fileapi/FileReaderSync.h:
+        * fileapi/FileReaderSync.idl:
+        * html/HTMLAudioElement.idl:
+        * html/HTMLInputElement.idl:
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::addTextTrack):
+        Throw a TypeError if the 'kind' parameter is not a valid string in the
+        TextTrackKind enum:
+        https://html.spec.whatwg.org/multipage/embedded-content.html#htmlmediaelement
+
+        We previously threw a SYNTAX_ERR instead of a TypeError in such case,
+        which was not correct as per Web IDL specification.
+
+        * html/HTMLMediaElement.h:
+        * html/HTMLMediaElement.idl:
+        * html/HTMLOptionElement.idl:
+        * html/HTMLTextAreaElement.idl:
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::setShadow):
+        * html/canvas/CanvasRenderingContext2D.h:
+        * page/Performance.idl:
+
 2016-04-28  Antonio Gomes  <[email protected]>
 
         Factor out the "paint item" logic in RenderListBox into a helper

Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl (200191 => 200192)


--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -31,6 +31,6 @@
 ] interface MediaKeys {
     // FIXME: The default value for the 'type' parameter is wrong.
     [CallWith=ScriptExecutionContext, RaisesException] MediaKeySession createSession(optional DOMString type = "undefined", optional Uint8Array initData = null);
-    static boolean isTypeSupported(DOMString keySystem, optional DOMString type = null);
+    static boolean isTypeSupported(DOMString keySystem, optional DOMString type);
     readonly attribute DOMString keySystem;
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (200191 => 200192)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -36,8 +36,8 @@
 
     [Custom, RaisesExceptionWithMessage] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
     [RaisesExceptionWithMessage] void deleteObjectStore(DOMString name);
-    [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(DOMString storeName, optional DOMString mode = null);
-    [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(sequence<DOMString> storeNames, optional DOMString mode = null);
+    [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(DOMString storeName, optional DOMString mode);
+    [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(sequence<DOMString> storeNames, optional DOMString mode);
     void close();
 
     attribute EventHandler onabort;

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h (200191 => 200192)


--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -49,9 +49,6 @@
     bool unique() const;
     bool multiEntry() const;
 
-    RefPtr<IDBRequest> openCursor(ScriptExecutionContext& context, ExceptionCodeWithMessage& ec) { return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
-    RefPtr<IDBRequest> openCursor(ScriptExecutionContext& context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec) { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
-    RefPtr<IDBRequest> openCursor(ScriptExecutionContext& context, JSC::JSValue key, ExceptionCodeWithMessage& ec) { return openCursor(context, key, IDBCursor::directionNext(), ec); }
     RefPtr<IDBRequest> openCursor(ScriptExecutionContext&, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> openCursor(ScriptExecutionContext&, JSC::JSValue key, const String& direction, ExceptionCodeWithMessage&);
 
@@ -59,9 +56,6 @@
     RefPtr<IDBRequest> count(ScriptExecutionContext&, IDBKeyRange*, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> count(ScriptExecutionContext&, JSC::JSValue key, ExceptionCodeWithMessage&);
 
-    RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext& context, ExceptionCodeWithMessage& ec) { return openKeyCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
-    RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext& context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec) { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
-    RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext& context, JSC::JSValue key, ExceptionCodeWithMessage& ec) { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
     RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext&, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext&, JSC::JSValue key, const String& direction, ExceptionCodeWithMessage&);
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (200191 => 200192)


--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -36,11 +36,11 @@
     readonly attribute boolean multiEntry;
     readonly attribute boolean unique;
 
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range, optional DOMString direction);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = "next");
+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction = "next");
 
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(optional IDBKeyRange? range, optional DOMString  direction);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(any key, optional DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional DOMString direction = "next");
+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(any key, optional DOMString direction = "next");
 
     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(any key);

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (200191 => 200192)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -115,21 +115,6 @@
     return m_info.autoIncrement();
 }
 
-RefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext& context, ExceptionCodeWithMessage& ec)
-{
-    return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec);
-}
-
-RefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext& context, IDBKeyRange* keyRange, ExceptionCodeWithMessage& ec)
-{
-    return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
-}
-
-RefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext& context, JSValue key, ExceptionCodeWithMessage& ec)
-{
-    return openCursor(context, key, IDBCursor::directionNext(), ec);
-}
-
 RefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext& context, IDBKeyRange* range, const String& directionString, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBObjectStore::openCursor");

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (200191 => 200192)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -64,9 +64,6 @@
 
     RefPtr<IDBRequest> add(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> put(JSC::ExecState&, JSC::JSValue, ExceptionCodeWithMessage&);
-    RefPtr<IDBRequest> openCursor(ScriptExecutionContext&, ExceptionCodeWithMessage&);
-    RefPtr<IDBRequest> openCursor(ScriptExecutionContext&, IDBKeyRange*, ExceptionCodeWithMessage&);
-    RefPtr<IDBRequest> openCursor(ScriptExecutionContext&, JSC::JSValue key, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> openCursor(ScriptExecutionContext&, IDBKeyRange*, const String& direction, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> openCursor(ScriptExecutionContext&, JSC::JSValue key, const String& direction, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> get(ScriptExecutionContext&, JSC::JSValue key, ExceptionCodeWithMessage&);

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (200191 => 200192)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -43,8 +43,8 @@
     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(any key);
     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest clear();
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range, optional DOMString direction);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction);
+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = "next");
+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction = "next");
     [CallWith=ScriptExecutionContext, Custom, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options);
     [CallWith=ScriptExecutionContext, Custom, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options);
     [RaisesExceptionWithMessage] IDBIndex index(DOMString name);

Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl (200191 => 200192)


--- trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -26,7 +26,7 @@
 [
     Conditional=SPEECH_SYNTHESIS,
     ConstructorCallWith=ScriptExecutionContext,
-    Constructor(optional DOMString text = null)
+    Constructor(optional DOMString text)
 ] interface SpeechSynthesisUtterance : EventTarget {
     attribute DOMString text;
     attribute DOMString lang;

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.idl (200191 => 200192)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -67,5 +67,5 @@
     [RaisesException] void send(Blob data);
     [RaisesException] void send(DOMString data);
 
-    [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason = null);
+    [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason);
 };

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200191 => 200192)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-28 15:41:46 UTC (rev 200192)
@@ -3381,7 +3381,6 @@
     return 0 if $codeGenerator->IsCallbackInterface($type);
     return 0 if $codeGenerator->IsEnumType($type);
     return 0 if $codeGenerator->IsWrapperType($type);
-    return 0 if $type eq "DOMString";
     return 0 if $type eq "any";
 
     return 1;
@@ -3472,6 +3471,9 @@
         # As per Web IDL, optional dictionary parameters are always considered to have a default value of an empty dictionary, unless otherwise specified.
         $parameter->default("[]") if ($optional && !defined($parameter->default) && $argType eq "Dictionary");
 
+        # We use the null string as default value for non-nullable parameters of type DOMString unless specified otherwise.
+        $parameter->default("null") if ($optional && !defined($parameter->default) && $argType eq "DOMString" && !$parameter->isNullable);
+
         # FIXME: We should eventually stop generating any early calls, and instead use either default parameter values or WTF::Optional<>.
         if ($optional && !defined($parameter->default) && !CanUseWTFOptionalForParameter($parameter) && !$codeGenerator->IsCallbackInterface($argType)) {
             # Generate early call if there are enough parameters.

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (200191 => 200192)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -4132,14 +4132,7 @@
         return throwThisTypeError(*state, "TestObj", "methodWithOptionalString");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
     auto& impl = castedThis->wrapped();
-
-    size_t argsCount = state->argumentCount();
-    if (argsCount <= 0) {
-        impl.methodWithOptionalString();
-        return JSValue::encode(jsUndefined());
-    }
-
-    String str = state->argument(0).toString(state)->value(state);
+    String str = state->argument(0).isUndefined() ? String() : state->uncheckedArgument(0).toString(state)->value(state);
     if (UNLIKELY(state->hadException()))
         return JSValue::encode(jsUndefined());
     impl.methodWithOptionalString(str);
@@ -4154,14 +4147,7 @@
         return throwThisTypeError(*state, "TestObj", "methodWithOptionalAtomicString");
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
     auto& impl = castedThis->wrapped();
-
-    size_t argsCount = state->argumentCount();
-    if (argsCount <= 0) {
-        impl.methodWithOptionalAtomicString();
-        return JSValue::encode(jsUndefined());
-    }
-
-    String str = state->argument(0).toString(state)->toAtomicString(state);
+    String str = state->argument(0).isUndefined() ? nullAtom : state->uncheckedArgument(0).toString(state)->toAtomicString(state);
     if (UNLIKELY(state->hadException()))
         return JSValue::encode(jsUndefined());
     impl.methodWithOptionalAtomicString(str);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (200191 => 200192)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -489,14 +489,7 @@
     float blur = state->argument(2).toFloat(state);
     if (UNLIKELY(state->hadException()))
         return JSValue::encode(jsUndefined());
-
-    size_t argsCount = state->argumentCount();
-    if (argsCount <= 3) {
-        impl.setShadow(width, height, blur);
-        return JSValue::encode(jsUndefined());
-    }
-
-    String color = state->argument(3).toString(state)->value(state);
+    String color = state->argument(3).isUndefined() ? String() : state->uncheckedArgument(3).toString(state)->value(state);
     if (UNLIKELY(state->hadException()))
         return JSValue::encode(jsUndefined());
     Optional<float> alpha = state->argument(4).isUndefined() ? Optional<float>() : state->uncheckedArgument(4).toFloat(state);

Modified: trunk/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl (200191 => 200192)


--- trunk/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -30,7 +30,7 @@
 // changes in its ouput.
 [
     ActiveDOMObject,
-    NamedConstructor=Audio(DOMString str1, optional DOMString str2 = "defaultString", optional DOMString str3 = null),
+    NamedConstructor=Audio(DOMString str1, optional DOMString str2 = "defaultString", optional DOMString str3),
     ConstructorRaisesException
 ] interface TestNamedConstructor {
 };

Modified: trunk/Source/WebCore/css/FontFaceSet.cpp (200191 => 200192)


--- trunk/Source/WebCore/css/FontFaceSet.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/css/FontFaceSet.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -247,14 +247,4 @@
     m_pendingPromises.remove(iterator);
 }
 
-void FontFaceSet::load(JSC::ExecState& state, const String& font, DeferredWrapper&& promise, ExceptionCode& ec)
-{
-    load(state, font, ASCIILiteral(" "), WTFMove(promise), ec);
 }
-
-bool FontFaceSet::check(const String& font, ExceptionCode& ec)
-{
-    return check(font, ASCIILiteral(" "), ec);
-}
-
-}

Modified: trunk/Source/WebCore/css/FontFaceSet.h (200191 => 200192)


--- trunk/Source/WebCore/css/FontFaceSet.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/css/FontFaceSet.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -47,9 +47,7 @@
     bool remove(FontFace&);
     void clear();
 
-    void load(JSC::ExecState&, const String& font, DeferredWrapper&& promise, ExceptionCode&);
     void load(JSC::ExecState&, const String& font, const String& text, DeferredWrapper&& promise, ExceptionCode&);
-    bool check(const String& font, ExceptionCode&);
     bool check(const String& font, const String& text, ExceptionCode&);
 
     String status() const;

Modified: trunk/Source/WebCore/css/FontFaceSet.idl (200191 => 200192)


--- trunk/Source/WebCore/css/FontFaceSet.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/css/FontFaceSet.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -48,8 +48,8 @@
     attribute EventHandler onloadingdone;
     attribute EventHandler onloadingerror;
 
-    [RaisesException, CallWith=ScriptState] Promise load(DOMString font, optional DOMString text);
-    [RaisesException] boolean check(DOMString font, optional DOMString text);
+    [RaisesException, CallWith=ScriptState] Promise load(DOMString font, optional DOMString text = " ");
+    [RaisesException] boolean check(DOMString font, optional DOMString text = " ");
 
     [Custom] readonly attribute Promise ready;
     readonly attribute FontFaceSetLoadStatus status;

Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.idl (200191 => 200192)


--- trunk/Source/WebCore/css/WebKitCSSMatrix.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -25,7 +25,7 @@
 
 // Introduced in DOM Level ?:
 [
-    Constructor(optional DOMString cssValue = null),
+    Constructor(optional DOMString cssValue),
     ConstructorRaisesException,
     ImplementationLacksVTable,
 ] interface WebKitCSSMatrix {

Modified: trunk/Source/WebCore/dom/Comment.idl (200191 => 200192)


--- trunk/Source/WebCore/dom/Comment.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/dom/Comment.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -18,7 +18,7 @@
  */
 
 [
-    Constructor(optional DOMString data = ""
+    Constructor(optional DOMString data),
     ConstructorCallWith=Document,
     JSGenerateToJSObject
 ] interface Comment : CharacterData {

Modified: trunk/Source/WebCore/dom/DOMImplementation.idl (200191 => 200192)


--- trunk/Source/WebCore/dom/DOMImplementation.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/dom/DOMImplementation.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -49,6 +49,6 @@
 
     // HTMLDOMImplementation interface from DOM Level 2 HTML
 
-    [NewObject] HTMLDocument createHTMLDocument(optional DOMString title = null);
+    [NewObject] HTMLDocument createHTMLDocument(optional DOMString title);
 
 };

Modified: trunk/Source/WebCore/dom/DataTransfer.cpp (200191 => 200192)


--- trunk/Source/WebCore/dom/DataTransfer.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/dom/DataTransfer.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -112,17 +112,12 @@
     if (!canWriteData())
         return;
 
-    m_pasteboard->clear(type);
+    if (type.isNull())
+        m_pasteboard->clear();
+    else
+        m_pasteboard->clear(type);
 }
 
-void DataTransfer::clearData()
-{
-    if (!canWriteData())
-        return;
-
-    m_pasteboard->clear();
-}
-
 String DataTransfer::getData(const String& type) const
 {
     if (!canReadData())

Modified: trunk/Source/WebCore/dom/DataTransfer.h (200191 => 200192)


--- trunk/Source/WebCore/dom/DataTransfer.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/dom/DataTransfer.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -58,8 +58,7 @@
 
         FileList& files() const;
 
-        void clearData(const String& type);
-        void clearData();
+        void clearData(const String& type = String());
 
         String getData(const String& type) const;
 

Modified: trunk/Source/WebCore/dom/Document.idl (200191 => 200192)


--- trunk/Source/WebCore/dom/Document.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/dom/Document.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -156,7 +156,7 @@
     // FIXME: Using "undefined" as default parameter value is wrong.
     boolean execCommand(optional DOMString command = "undefined",
                         optional boolean userInterface = false,
-                        optional DOMString? value);
+                        optional DOMString? value = null);
 
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
     // FIXME: remove the these two versions once optional is implemented for Objective-C.

Modified: trunk/Source/WebCore/dom/Text.idl (200191 => 200192)


--- trunk/Source/WebCore/dom/Text.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/dom/Text.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 [
-    Constructor(optional DOMString data = ""
+    Constructor(optional DOMString data),
     ConstructorCallWith=Document
 ] interface Text : CharacterData {
 

Modified: trunk/Source/WebCore/fileapi/FileReader.cpp (200191 => 200192)


--- trunk/Source/WebCore/fileapi/FileReader.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/fileapi/FileReader.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -112,11 +112,6 @@
     readInternal(*blob, FileReaderLoader::ReadAsText, ec);
 }
 
-void FileReader::readAsText(Blob* blob, ExceptionCode& ec)
-{
-    readAsText(blob, String(), ec);
-}
-
 void FileReader::readAsDataURL(Blob* blob, ExceptionCode& ec)
 {
     if (!blob)

Modified: trunk/Source/WebCore/fileapi/FileReader.h (200191 => 200192)


--- trunk/Source/WebCore/fileapi/FileReader.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/fileapi/FileReader.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -67,7 +67,6 @@
     void readAsArrayBuffer(Blob*, ExceptionCode&);
     void readAsBinaryString(Blob*, ExceptionCode&);
     void readAsText(Blob*, const String& encoding, ExceptionCode&);
-    void readAsText(Blob*, ExceptionCode&);
     void readAsDataURL(Blob*, ExceptionCode&);
     void abort();
 

Modified: trunk/Source/WebCore/fileapi/FileReaderSync.h (200191 => 200192)


--- trunk/Source/WebCore/fileapi/FileReaderSync.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/fileapi/FileReaderSync.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -58,10 +58,6 @@
 
     RefPtr<JSC::ArrayBuffer> readAsArrayBuffer(ScriptExecutionContext&, Blob&, ExceptionCode&);
     String readAsBinaryString(ScriptExecutionContext&, Blob&, ExceptionCode&);
-    String readAsText(ScriptExecutionContext& scriptExecutionContext, Blob& blob, ExceptionCode& ec)
-    {
-        return readAsText(scriptExecutionContext, blob, emptyString(), ec);
-    }
     String readAsText(ScriptExecutionContext&, Blob&, const String& encoding, ExceptionCode&);
     String readAsDataURL(ScriptExecutionContext&, Blob&, ExceptionCode&);
 

Modified: trunk/Source/WebCore/fileapi/FileReaderSync.idl (200191 => 200192)


--- trunk/Source/WebCore/fileapi/FileReaderSync.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/fileapi/FileReaderSync.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -34,6 +34,6 @@
 ] interface FileReaderSync {
     [CallWith=ScriptExecutionContext, RaisesException] ArrayBuffer readAsArrayBuffer(Blob blob);
     [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsBinaryString(Blob blob);
-    [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsText(Blob blob, optional DOMString encoding);
+    [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsText(Blob blob, optional DOMString encoding = "");
     [CallWith=ScriptExecutionContext, RaisesException] DOMString readAsDataURL(Blob blob);
 };

Modified: trunk/Source/WebCore/html/HTMLAudioElement.idl (200191 => 200192)


--- trunk/Source/WebCore/html/HTMLAudioElement.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/HTMLAudioElement.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -26,6 +26,6 @@
 [
     EnabledAtRuntime,
     Conditional=VIDEO,
-    NamedConstructor=Audio(optional DOMString src = ""
+    NamedConstructor=Audio(optional DOMString src)
 ] interface HTMLAudioElement : HTMLMediaElement {
 };

Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (200191 => 200192)


--- trunk/Source/WebCore/html/HTMLInputElement.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -92,7 +92,7 @@
     [RaisesException] void setRangeText(DOMString replacement,
                         unsigned long start,
                         unsigned long end,
-                        optional DOMString selectionMode = null);
+                        optional DOMString selectionMode);
 
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
     [Custom] void setSelectionRange(long start, long end);

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (200191 => 200192)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -3647,7 +3647,7 @@
 
     // 1. If kind is not one of the following strings, then throw a SyntaxError exception and abort these steps
     if (!TextTrack::isValidKindKeyword(kind)) {
-        ec = SYNTAX_ERR;
+        ec = TypeError;
         return 0;
     }
 

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (200191 => 200192)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -268,8 +268,6 @@
 
 #if ENABLE(VIDEO_TRACK)
     PassRefPtr<TextTrack> addTextTrack(const String& kind, const String& label, const String& language, ExceptionCode&);
-    PassRefPtr<TextTrack> addTextTrack(const String& kind, const String& label, ExceptionCode& ec) { return addTextTrack(kind, label, emptyString(), ec); }
-    PassRefPtr<TextTrack> addTextTrack(const String& kind, ExceptionCode& ec) { return addTextTrack(kind, emptyString(), emptyString(), ec); }
 
     AudioTrackList* audioTracks();
     TextTrackList* textTracks();

Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (200191 => 200192)


--- trunk/Source/WebCore/html/HTMLMediaElement.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -49,7 +49,7 @@
 
     // FIXME: Using "undefined" as default parameter value is wrong.
 #if (defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA) || (defined(ENABLE_ENCRYPTED_MEDIA_V2) && ENABLE_ENCRYPTED_MEDIA_V2)
-    DOMString canPlayType(optional DOMString type = "undefined", optional DOMString? keySystem);
+    DOMString canPlayType(optional DOMString type = "undefined", optional DOMString? keySystem = null);
 #else
     DOMString canPlayType(optional DOMString type = "undefined");
 #endif
@@ -99,13 +99,13 @@
 
 #if (!defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT) && (!defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C)
     [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitGenerateKeyRequest(DOMString? keySystem, optional Uint8Array initData = null);
-    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitAddKey(DOMString? keySystem, Uint8Array key, optional Uint8Array initData = null, optional DOMString sessionId = null);
-    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitCancelKeyRequest(DOMString? keySystem, optional DOMString sessionId = null);
+    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitAddKey(DOMString? keySystem, Uint8Array key, optional Uint8Array initData = null, optional DOMString sessionId);
+    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitCancelKeyRequest(DOMString? keySystem, optional DOMString sessionId);
 
     [Conditional=ENCRYPTED_MEDIA_V2, ImplementedAs=keys] readonly attribute MediaKeys webkitKeys;
     [Conditional=ENCRYPTED_MEDIA_V2, ImplementedAs=setMediaKeys] void webkitSetMediaKeys(MediaKeys? mediaKeys);
 
-    [Conditional=VIDEO_TRACK, RaisesException] TextTrack addTextTrack(DOMString kind, optional DOMString label, optional DOMString language);
+    [Conditional=VIDEO_TRACK, RaisesException] TextTrack addTextTrack(DOMString kind, optional DOMString label = "", optional DOMString language = "");
     [Conditional=VIDEO_TRACK] readonly attribute AudioTrackList audioTracks;
     [Conditional=VIDEO_TRACK] readonly attribute TextTrackList textTracks;
     [Conditional=VIDEO_TRACK] readonly attribute VideoTrackList videoTracks;

Modified: trunk/Source/WebCore/html/HTMLOptionElement.idl (200191 => 200192)


--- trunk/Source/WebCore/html/HTMLOptionElement.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/HTMLOptionElement.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -20,7 +20,7 @@
 
 [
     JSGenerateToNativeObject,
-    NamedConstructor=Option(optional DOMString data = "" optional DOMString value = null, optional boolean defaultSelected = false, optional boolean selected = false),
+    NamedConstructor=Option(optional DOMString data, optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false),
     ConstructorRaisesException
 ] interface HTMLOptionElement : HTMLElement {
     [Reflect] attribute boolean disabled;

Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.idl (200191 => 200192)


--- trunk/Source/WebCore/html/HTMLTextAreaElement.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -60,7 +60,7 @@
     [RaisesException] void setRangeText(DOMString replacement,
                         unsigned long start,
                         unsigned long end,
-                        optional DOMString selectionMode = null);
+                        optional DOMString selectionMode);
 
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
     void setSelectionRange(long start, long end);

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (200191 => 200192)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2016-04-28 15:41:46 UTC (rev 200192)
@@ -1254,15 +1254,10 @@
     }
 }
 
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur)
-{
-    setShadow(FloatSize(width, height), blur, Color::transparent);
-}
-
 void CanvasRenderingContext2D::setShadow(float width, float height, float blur, const String& color, Optional<float> alpha)
 {
-    RGBA32 rgba;
-    if (!parseColorOrCurrentColor(rgba, color, canvas()))
+    RGBA32 rgba = Color::transparent;
+    if (!color.isNull() && !parseColorOrCurrentColor(rgba, color, canvas()))
         return;
     setShadow(FloatSize(width, height), blur, colorWithOverrideAlpha(rgba, alpha));
 }

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h (200191 => 200192)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h	2016-04-28 15:41:46 UTC (rev 200192)
@@ -147,9 +147,7 @@
     void fillRect(float x, float y, float width, float height);
     void strokeRect(float x, float y, float width, float height);
 
-    void setShadow(float width, float height, float blur);
-    void setShadow(float width, float height, float blur, float grayLevel);
-    void setShadow(float width, float height, float blur, const String& color, Optional<float> alpha = Nullopt);
+    void setShadow(float width, float height, float blur, const String& color = String(), Optional<float> alpha = Nullopt);
     void setShadow(float width, float height, float blur, float grayLevel, float alpha = 1.0);
     void setShadow(float width, float height, float blur, float r, float g, float b, float a);
     void setShadow(float width, float height, float blur, float c, float m, float y, float k, float a);

Modified: trunk/Source/WebCore/page/Performance.idl (200191 => 200192)


--- trunk/Source/WebCore/page/Performance.idl	2016-04-28 15:12:10 UTC (rev 200191)
+++ trunk/Source/WebCore/page/Performance.idl	2016-04-28 15:41:46 UTC (rev 200192)
@@ -39,7 +39,7 @@
 #if defined(ENABLE_PERFORMANCE_TIMELINE) && ENABLE_PERFORMANCE_TIMELINE
     PerformanceEntryList webkitGetEntries();
     PerformanceEntryList webkitGetEntriesByType(DOMString entryType);
-    PerformanceEntryList webkitGetEntriesByName(DOMString name, optional DOMString entryType = null);
+    PerformanceEntryList webkitGetEntriesByName(DOMString name, optional DOMString entryType);
 #endif
 
 #if defined(ENABLE_RESOURCE_TIMING) && ENABLE_RESOURCE_TIMING
@@ -52,10 +52,10 @@
     // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
 #if defined(ENABLE_USER_TIMING) && ENABLE_USER_TIMING
     [RaisesException] void webkitMark(DOMString markName);
-    void webkitClearMarks(optional  DOMString markName = null);
+    void webkitClearMarks(optional  DOMString markName);
 
-    [RaisesException] void webkitMeasure(DOMString measureName, optional DOMString startMark = null, optional DOMString endMark = null);
-    void webkitClearMeasures(optional DOMString measureName = null);
+    [RaisesException] void webkitMeasure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
+    void webkitClearMeasures(optional DOMString measureName);
 #endif
 
     // See http://www.w3.org/TR/hr-time/ for details.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to