[Streams API] Add skeleton for initial WritableStream support
authorcalvaris@igalia.com <calvaris@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Oct 2015 09:46:01 +0000 (09:46 +0000)
committercalvaris@igalia.com <calvaris@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Oct 2015 09:46:01 +0000 (09:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149951

Reviewed by Darin Adler.

Source/WebCore:

This basically adds an empty WritableStream object without initializing the object. It also adds all empty
methods by raising an exception.

The reason why the object is not fully initialized is that it requires some other support and some refactorings
to share more code with ReadableStream and we will make in following patches.

Tests are covered by current set and their expectations are properly updated.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
* Modules/streams/WritableStream.idl: Added all methods and attributes.
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
(close):
(write):
(closed):
(ready):
(state): Added all by throwing an EvalError.

Source/WebInspectorUI:

* UserInterface/Models/NativeFunctionParameters.js: Added support for WritableStream.

LayoutTests:

Changed expectations to accomodate the WritableStream skeleton, including global-constructors-attributes.

* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
* streams/reference-implementation/bad-strategies-expected.txt:
* streams/reference-implementation/bad-underlying-sinks-expected.txt:
* streams/reference-implementation/brand-checks-expected.txt:
* streams/reference-implementation/byte-length-queuing-strategy-expected.txt:
* streams/reference-implementation/count-queuing-strategy-expected.txt:
* streams/reference-implementation/pipe-through-expected.txt:
* streams/reference-implementation/pipe-to-expected.txt:
* streams/reference-implementation/pipe-to-options-expected.txt:
* streams/reference-implementation/readable-stream-templated-expected.txt:
* streams/reference-implementation/writable-stream-abort-expected.txt:
* streams/reference-implementation/writable-stream-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191283 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 files changed:
LayoutTests/ChangeLog
LayoutTests/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
LayoutTests/streams/reference-implementation/bad-strategies-expected.txt
LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt
LayoutTests/streams/reference-implementation/brand-checks-expected.txt
LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt
LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt
LayoutTests/streams/reference-implementation/pipe-through-expected.txt
LayoutTests/streams/reference-implementation/pipe-to-expected.txt
LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt
LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt
LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt
LayoutTests/streams/reference-implementation/writable-stream-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/streams/WritableStream.idl [new file with mode: 0644]
Source/WebCore/Modules/streams/WritableStream.js [new file with mode: 0644]
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp
Source/WebCore/bindings/js/WebCoreJSBuiltins.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js

index b9c7bb9..d997983 100644 (file)
@@ -1,3 +1,31 @@
+2015-10-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
+
+        [Streams API] Add skeleton for initial WritableStream support
+        https://bugs.webkit.org/show_bug.cgi?id=149951
+
+        Reviewed by Darin Adler.
+
+        Changed expectations to accomodate the WritableStream skeleton, including global-constructors-attributes.
+
+        * js/dom/global-constructors-attributes-expected.txt:
+        * platform/efl/js/dom/global-constructors-attributes-expected.txt:
+        * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        * platform/win/js/dom/global-constructors-attributes-expected.txt:
+        * streams/reference-implementation/bad-strategies-expected.txt:
+        * streams/reference-implementation/bad-underlying-sinks-expected.txt:
+        * streams/reference-implementation/brand-checks-expected.txt:
+        * streams/reference-implementation/byte-length-queuing-strategy-expected.txt:
+        * streams/reference-implementation/count-queuing-strategy-expected.txt:
+        * streams/reference-implementation/pipe-through-expected.txt:
+        * streams/reference-implementation/pipe-to-expected.txt:
+        * streams/reference-implementation/pipe-to-options-expected.txt:
+        * streams/reference-implementation/readable-stream-templated-expected.txt:
+        * streams/reference-implementation/writable-stream-abort-expected.txt:
+        * streams/reference-implementation/writable-stream-expected.txt:
+
 2015-10-18  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Promise constructor should throw when not called with "new"
index 9f75d4e..d1aa83e 100644 (file)
@@ -1908,6 +1908,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').value is WritableStream
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').value is XMLDocument
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('set') is false
index faaba87..1d2bf5e 100644 (file)
@@ -2043,6 +2043,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').value is WritableStream
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').value is XMLDocument
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('set') is false
index 733f672..15c92bf 100644 (file)
@@ -1998,6 +1998,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').value is WritableStream
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').value is XMLDocument
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('set') is false
index eefdfe0..197e033 100644 (file)
@@ -2038,6 +2038,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').value is WritableStream
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').value is XMLDocument
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('set') is false
index b3bc32e..567f787 100644 (file)
@@ -2058,6 +2058,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').value is WritableStream
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').value is XMLDocument
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('set') is false
index 085fbe6..058b609 100644 (file)
@@ -2063,6 +2063,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').value is WritableStream
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').value is XMLDocument
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('set') is false
index 932d37e..0854ef0 100644 (file)
@@ -1793,6 +1793,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('get') is
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Worker').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').value is WritableStream
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'WritableStream').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').value is XMLDocument
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'XMLDocument').hasOwnProperty('set') is false
index 1793ae0..454b7a8 100644 (file)
@@ -6,13 +6,13 @@ PASS Readable stream: invalid strategy.highWaterMark
 PASS Readable stream: invalid strategy.size return value 
 FAIL Writable stream: throwing strategy.size getter assert_throws: construction should re-throw the error function "function () {
         new WritableStream({}, {
-          ..." threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
-FAIL Writable stream: throwing strategy.size method Can't find variable: WritableStream
-FAIL Writable stream: invalid strategy.size return value Can't find variable: WritableStream
+          ..." threw object "EvalError: WritableStream constructor not implemented" ("EvalError") expected object "Error: a unique string" ("Error")
+FAIL Writable stream: throwing strategy.size method WritableStream constructor not implemented
+FAIL Writable stream: invalid strategy.size return value WritableStream constructor not implemented
 FAIL Writable stream: throwing strategy.highWaterMark getter assert_throws: construction should re-throw the error function "function () {
         new WritableStream({}, {
-          ..." threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
+          ..." threw object "EvalError: WritableStream constructor not implemented" ("EvalError") expected object "Error: a unique string" ("Error")
 FAIL Writable stream: invalid strategy.highWaterMark assert_throws: construction should throw a RangeError for -1 function "function () {
             new WritableStream({}, {
-      ..." threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected object "RangeError" ("RangeError")
+      ..." threw object "EvalError: WritableStream constructor not implemented" ("EvalError") expected object "RangeError" ("RangeError")
 
index 2729a5f..550fde9 100644 (file)
@@ -1,14 +1,14 @@
 
 FAIL Underlying sink: throwing start getter assert_throws: function "function () {
         new WritableStream({
-            ge..." threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
+            ge..." threw object "EvalError: WritableStream constructor not implemented" ("EvalError") expected object "Error: a unique string" ("Error")
 FAIL Underlying sink: throwing start method assert_throws: function "function () {
         new WritableStream({
-            st..." threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
-FAIL Underlying sink: throwing write getter Can't find variable: WritableStream
-FAIL Underlying sink: throwing write method Can't find variable: WritableStream
-FAIL Underlying sink: throwing abort getter Can't find variable: WritableStream
-FAIL Underlying sink: throwing abort method Can't find variable: WritableStream
-FAIL Underlying sink: throwing close getter Can't find variable: WritableStream
-FAIL Underlying sink: throwing close method Can't find variable: WritableStream
+            st..." threw object "EvalError: WritableStream constructor not implemented" ("EvalError") expected object "Error: a unique string" ("Error")
+FAIL Underlying sink: throwing write getter WritableStream constructor not implemented
+FAIL Underlying sink: throwing write method WritableStream constructor not implemented
+FAIL Underlying sink: throwing abort getter WritableStream constructor not implemented
+FAIL Underlying sink: throwing abort method WritableStream constructor not implemented
+FAIL Underlying sink: throwing close getter WritableStream constructor not implemented
+FAIL Underlying sink: throwing close method WritableStream constructor not implemented
 
index c56b0f8..6c17d2a 100644 (file)
@@ -1,11 +1,11 @@
 
 PASS Can get the ReadableStreamReader constructor indirectly 
 PASS Can get the ReadableStreamController constructor indirectly 
-FAIL ReadableStream.prototype.cancel enforces a brand check Can't find variable: WritableStream
-FAIL ReadableStream.prototype.getReader enforces a brand check Can't find variable: WritableStream
+FAIL ReadableStream.prototype.cancel enforces a brand check WritableStream constructor not implemented
+FAIL ReadableStream.prototype.getReader enforces a brand check WritableStream constructor not implemented
 PASS ReadableStream.prototype.pipeThrough works generically on its this and its arguments 
 FAIL ReadableStream.prototype.pipeTo works generically on its this and its arguments pipeTo is not implemented
-FAIL ReadableStream.prototype.tee enforces a brand check Can't find variable: WritableStream
+FAIL ReadableStream.prototype.tee enforces a brand check WritableStream constructor not implemented
 PASS ReadableStreamReader enforces a brand check on its argument 
 PASS ReadableStreamReader.prototype.closed enforces a brand check 
 PASS ReadableStreamReader.prototype.cancel enforces a brand check 
@@ -17,12 +17,12 @@ PASS ReadableStreamController can't be given a fully-constructed ReadableStream
 PASS ReadableStreamController.prototype.close enforces a brand check 
 PASS ReadableStreamController.prototype.enqueue enforces a brand check 
 PASS ReadableStreamController.prototype.error enforces a brand check 
-FAIL WritableStream.prototype.closed enforces a brand check Can't find variable: WritableStream
-FAIL WritableStream.prototype.ready enforces a brand check Can't find variable: WritableStream
-FAIL WritableStream.prototype.state enforces a brand check Can't find variable: WritableStream
-FAIL WritableStream.prototype.abort enforces a brand check Can't find variable: WritableStream
-FAIL WritableStream.prototype.write enforces a brand check Can't find variable: WritableStream
-FAIL WritableStream.prototype.close enforces a brand check Can't find variable: WritableStream
+FAIL WritableStream.prototype.closed enforces a brand check closed not implemented
+FAIL WritableStream.prototype.ready enforces a brand check ready not implemented
+FAIL WritableStream.prototype.state enforces a brand check assert_throws: state should throw a TypeError function "function () { getter.call(target); }" threw object "EvalError: state not implemented" ("EvalError") expected object "TypeError" ("TypeError")
+FAIL WritableStream.prototype.abort enforces a brand check abort not implemented
+FAIL WritableStream.prototype.write enforces a brand check write not implemented
+FAIL WritableStream.prototype.close enforces a brand check close not implemented
 PASS ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments 
 PASS CountQueuingStrategy.prototype.size should work generically on its this and its arguments 
 
index e08559e..b983040 100644 (file)
@@ -4,5 +4,5 @@ PASS Can construct a ByteLengthQueuingStrategy with any value as its high water
 PASS ByteLengthQueuingStrategy constructor behaves as expected with wrong arguments 
 PASS ByteLengthQueuingStrategy size behaves as expected with wrong arguments 
 PASS ByteLengthQueuingStrategy instances have the correct properties 
-FAIL Closing a writable stream with in-flight writes below the high water mark delays the close call properly Can't find variable: WritableStream
+FAIL Closing a writable stream with in-flight writes below the high water mark delays the close call properly WritableStream constructor not implemented
 
index d24c5ea..a00e222 100644 (file)
@@ -8,7 +8,7 @@ PASS Can construct a readable stream with a valid CountQueuingStrategy
 PASS Correctly governs the return value of a ReadableStream's enqueue function (HWM = 0) 
 PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 1) 
 PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 4) 
-FAIL Can construct a writable stream with a valid CountQueuingStrategy Can't find variable: WritableStream
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 0) Can't find variable: WritableStream
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 4) Can't find variable: WritableStream
+FAIL Can construct a writable stream with a valid CountQueuingStrategy WritableStream constructor not implemented
+FAIL Correctly governs the value of a WritableStream's state property (HWM = 0) WritableStream constructor not implemented
+FAIL Correctly governs the value of a WritableStream's state property (HWM = 4) WritableStream constructor not implemented
 
index ff5dd4c..4e426f1 100644 (file)
@@ -1,4 +1,4 @@
 
-FAIL Piping through a duck-typed pass-through transform stream works Can't find variable: WritableStream
+FAIL Piping through a duck-typed pass-through transform stream works WritableStream constructor not implemented
 FAIL Piping through an identity transform stream will close the destination when the source closes Can't find variable: TransformStream
 
index d489bc5..0336c2d 100644 (file)
@@ -1,26 +1,26 @@
 
-FAIL Piping from a ReadableStream from which lots of data are readable synchronously Can't find variable: WritableStream
-FAIL Piping from a ReadableStream in readable state to a WritableStream in closing state Can't find variable: WritableStream
-FAIL Piping from a ReadableStream in readable state to a WritableStream in errored state Can't find variable: WritableStream
-FAIL Piping from a ReadableStream in the readable state which becomes closed after pipeTo call to a WritableStream in the writable state Can't find variable: WritableStream
-FAIL Piping from a ReadableStream in the readable state which becomes errored after pipeTo call to a WritableStream in the writable state Can't find variable: WritableStream
-FAIL Piping from an empty ReadableStream which becomes non-empty after pipeTo call to a WritableStream in the writable state Can't find variable: WritableStream
-FAIL Piping from an empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the writable state Can't find variable: WritableStream
-FAIL Piping from an empty ReadableStream to a WritableStream in the writable state which becomes errored after a pipeTo call Can't find variable: WritableStream
-FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call Can't find variable: WritableStream
-FAIL Piping from a non-empty ReadableStream to a WritableStream in waiting state which becomes errored after a pipeTo call Can't find variable: WritableStream
-FAIL Piping from a non-empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the waiting state Can't find variable: WritableStream
-FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state where both become ready after a pipeTo Can't find variable: WritableStream
-FAIL Piping from an empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call Can't find variable: WritableStream
-FAIL Piping from an empty ReadableStream which becomes closed after a pipeTo call to a WritableStream in the waiting state whose writes never complete Can't find variable: WritableStream
-FAIL Piping from an empty ReadableStream which becomes errored after a pipeTo call to a WritableStream in the waiting state Can't find variable: WritableStream
+FAIL Piping from a ReadableStream from which lots of data are readable synchronously WritableStream constructor not implemented
+FAIL Piping from a ReadableStream in readable state to a WritableStream in closing state WritableStream constructor not implemented
+FAIL Piping from a ReadableStream in readable state to a WritableStream in errored state WritableStream constructor not implemented
+FAIL Piping from a ReadableStream in the readable state which becomes closed after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
+FAIL Piping from a ReadableStream in the readable state which becomes errored after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
+FAIL Piping from an empty ReadableStream which becomes non-empty after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
+FAIL Piping from an empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the writable state WritableStream constructor not implemented
+FAIL Piping from an empty ReadableStream to a WritableStream in the writable state which becomes errored after a pipeTo call WritableStream constructor not implemented
+FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call WritableStream constructor not implemented
+FAIL Piping from a non-empty ReadableStream to a WritableStream in waiting state which becomes errored after a pipeTo call WritableStream constructor not implemented
+FAIL Piping from a non-empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the waiting state WritableStream constructor not implemented
+FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state where both become ready after a pipeTo WritableStream constructor not implemented
+FAIL Piping from an empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call WritableStream constructor not implemented
+FAIL Piping from an empty ReadableStream which becomes closed after a pipeTo call to a WritableStream in the waiting state whose writes never complete WritableStream constructor not implemented
+FAIL Piping from an empty ReadableStream which becomes errored after a pipeTo call to a WritableStream in the waiting state WritableStream constructor not implemented
 FAIL Piping to a duck-typed asynchronous "writable stream" works pipeTo is not implemented
-FAIL Piping to a stream that has been aborted passes through the error as the cancellation reason Can't find variable: WritableStream
-FAIL Piping to a stream and then aborting it passes through the error as the cancellation reason Can't find variable: WritableStream
-FAIL Piping to a stream that has been closed propagates a TypeError cancellation reason backward Can't find variable: WritableStream
-FAIL Piping to a stream and then closing it propagates a TypeError cancellation reason backward Can't find variable: WritableStream
-FAIL Piping to a stream that errors on write should pass through the error as the cancellation reason Can't find variable: WritableStream
-FAIL Piping to a stream that errors on write should not pass through the error if the stream is already closed Can't find variable: WritableStream
-FAIL Piping to a stream that errors soon after writing should pass through the error as the cancellation reason Can't find variable: WritableStream
-FAIL Piping to a writable stream that does not consume the writes fast enough exerts backpressure on the source Can't find variable: WritableStream
+FAIL Piping to a stream that has been aborted passes through the error as the cancellation reason WritableStream constructor not implemented
+FAIL Piping to a stream and then aborting it passes through the error as the cancellation reason WritableStream constructor not implemented
+FAIL Piping to a stream that has been closed propagates a TypeError cancellation reason backward WritableStream constructor not implemented
+FAIL Piping to a stream and then closing it propagates a TypeError cancellation reason backward WritableStream constructor not implemented
+FAIL Piping to a stream that errors on write should pass through the error as the cancellation reason WritableStream constructor not implemented
+FAIL Piping to a stream that errors on write should not pass through the error if the stream is already closed WritableStream constructor not implemented
+FAIL Piping to a stream that errors soon after writing should pass through the error as the cancellation reason WritableStream constructor not implemented
+FAIL Piping to a writable stream that does not consume the writes fast enough exerts backpressure on the source WritableStream constructor not implemented
 
index 4c035f2..9e4c33d 100644 (file)
@@ -1,5 +1,5 @@
 
-FAIL Piping with no options and a destination error Can't find variable: WritableStream
-FAIL Piping with { preventCancel: false } and a destination error Can't find variable: WritableStream
-FAIL Piping with { preventCancel: true } and a destination error Can't find variable: WritableStream
+FAIL Piping with no options and a destination error WritableStream constructor not implemented
+FAIL Piping with { preventCancel: false } and a destination error WritableStream constructor not implemented
+FAIL Piping with { preventCancel: true } and a destination error WritableStream constructor not implemented
 
index f7875d2..7906412 100644 (file)
@@ -18,8 +18,8 @@ PASS Running templatedRSClosed with ReadableStream (closed via call in start)
 PASS cancel() should return a distinct fulfilled promise each time 
 PASS locked should be false 
 PASS getReader() should be OK 
-FAIL piping to a WritableStream in the writable state should close the writable stream Can't find variable: WritableStream
-FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing Can't find variable: WritableStream
+FAIL piping to a WritableStream in the writable state should close the writable stream WritableStream constructor not implemented
+FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing WritableStream constructor not implemented
 PASS should be able to acquire multiple readers, since they are all auto-released 
 PASS Running templatedRSClosedReader with ReadableStream reader (closed before getting reader) 
 PASS read() should fulfill with { value: undefined, done: true } 
@@ -37,8 +37,8 @@ PASS Running templatedRSClosed with ReadableStream (closed via cancel)
 PASS cancel() should return a distinct fulfilled promise each time 
 PASS locked should be false 
 PASS getReader() should be OK 
-FAIL piping to a WritableStream in the writable state should close the writable stream Can't find variable: WritableStream
-FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing Can't find variable: WritableStream
+FAIL piping to a WritableStream in the writable state should close the writable stream WritableStream constructor not implemented
+FAIL piping to a WritableStream in the writable state with { preventClose: true } should do nothing WritableStream constructor not implemented
 PASS should be able to acquire multiple readers, since they are all auto-released 
 PASS Running templatedRSClosedReader with ReadableStream reader (closed via cancel after getting reader) 
 PASS read() should fulfill with { value: undefined, done: true } 
@@ -47,7 +47,7 @@ PASS read() should work when used within another read() fulfill callback
 PASS closed should fulfill with undefined 
 PASS cancel() should return a distinct fulfilled promise each time 
 PASS Running templatedRSErrored with ReadableStream (errored via call in start) 
-FAIL piping to a WritableStream in the writable state should abort the writable stream Can't find variable: WritableStream
+FAIL piping to a WritableStream in the writable state should abort the writable stream WritableStream constructor not implemented
 PASS getReader() should return a reader that acts errored 
 PASS read() twice should give the error each time 
 PASS locked should be false 
@@ -57,14 +57,14 @@ PASS cancel() should return a distinct rejected promise each time
 PASS reader cancel() should return a distinct rejected promise each time 
 PASS should be able to acquire multiple readers, since they are all auto-released 
 PASS Running templatedRSErrored with ReadableStream (errored via returning a rejected promise in start) 
-FAIL piping to a WritableStream in the writable state should abort the writable stream Can't find variable: WritableStream
+FAIL piping to a WritableStream in the writable state should abort the writable stream WritableStream constructor not implemented
 PASS getReader() should return a reader that acts errored 
 PASS read() twice should give the error each time 
 PASS locked should be false 
 PASS Running templatedRSErroredAsyncOnly with ReadableStream (errored via returning a rejected promise in start) reader 
-FAIL piping with no options Can't find variable: WritableStream
-FAIL piping with { preventAbort: false } Can't find variable: WritableStream
-FAIL piping with { preventAbort: true } Can't find variable: WritableStream
+FAIL piping with no options WritableStream constructor not implemented
+FAIL piping with { preventAbort: false } WritableStream constructor not implemented
+FAIL piping with { preventAbort: true } WritableStream constructor not implemented
 PASS Running templatedRSErroredReader with ReadableStream (errored via returning a rejected promise in start) reader 
 PASS closed should reject with the error 
 PASS read() should reject with the error 
@@ -80,26 +80,26 @@ PASS calling read() twice with waiting will eventually give both chunks
 PASS read() should return distinct promises each time 
 PASS cancel() after a read() should still give that single read result 
 PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued, then closed) 
-FAIL piping with no options and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: false } and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: false } and a destination with that errors synchronously Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and a destination with that errors synchronously Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and a destination that errors on the last chunk Can't find variable: WritableStream
+FAIL piping with no options and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: false } and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: false } and a destination with that errors synchronously WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and a destination with that errors synchronously WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and a destination that errors on the last chunk WritableStream constructor not implemented
 PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued async, then closed) 
