[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 b9c7bb987b551c96e8ebd0c98e6ef0326f633407..d9979834ca378ef766629fd3f1aa5b2b8d065cf5 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 9f75d4e156568956fdcae225c29496debd7ea49f..d1aa83e42e61f3af54808481c9679ad76fd5bd20 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 faaba87e45da47c054326227241f784290c09556..1d2bf5e719c88aefb1b44c8ffbdc500a9dc92787 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 733f67280d0c9a4529360a3ad6136805d4ae8e4d..15c92bf69df333054a69c90cf9aa8d1218bd5562 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 eefdfe01f1916f95fc778094fca17beaa48b4d91..197e033df227d338909c300f4f7d69d799dd20db 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 b3bc32ee941267770944a6755af9ecf710f7937b..567f787724dda75e26008923f83626c2683f8068 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 085fbe69c1e88d3fdc98ca0265b0afb178ef36d6..058b6092e7a10d963c58ba4fd9e248b07860de44 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 932d37e49a39d18dcf8ae46719498cec2b1dbded..0854ef037b52c00410871af0f9110b2a03d0f568 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 1793ae047b413854b6c0b8f7c3d6625eb4b375c0..454b7a8f149b2df44541ac30e479d69f03e2a9d7 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 2729a5f77ccf59d3b740e5aba7ac551ba01d0372..550fde9eedc354223b1d17e7a22768712152504f 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 c56b0f8d4201fedc986ea77add7b3fa022856ec5..6c17d2aeb5823963315183f623759964aa9d7ea5 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 e08559e57d22f1a02bbae2fbf3031a09c25b01c3..b983040619ac28ea750b8303db5e996337c4eeb0 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 d24c5eafc988399a9182ede047e9e4e5ab72a001..a00e2222088f6ea2019418c0c406bc411e7a1dc2 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 ff5dd4cff9b3d780e865e0b61836a0b5d5e377a3..4e426f1b5b15bd5339502fea8c1c7fbad2b29013 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 d489bc5ee841459479ebf7750c1d6c98d41ce436..0336c2dc52f360df5bcdd6b38286581862cd1e7a 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 4c035f2f0333eddc95599a4927163ea7cd2f9be8..9e4c33d2bf3e5862572fa4a7d4fa30ce999c967a 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 f7875d2cc5a2197b2dda773b5281572332d3aba9..7906412419f8247527f629751252bf6f5d648e31 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 d41aba32d3025ab90bac95d31e7302e0315c6dc7..4c098d3e33d632be043b4ec175a758209014b438 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 55cd7e4bd08f16e7a61c93c8e6657dcbad26c114..967731b9411bd7c20b71af78cfa379b8beaa7131 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 160375224d9feab7d0d79e33dde2d20c2384f251..94c8cac23069924705f48f2e925cf5f863430490 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 b3c1aac8b3ab11543751eef65e29d44e3327778e..ab1ac365305ec74ac14ae231df35f1bc4ffa30a0 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 3633d71df6e76529a8c4a8932c5bd5258c60168b..65a3a7b7dd72f81d0c603e812d7017834f857e40 100644 (file)
 #include "JSReadableStream.cpp"
 #include "JSReadableStreamController.cpp"
 #include "JSReadableStreamReader.cpp"
+#include "JSWritableStream.cpp"
 #endif
 #include "JSRect.cpp"
 #include "JSRequestAnimationFrameCallback.cpp"
index 4df4ab502668da576a81e8b8e523045313923476..a2ecde3943d6643373142d778e480fac9fef9327 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 c3354725968ed469359c3d5740512e1a1a1456f4..0679aeb7f57a887744df64e469dbe32441ed3f51 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 eec4fc988e6ab6f44706a5477aba191fdca4eb04..82eaf6ee95c248f202554ac021c0c762d2ccc903 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 710f74efbe7ab1cc7306220af321b68c3162fa25..bf0fe65835c7e966b7580abb38df236eb6de8e89 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 87f9f205958b50e64eb5ab48489253d29188996e..73800c7d86a343e23f023800b612f7135c8de2da 100644 (file)
@@ -33,4 +33,5 @@
 #include "ReadableStreamControllerBuiltins.cpp"
 #include "ReadableStreamInternalsBuiltins.cpp"
 #include "ReadableStreamReaderBuiltins.cpp"
+#include "WritableStreamBuiltins.cpp"
 #endif
index b6b05b9594612147ac82a86a7f482371c1425609..762cafd019b54cfb44fbdc489b31cc259f497d43 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 1cda5e92088c0483bdafbc98ec72f9fbe4b5c0d7..b2af690512d9cab32b9454481140ebcfcfa1d7da 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 d160fb62908c2ed1235b4a72feada9cb170abe7f..29140950f27b939e9c7216df87f16a79f9a455e0 100644 (file)
@@ -1262,6 +1262,13 @@ WebInspector.NativePrototypeFunctionParameters = {
         __proto__: null,
     },
 
+    WritableStream: {
+        abort: "reason",
+        close: "",
+        write: "chunk",
+        __proto__: null,
+    },
+
     RequestAnimationFrameCallback: {
         handleEvent: "highResTime",
         __proto__: null,