-FAIL piping with no options and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: false } and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: false } and a destination with that errors synchronously Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and a destination with that errors synchronously Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and a destination that errors on the last chunk Can't find variable: WritableStream
+FAIL piping with no options and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: false } and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: false } and a destination with that errors synchronously WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and a destination with that errors synchronously WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and a destination that errors on the last chunk WritableStream constructor not implemented
 PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued via pull, then closed) 
-FAIL piping with no options and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: false } and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and no destination errors Can't find variable: WritableStream
-FAIL piping with { preventClose: false } and a destination with that errors synchronously Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and a destination with that errors synchronously Can't find variable: WritableStream
-FAIL piping with { preventClose: true } and a destination that errors on the last chunk Can't find variable: WritableStream
+FAIL piping with no options and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: false } and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and no destination errors WritableStream constructor not implemented
+FAIL piping with { preventClose: false } and a destination with that errors synchronously WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and a destination with that errors synchronously WritableStream constructor not implemented
+FAIL piping with { preventClose: true } and a destination that errors on the last chunk WritableStream constructor not implemented
 PASS Running templatedRSTwoChunksClosedReader with ReadableStream (two chunks enqueued, then closed) reader 
 PASS third read(), without waiting, should give { value: undefined, done: true } 
 PASS third read, with waiting, should give { value: undefined, done: true } 
index d41aba3..4c098d3 100644 (file)
@@ -1,14 +1,14 @@
 
-FAIL Aborting a WritableStream immediately prevents future writes Can't find variable: WritableStream
-FAIL Aborting a WritableStream prevents further writes after any that are in progress Can't find variable: WritableStream
-FAIL Fulfillment value of ws.abort() call must be undefined even if the underlying sink returns a non-undefined value Can't find variable: WritableStream
-FAIL WritableStream if sink's abort throws, the promise returned by ws.abort() rejects Can't find variable: WritableStream
-FAIL Aborting a WritableStream passes through the given reason Can't find variable: WritableStream
-FAIL Aborting a WritableStream puts it in an errored state, with stored error equal to the abort reason Can't find variable: WritableStream
-FAIL Aborting a WritableStream causes any outstanding ready promises to be fulfilled immediately Can't find variable: WritableStream
-FAIL Aborting a WritableStream causes any outstanding write() promises to be rejected with the abort reason Can't find variable: WritableStream
-FAIL Closing but then immediately aborting a WritableStream causes the stream to error Can't find variable: WritableStream
-FAIL Closing a WritableStream and aborting it while it closes causes the stream to error Can't find variable: WritableStream
-FAIL Aborting a WritableStream after it is closed is a no-op Can't find variable: WritableStream
-FAIL WritableStream should call underlying sink's close if no abort is supplied Can't find variable: WritableStream
+FAIL Aborting a WritableStream immediately prevents future writes WritableStream constructor not implemented
+FAIL Aborting a WritableStream prevents further writes after any that are in progress WritableStream constructor not implemented
+FAIL Fulfillment value of ws.abort() call must be undefined even if the underlying sink returns a non-undefined value WritableStream constructor not implemented
+FAIL WritableStream if sink's abort throws, the promise returned by ws.abort() rejects WritableStream constructor not implemented
+FAIL Aborting a WritableStream passes through the given reason WritableStream constructor not implemented
+FAIL Aborting a WritableStream puts it in an errored state, with stored error equal to the abort reason WritableStream constructor not implemented
+FAIL Aborting a WritableStream causes any outstanding ready promises to be fulfilled immediately WritableStream constructor not implemented
+FAIL Aborting a WritableStream causes any outstanding write() promises to be rejected with the abort reason WritableStream constructor not implemented
+FAIL Closing but then immediately aborting a WritableStream causes the stream to error WritableStream constructor not implemented
+FAIL Closing a WritableStream and aborting it while it closes causes the stream to error WritableStream constructor not implemented
+FAIL Aborting a WritableStream after it is closed is a no-op WritableStream constructor not implemented
+FAIL WritableStream should call underlying sink's close if no abort is supplied WritableStream constructor not implemented
 
index 55cd7e4..967731b 100644 (file)
@@ -1,14 +1,14 @@
 
-FAIL error argument is given to start method Can't find variable: WritableStream
-FAIL Underlying sink's write won't be called until start finishes Can't find variable: WritableStream
-FAIL Underlying sink's close won't be called until start finishes Can't find variable: WritableStream
-FAIL Fulfillment value of ws.close() call must be undefined even if the underlying sink returns a non-undefined value Can't find variable: WritableStream
-FAIL Underlying sink's write or close are never invoked if start throws assert_equals: expected object "Error: horrible things" but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL Underlying sink's write or close are never invoked if the promise returned by start is rejected Can't find variable: WritableStream
-FAIL WritableStream can be constructed with no arguments Can't find variable: WritableStream
-FAIL WritableStream instances have the correct methods and properties Can't find variable: WritableStream
-FAIL WritableStream with simple input, processed asynchronously Can't find variable: WritableStream
-FAIL WritableStream with simple input, processed synchronously Can't find variable: WritableStream
-FAIL WritableStream is writable and ready fulfills immediately if the strategy does not apply backpressure Can't find variable: WritableStream
-FAIL Fulfillment value of ws.write() call must be undefined even if the underlying sink returns a non-undefined ovalue Can't find variable: WritableStream
+FAIL error argument is given to start method WritableStream constructor not implemented
+FAIL Underlying sink's write won't be called until start finishes WritableStream constructor not implemented
+FAIL Underlying sink's close won't be called until start finishes WritableStream constructor not implemented
+FAIL Fulfillment value of ws.close() call must be undefined even if the underlying sink returns a non-undefined value WritableStream constructor not implemented
+FAIL Underlying sink's write or close are never invoked if start throws assert_equals: expected object "Error: horrible things" but got object "EvalError: WritableStream constructor not implemented"
+FAIL Underlying sink's write or close are never invoked if the promise returned by start is rejected WritableStream constructor not implemented
+FAIL WritableStream can be constructed with no arguments WritableStream constructor not implemented
+FAIL WritableStream instances have the correct methods and properties WritableStream constructor not implemented
+FAIL WritableStream with simple input, processed asynchronously WritableStream constructor not implemented
+FAIL WritableStream with simple input, processed synchronously WritableStream constructor not implemented
+FAIL WritableStream is writable and ready fulfills immediately if the strategy does not apply backpressure WritableStream constructor not implemented
+FAIL Fulfillment value of ws.write() call must be undefined even if the underlying sink returns a non-undefined ovalue WritableStream constructor not implemented
 
index 1603752..94c8cac 100644 (file)
@@ -281,6 +281,7 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/streams/ReadableStream.idl
     Modules/streams/ReadableStreamController.idl
     Modules/streams/ReadableStreamReader.idl
+    Modules/streams/WritableStream.idl
 
     Modules/vibration/NavigatorVibration.idl
 
@@ -3368,6 +3369,7 @@ set(WEBCORE_JS_BUILTINS
     ${WEBCORE_DIR}/Modules/streams/ReadableStreamController.js
     ${WEBCORE_DIR}/Modules/streams/ReadableStreamInternals.js
     ${WEBCORE_DIR}/Modules/streams/ReadableStreamReader.js
+    ${WEBCORE_DIR}/Modules/streams/WritableStream.js
 )
 
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
index b3c1aac..ab1ac36 100644 (file)
@@ -1,3 +1,36 @@
+2015-10-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
+
+        [Streams API] Add skeleton for initial WritableStream support
+        https://bugs.webkit.org/show_bug.cgi?id=149951
+
+        Reviewed by Darin Adler.
+
+        This basically adds an empty WritableStream object without initializing the object. It also adds all empty
+        methods by raising an exception.
+
+        The reason why the object is not fully initialized is that it requires some other support and some refactorings
+        to share more code with ReadableStream and we will make in following patches.
+
+        Tests are covered by current set and their expectations are properly updated.
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreJSBuiltins.cpp:
+        * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
+        * Modules/streams/WritableStream.idl: Added all methods and attributes.
+        * Modules/streams/WritableStream.js:
+        (initializeWritableStream):
+        (abort):
+        (close):
+        (write):
+        (closed):
+        (ready):
+        (state): Added all by throwing an EvalError.
+
 2015-10-18  Chris Dumez  <cdumez@apple.com>
 
         Script element with an empty for or event attributes should not execute
index 3633d71..65a3a7b 100644 (file)
 #include "JSReadableStream.cpp"
 #include "JSReadableStreamController.cpp"
 #include "JSReadableStreamReader.cpp"
+#include "JSWritableStream.cpp"
 #endif
 #include "JSRect.cpp"
 #include "JSRequestAnimationFrameCallback.cpp"
index 4df4ab5..a2ecde3 100644 (file)
@@ -179,6 +179,7 @@ NON_SVG_BINDING_IDLS = \
     $(WebCore)/Modules/streams/ReadableStream.idl \
     $(WebCore)/Modules/streams/ReadableStreamController.idl \
     $(WebCore)/Modules/streams/ReadableStreamReader.idl \
+    $(WebCore)/Modules/streams/WritableStream.idl \
     $(WebCore)/Modules/webaudio/AudioBuffer.idl \
     $(WebCore)/Modules/webaudio/AudioBufferCallback.idl \
     $(WebCore)/Modules/webaudio/AudioBufferSourceNode.idl \
@@ -1260,6 +1261,7 @@ WEBCORE_JS_BUILTINS = \
     $(WebCore)/Modules/streams/ReadableStreamController.js \
     $(WebCore)/Modules/streams/ReadableStreamInternals.js \
     $(WebCore)/Modules/streams/ReadableStreamReader.js \
+    $(WebCore)/Modules/streams/WritableStream.js \
 #
 
 all : $(WEBCORE_JS_BUILTINS:%.js=%Builtins.cpp)
diff --git a/Source/WebCore/Modules/streams/WritableStream.idl b/Source/WebCore/Modules/streams/WritableStream.idl
new file mode 100644 (file)
index 0000000..d821a3b
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2015 Canon Inc.
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be 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 Canon Inc. 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 CANON 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 CANON INC. AND 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.
+ */
+
+[
+    Conditional=STREAMS_API,
+    JSBuiltinConstructor
+] interface WritableStream { 
+    [JSBuiltin] Promise abort([Default=Undefined] optional any reason);
+    [JSBuiltin] Promise close();
+    [JSBuiltin] Promise write(any chunk);
+
+    [JSBuiltin] readonly attribute Promise closed;
+    [JSBuiltin] readonly attribute Promise ready;
+    [JSBuiltin] readonly attribute DOMString state;
+};
diff --git a/Source/WebCore/Modules/streams/WritableStream.js b/Source/WebCore/Modules/streams/WritableStream.js
new file mode 100644 (file)
index 0000000..aa66098
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2015 Canon Inc.
+ * Copyright (C) 2015 Igalia
+ *
+ * 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. ``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
+ * 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.
+ */
+
+// @optional=STREAMS_API
+
+function initializeWritableStream(underlyingSink, strategy)
+{
+    "use strict";
+
+    throw new EvalError("WritableStream constructor not implemented");
+
+    return this;
+}
+
+function abort(reason)
+{
+    "use strict";
+
+    throw new EvalError("abort not implemented");
+}
+
+function close()
+{
+    "use strict";
+
+    throw new EvalError("close not implemented");
+}
+
+function write(chunk)
+{
+    "use strict";
+
+    throw new EvalError("write not implemented");
+}
+
+function closed()
+{
+    "use strict";
+
+    throw new EvalError("closed not implemented");
+}
+
+function ready()
+{
+    "use strict";
+
+    throw new EvalError("ready not implemented");
+}
+
+function state()
+{
+    "use strict";
+
+    throw new EvalError("state not implemented");
+}
index c335472..0679aeb 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWritableStream.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSRect.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSReadableStream.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSReadableStreamController.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSReadableStreamReader.h" />
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWritableStream.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSRect.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSRequestAnimationFrameCallback.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSRGBColor.h" />
index eec4fc9..82eaf6e 100644 (file)
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSReadableStreamReader.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWritableStream.cpp">
+      <Filter>DerivedSources</Filter>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSRect.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSReadableStreamReader.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSWritableStream.h">
+      <Filter>DerivedSources</Filter>
+    </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSXMLHttpRequest.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
index 710f74e..bf0fe65 100644 (file)
                416E6FE81BBD12DF000A6043 /* ReadableStreamInternalsBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8061BB3110D00B764D9 /* ReadableStreamInternalsBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
                416E6FE91BBD12E5000A6043 /* ReadableStreamBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8061BB3110D00B764D8 /* ReadableStreamBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
                416E6FEA1BBD1684000A6044 /* ReadableStreamInternalsBuiltinsWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8071BB3110D00B764DA /* ReadableStreamInternalsBuiltinsWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               416E6FE91BBD12E5000A6053 /* WritableStreamBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B03D8061BB3110D00B764E8 /* WritableStreamBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
                417253AA1354BBBC00360F2A /* MediaControlElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417253A81354BBBC00360F2A /* MediaControlElements.cpp */; };
                417253AB1354BBBC00360F2A /* MediaControlElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 417253A91354BBBC00360F2A /* MediaControlElements.h */; };
                417DA6D913734E6E007C57FB /* Internals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417DA4CF13734326007C57FB /* Internals.cpp */; };
                7C4C96DD1AD4483500365A50 /* JSReadableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96D91AD4483500365A50 /* JSReadableStream.h */; };
                7C4C96DE1AD4483500365A50 /* JSReadableStreamReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */; };
                7C4C96DF1AD4483500365A50 /* JSReadableStreamReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */; };
+               7C4C96DC1AD4483500365A60 /* JSWritableStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96D81AD4483500365A60 /* JSWritableStream.cpp */; };
+               7C4C96DD1AD4483500365A60 /* JSWritableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96D91AD4483500365A60 /* JSWritableStream.h */; };
                7C4C96E31AD44ABF00365A50 /* LaunchServicesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96E21AD44ABF00365A50 /* LaunchServicesSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C4EDD741A7B607800198C4D /* FontCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C4EDD731A7B607800198C4D /* FontCocoa.mm */; };
                7C522D4B15B477E8009B7C95 /* InspectorOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */; };
                419BE7551BC7F3DB00E1C85B /* WebCoreJSBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreJSBuiltins.h; sourceTree = "<group>"; };
                419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamReader.idl; sourceTree = "<group>"; };
                41A023ED1A39DB7900F722CF /* ReadableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStream.idl; sourceTree = "<group>"; };
+               41A023ED1A39DB7900F722DF /* WritableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WritableStream.idl; sourceTree = "<group>"; };
                41A3D58C101C152D00316D07 /* DedicatedWorkerThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DedicatedWorkerThread.cpp; sourceTree = "<group>"; };
                41A3D58D101C152D00316D07 /* DedicatedWorkerThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DedicatedWorkerThread.h; sourceTree = "<group>"; };
                41BF700A0FE86F49005E8DEC /* MessagePortChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessagePortChannel.h; sourceTree = "<group>"; };
                7C4C96D91AD4483500365A50 /* JSReadableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStream.h; sourceTree = "<group>"; };
                7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamReader.cpp; sourceTree = "<group>"; };
                7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamReader.h; sourceTree = "<group>"; };
+               7C4C96D81AD4483500365A60 /* JSWritableStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWritableStream.cpp; sourceTree = "<group>"; };
+               7C4C96D91AD4483500365A60 /* JSWritableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWritableStream.h; sourceTree = "<group>"; };
                7C4C96E21AD44ABF00365A50 /* LaunchServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchServicesSPI.h; sourceTree = "<group>"; };
                7C4EDD731A7B607800198C4D /* FontCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCocoa.mm; sourceTree = "<group>"; };
                7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorOverlay.cpp; sourceTree = "<group>"; };
                9908B0F01BCACF9100ED0F65 /* ReadableStreamController.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamController.js; sourceTree = "<group>"; };
                9908B0F11BCACF9100ED0F65 /* ReadableStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamInternals.js; sourceTree = "<group>"; };
                9908B0F21BCACF9100ED0F65 /* ReadableStreamReader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStreamReader.js; sourceTree = "<group>"; };
+               9908B0EF1BCACF9100ED0F75 /* WritableStream.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = WritableStream.js; sourceTree = "<group>"; };
                9908B0F31BCACFFE00ED0F65 /* ByteLengthQueuingStrategyBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ByteLengthQueuingStrategyBuiltins.cpp; sourceTree = "<group>"; };
                9908B0F41BCACFFE00ED0F65 /* ByteLengthQueuingStrategyBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteLengthQueuingStrategyBuiltinsWrapper.h; sourceTree = "<group>"; };
                9908B0F51BCAD07D00ED0F65 /* ByteLengthQueuingStrategyBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteLengthQueuingStrategyBuiltins.h; sourceTree = "<group>"; };
                9908B0FE1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamReaderBuiltins.cpp; sourceTree = "<group>"; };
                9908B0FF1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReaderBuiltins.h; sourceTree = "<group>"; };
                9908B1001BCAD07D00ED0F65 /* ReadableStreamReaderBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReaderBuiltinsWrapper.h; sourceTree = "<group>"; };
+               9908B0F91BCAD07D00ED0F75 /* WritableStreamBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WritableStreamBuiltins.cpp; sourceTree = "<group>"; };
                9920398018B95BC600B39AF9 /* UserInputBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserInputBridge.cpp; sourceTree = "<group>"; };
                9920398118B95BC600B39AF9 /* UserInputBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInputBridge.h; sourceTree = "<group>"; };
                99C7CCB218C663E40032E413 /* MemoizedDOMResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoizedDOMResult.h; sourceTree = "<group>"; };
                9B03D8061BB3110D00B764D9 /* ReadableStreamInternalsBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamInternalsBuiltins.h; sourceTree = "<group>"; };
                9B03D8071BB3110D00B764D8 /* ReadableStreamBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamBuiltinsWrapper.h; sourceTree = "<group>"; };
                9B03D8071BB3110D00B764DA /* ReadableStreamInternalsBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamInternalsBuiltinsWrapper.h; sourceTree = "<group>"; };
+               9B03D8061BB3110D00B764E8 /* WritableStreamBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritableStreamBuiltins.h; sourceTree = "<group>"; };
+               9B03D8071BB3110D00B764E8 /* WritableStreamBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritableStreamBuiltinsWrapper.h; sourceTree = "<group>"; };
                9B19B67E1B964E5200348745 /* ShadowRoot.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ShadowRoot.idl; sourceTree = "<group>"; };
                9B1AB0791648C69D0051F3F2 /* HTMLFormControlsCollection.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLFormControlsCollection.idl; sourceTree = "<group>"; };
                9B1AB07B1648C7C40051F3F2 /* JSHTMLFormControlsCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFormControlsCollectionCustom.cpp; sourceTree = "<group>"; };
                                4129DF821BB5B7A600322A16 /* ReadableStreamReader.h */,
                                419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */,
                                9908B0F21BCACF9100ED0F65 /* ReadableStreamReader.js */,
+                               41A023ED1A39DB7900F722DF /* WritableStream.idl */,
+                               9908B0EF1BCACF9100ED0F75 /* WritableStream.js */,
+
                        );
                        path = streams;
                        sourceTree = "<group>";
                                6C4C96DB1AD4483500365A50 /* JSReadableStreamController.h */,
                                7C4C96DA1AD4483500365A50 /* JSReadableStreamReader.cpp */,
                                7C4C96DB1AD4483500365A50 /* JSReadableStreamReader.h */,
+                               7C4C96D81AD4483500365A60 /* JSWritableStream.cpp */,
+                               7C4C96D91AD4483500365A60 /* JSWritableStream.h */,
                        );
                        name = Streams;
                        sourceTree = "<group>";
                                1A1414B413A0F0500019996C /* WebKitFontFamilyNames.h */,
                                99CC0B6818BEA1FF006CEBCC /* WebReplayInputs.cpp */,
                                99CC0B6918BEA1FF006CEBCC /* WebReplayInputs.h */,
+                               9B03D8061BB3110D00B764E8 /* WritableStreamBuiltins.h */,
+                               9B03D8071BB3110D00B764E8 /* WritableStreamBuiltinsWrapper.h */,
+                               9908B0F91BCAD07D00ED0F75 /* WritableStreamBuiltins.cpp */,
                                656581EA09D1508D000E61D7 /* XLinkNames.cpp */,
                                656581EB09D1508D000E61D7 /* XLinkNames.h */,
                                A833C80A0A2CF25600D57664 /* XMLNames.cpp */,
                                E1C36D350EB0A094007410BC /* JSWorkerGlobalScopeBase.h in Headers */,
                                E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */,
                                E1271A580EEECDE400F61213 /* JSWorkerNavigator.h in Headers */,
+                               7C4C96DD1AD4483500365A60 /* JSWritableStream.h in Headers */,
                                BC348BD40DB7F804004ABAB9 /* JSXMLHttpRequest.h in Headers */,
                                BC60DA3A0D2A302800B9918F /* JSXMLHttpRequestException.h in Headers */,
                                F916C48E0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h in Headers */,
                                0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */,
                                97AABD2D14FA09D5007457AE /* WorkerThreadableWebSocketChannel.h in Headers */,
                                93309E24099E64920056E581 /* WrapContentsInDummySpanCommand.h in Headers */,
+                               416E6FE91BBD12E5000A6053 /* WritableStreamBuiltins.h in Headers */,
                                9BAF3B2412C1A39800014BF1 /* WritingDirection.h in Headers */,
                                14476AA815DC4BB100305DB2 /* WritingMode.h in Headers */,
                                6565820209D1508D000E61D7 /* XLinkNames.h in Headers */,
                                E18258AC0EF3CD7000933242 /* JSWorkerGlobalScopeCustom.cpp in Sources */,
                                E1C362F00EAF2AA9007410BC /* JSWorkerLocation.cpp in Sources */,
                                E1271A590EEECDE400F61213 /* JSWorkerNavigator.cpp in Sources */,
+                               7C4C96DC1AD4483500365A60 /* JSWritableStream.cpp in Sources */,
                                BC348BD30DB7F804004ABAB9 /* JSXMLHttpRequest.cpp in Sources */,
                                BC348BBE0DB7F531004ABAB9 /* JSXMLHttpRequestCustom.cpp in Sources */,
                                BC60DA390D2A302800B9918F /* JSXMLHttpRequestException.cpp in Sources */,
index 87f9f20..73800c7 100644 (file)
@@ -33,4 +33,5 @@
 #include "ReadableStreamControllerBuiltins.cpp"
 #include "ReadableStreamInternalsBuiltins.cpp"
 #include "ReadableStreamReaderBuiltins.cpp"
+#include "WritableStreamBuiltins.cpp"
 #endif
index b6b05b9..762cafd 100644 (file)
@@ -34,6 +34,7 @@
 #include "ReadableStreamControllerBuiltinsWrapper.h"
 #include "ReadableStreamInternalsBuiltinsWrapper.h"
 #include "ReadableStreamReaderBuiltinsWrapper.h"
+#include "WritableStreamBuiltinsWrapper.h"
 #endif
 
 
@@ -52,6 +53,7 @@ public:
         , m_readableStreamControllerBuiltins(&vm)
         , m_readableStreamInternalsBuiltins(&vm)
         , m_readableStreamReaderBuiltins(&vm)
+        , m_writableStreamBuiltins(&vm)
 #endif
     {
 #if ENABLE(STREAMS_API)
@@ -59,12 +61,13 @@ public:
 #endif
     }
 #if ENABLE(STREAMS_API)
-    ByteLengthQueuingStrategyBuiltinsWrapper& byteLengthQueuingStrategyBuiltins() { return m_byteLengthQueuingStrategyBuiltins;}
-    CountQueuingStrategyBuiltinsWrapper& countQueuingStrategyBuiltins() { return m_countQueuingStrategyBuiltins;}
-    ReadableStreamBuiltinsWrapper& readableStreamBuiltins() { return m_readableStreamBuiltins;}
-    ReadableStreamControllerBuiltinsWrapper& readableStreamControllerBuiltins() { return m_readableStreamControllerBuiltins;}
-    ReadableStreamInternalsBuiltinsWrapper& readableStreamInternalsBuiltins() { return m_readableStreamInternalsBuiltins;}
-    ReadableStreamReaderBuiltinsWrapper& readableStreamReaderBuiltins() { return m_readableStreamReaderBuiltins;}
+    ByteLengthQueuingStrategyBuiltinsWrapper& byteLengthQueuingStrategyBuiltins() { return m_byteLengthQueuingStrategyBuiltins; }
+    CountQueuingStrategyBuiltinsWrapper& countQueuingStrategyBuiltins() { return m_countQueuingStrategyBuiltins; }
+    ReadableStreamBuiltinsWrapper& readableStreamBuiltins() { return m_readableStreamBuiltins; }
+    ReadableStreamControllerBuiltinsWrapper& readableStreamControllerBuiltins() { return m_readableStreamControllerBuiltins; }
+    ReadableStreamInternalsBuiltinsWrapper& readableStreamInternalsBuiltins() { return m_readableStreamInternalsBuiltins; }
+    ReadableStreamReaderBuiltinsWrapper& readableStreamReaderBuiltins() { return m_readableStreamReaderBuiltins; }
+    WritableStreamBuiltinsWrapper& writableStreamBuiltins() { return m_writableStreamBuiltins; }
 #endif
 
 private:
@@ -76,6 +79,7 @@ private:
     ReadableStreamControllerBuiltinsWrapper m_readableStreamControllerBuiltins;
     ReadableStreamInternalsBuiltinsWrapper m_readableStreamInternalsBuiltins;
     ReadableStreamReaderBuiltinsWrapper m_readableStreamReaderBuiltins;
+    WritableStreamBuiltinsWrapper m_writableStreamBuiltins;
 #endif
 
 };
index 1cda5e9..b2af690 100644 (file)
@@ -1,3 +1,12 @@
+2015-10-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
+
+        [Streams API] Add skeleton for initial WritableStream support
+        https://bugs.webkit.org/show_bug.cgi?id=149951
+
+        Reviewed by Darin Adler.
+
+        * UserInterface/Models/NativeFunctionParameters.js: Added support for WritableStream.
+
 2015-10-19  James Craig  <jcraig@apple.com>
 
         Web Inspector: AX: console list 'input'/'output' markers are not perceivable
index d160fb6..2914095 100644 (file)
@@ -1262,6 +1262,13 @@ WebInspector.NativePrototypeFunctionParameters = {
         __proto__: null,
     },
 
+    WritableStream: {
+        abort: "reason",
+        close: "",
+        write: "chunk",
+        __proto__: null,
+    },
+
     RequestAnimationFrameCallback: {
         handleEvent: "highResTime",
         __proto__: null,