Title: [188127] trunk
Revision
188127
Author
calva...@igalia.com
Date
2015-08-07 09:35:43 -0700 (Fri, 07 Aug 2015)

Log Message

[Streams API] Create CountQueuingStrategy object as per spec
https://bugs.webkit.org/show_bug.cgi?id=146594

Reviewed by Geoffrey Garen.

Source/WebCore:

CountQueuingStrategy is a class part of the Streams API that can be found at
https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
property taking it from the argument.

Covered by current tests
(LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
LayoutTests/streams/reference-implementation/brand-checks.html).

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* PlatformMac.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
* Modules/streams/CountQueuingStrategy.h: Added.
(WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
(WebCore::CountQueuingStrategy::size): Returns 1.
* Modules/streams/CountQueuingStrategy.idl: Added.
* bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
(WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
(WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
and returns it.
* bindings/js/JSDOMBinding.h:
(WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
(WebCore::setPropertyToObject): Added to create a property into an object.
* bindings/js/ReadableJSStream.cpp:
(WebCore::getPropertyFromObject): Deleted.

LayoutTests:

* 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/ios-sim-deprecated/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: Updated expectations with
CountQueuingStrategy constructor.
* streams/reference-implementation/brand-checks.html:
* streams/reference-implementation/count-queuing-strategy.html: Removed reference to count-queuing-strategy.js.
* streams/reference-implementation/resources/count-queuing-strategy.js: Removed.
(CountQueuingStrategy): Deleted.
(CountQueuingStrategy.prototype.size): Deleted.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (188126 => 188127)


--- trunk/LayoutTests/ChangeLog	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/ChangeLog	2015-08-07 16:35:43 UTC (rev 188127)
@@ -1,3 +1,25 @@
+2015-08-07  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        [Streams API] Create CountQueuingStrategy object as per spec
+        https://bugs.webkit.org/show_bug.cgi?id=146594
+
+        Reviewed by Geoffrey Garen.
+
+        * 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/ios-sim-deprecated/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: Updated expectations with
+        CountQueuingStrategy constructor.
+        * streams/reference-implementation/brand-checks.html:
+        * streams/reference-implementation/count-queuing-strategy.html: Removed reference to count-queuing-strategy.js.
+        * streams/reference-implementation/resources/count-queuing-strategy.js: Removed.
+        (CountQueuingStrategy): Deleted.
+        (CountQueuingStrategy.prototype.size): Deleted.
+
 2015-08-07  Doug Russell  <d_russ...@apple.com>
 
         AX: Bug 147737 is causing test failures in Mavericks WK1

Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -223,6 +223,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -228,6 +228,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -228,6 +228,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/ios-sim-deprecated/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/platform/ios-sim-deprecated/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/platform/ios-sim-deprecated/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -208,6 +208,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -223,6 +223,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -223,6 +223,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -223,6 +223,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt (188126 => 188127)


--- trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -163,6 +163,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'CompositionEvent').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'CompositionEvent').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'CompositionEvent').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/streams/reference-implementation/brand-checks.html (188126 => 188127)


--- trunk/LayoutTests/streams/reference-implementation/brand-checks.html	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/streams/reference-implementation/brand-checks.html	2015-08-07 16:35:43 UTC (rev 188127)
@@ -2,7 +2,6 @@
 <script src=''></script>
 <script src=''></script>
 <script src=''></script>
-<script src=''></script>
 <script src=''></script>
 <script>
 var ReadableStreamReader;

Modified: trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy.html (188126 => 188127)


--- trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy.html	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy.html	2015-08-07 16:35:43 UTC (rev 188127)
@@ -2,7 +2,6 @@
 <script src=''></script>
 <script src=''></script>
 <script src=''></script>
-<script src=''></script>
 <script>
 test(function() {
     new CountQueuingStrategy({ highWaterMark: 4 });

Deleted: trunk/LayoutTests/streams/reference-implementation/resources/count-queuing-strategy.js (188126 => 188127)


--- trunk/LayoutTests/streams/reference-implementation/resources/count-queuing-strategy.js	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/LayoutTests/streams/reference-implementation/resources/count-queuing-strategy.js	2015-08-07 16:35:43 UTC (rev 188127)
@@ -1,11 +0,0 @@
-// FIXME: Remove this file when implemented in WebCore.
-
-function CountQueuingStrategy({ highWaterMark }) {
-    createDataProperty(this, 'highWaterMark', highWaterMark);
-}
-
-CountQueuingStrategy.prototype = {
-    size: function(chunk) {
-        return 1;
-    }
-}

Modified: trunk/Source/WebCore/CMakeLists.txt (188126 => 188127)


--- trunk/Source/WebCore/CMakeLists.txt	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/CMakeLists.txt	2015-08-07 16:35:43 UTC (rev 188127)
@@ -289,6 +289,7 @@
     Modules/speech/SpeechSynthesisUtterance.idl
     Modules/speech/SpeechSynthesisVoice.idl
 
+    Modules/streams/CountQueuingStrategy.idl
     Modules/streams/ReadableStream.idl
     Modules/streams/ReadableStreamController.idl
     Modules/streams/ReadableStreamReader.idl
@@ -1088,6 +1089,7 @@
     bindings/js/JSCanvasRenderingContextCustom.cpp
     bindings/js/JSCharacterDataCustom.cpp
     bindings/js/JSCommandLineAPIHostCustom.cpp
+    bindings/js/JSCountQueuingStrategyCustom.cpp
     bindings/js/JSCryptoAlgorithmBuilder.cpp
     bindings/js/JSCryptoAlgorithmDictionary.cpp
     bindings/js/JSCryptoCustom.cpp

Modified: trunk/Source/WebCore/ChangeLog (188126 => 188127)


--- trunk/Source/WebCore/ChangeLog	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/ChangeLog	2015-08-07 16:35:43 UTC (rev 188127)
@@ -1,3 +1,43 @@
+2015-08-07  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        [Streams API] Create CountQueuingStrategy object as per spec
+        https://bugs.webkit.org/show_bug.cgi?id=146594
+
+        Reviewed by Geoffrey Garen.
+
+        CountQueuingStrategy is a class part of the Streams API that can be found at
+        https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
+        natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
+        the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
+        do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
+        property taking it from the argument.
+
+        Covered by current tests
+        (LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
+        LayoutTests/streams/reference-implementation/brand-checks.html).
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * PlatformMac.cmake:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
+        * Modules/streams/CountQueuingStrategy.h: Added.
+        (WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
+        (WebCore::CountQueuingStrategy::size): Returns 1.
+        * Modules/streams/CountQueuingStrategy.idl: Added.
+        * bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
+        (WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
+        (WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
+        and returns it.
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
+        (WebCore::setPropertyToObject): Added to create a property into an object.
+        * bindings/js/ReadableJSStream.cpp:
+        (WebCore::getPropertyFromObject): Deleted.
+
 2015-08-07  Brady Eidson  <beid...@apple.com>
 
         Move concrete KeyedDecoder/Encoder implementations to WebCore.

Modified: trunk/Source/WebCore/DerivedSources.cpp (188126 => 188127)


--- trunk/Source/WebCore/DerivedSources.cpp	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/DerivedSources.cpp	2015-08-07 16:35:43 UTC (rev 188127)
@@ -41,6 +41,9 @@
 #include "JSCanvasPattern.cpp"
 #include "JSCanvasRenderingContext.cpp"
 #include "JSCanvasRenderingContext2D.cpp"
+#if ENABLE(STREAMS_API)
+#include "JSCountQueuingStrategy.cpp"
+#endif
 #if ENABLE(WEBGL)
 #include "JSEXTBlendMinMax.cpp"
 #include "JSEXTFragDepth.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (188126 => 188127)


--- trunk/Source/WebCore/DerivedSources.make	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/DerivedSources.make	2015-08-07 16:35:43 UTC (rev 188127)
@@ -174,6 +174,7 @@
     $(WebCore)/Modules/speech/SpeechSynthesisEvent.idl \
     $(WebCore)/Modules/speech/SpeechSynthesisUtterance.idl \
     $(WebCore)/Modules/speech/SpeechSynthesisVoice.idl \
+    $(WebCore)/Modules/streams/CountQueuingStrategy.idl \
     $(WebCore)/Modules/streams/ReadableStream.idl \
     $(WebCore)/Modules/streams/ReadableStreamController.idl \
     $(WebCore)/Modules/streams/ReadableStreamReader.idl \

Added: trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h (0 => 188127)


--- trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h	2015-08-07 16:35:43 UTC (rev 188127)
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+#ifndef CountQueuingStrategy_h
+#define CountQueuingStrategy_h
+
+#if ENABLE(STREAMS_API)
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+// CountQueuingStrategy implements a strategy for streams that counts chunks one by one according to the spec. See
+// https://streams.spec.whatwg.org/#cqs-class
+class CountQueuingStrategy : public RefCounted<CountQueuingStrategy> {
+public:
+    virtual ~CountQueuingStrategy() { }
+
+    inline static int size() { return 1; }
+};
+
+}
+
+#endif
+
+#endif // CountQueuingStrategy_h

Added: trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl (0 => 188127)


--- trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl	2015-08-07 16:35:43 UTC (rev 188127)
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+[
+    CustomConstructor(any properties),
+    Conditional=STREAMS_API,
+] interface CountQueuingStrategy {
+    [CustomBinding] double size();
+};

Modified: trunk/Source/WebCore/PlatformMac.cmake (188126 => 188127)


--- trunk/Source/WebCore/PlatformMac.cmake	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/PlatformMac.cmake	2015-08-07 16:35:43 UTC (rev 188127)
@@ -537,6 +537,7 @@
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCommandLineAPIHost.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMConvolverNode.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCoordinates.mm
+    ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCountQueuingStrategy.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCrypto.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCryptoKey.mm
     ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCustomEvent.mm

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (188126 => 188127)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2015-08-07 16:35:43 UTC (rev 188127)
@@ -1173,6 +1173,20 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.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\JSCrypto.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -17328,6 +17342,20 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\bindings\js\JSCountQueuingStrategyCustom.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="..\bindings\js\DOMWrapperWorld.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -19806,6 +19834,7 @@
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCompositionEvent.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCoordinates.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCounter.h" />
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCrypto.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCSSCharsetRule.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCSSFontFaceLoadEvent.h" />
@@ -20537,6 +20566,7 @@
     <ClInclude Include="..\Modules\notifications\NotificationClient.h" />
     <ClInclude Include="..\Modules\notifications\WorkerGlobalScopeNotifications.h" />
     <ClInclude Include="..\Modules\plugins\PluginReplacement.h" />
+    <ClInclude Include="..\Modules\streams\CountQueuingStrategy.h" />
     <ClInclude Include="..\Modules\streams\ReadableStream.h" />
     <ClInclude Include="..\Modules\streams\ReadableStreamController.h" />
     <ClInclude Include="..\Modules\streams\ReadableStreamReader.h" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (188126 => 188127)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2015-08-07 16:35:43 UTC (rev 188127)
@@ -4251,6 +4251,9 @@
     <ClCompile Include="..\bindings\js\JSCommandLineAPIHostCustom.cpp">
       <Filter>bindings\js</Filter>
     </ClCompile>
+    <ClCompile Include="..\bindings\js\JSCountQueuingStrategyCustom.cpp">
+      <Filter>bindings\js</Filter>
+    </ClCompile>
     <ClCompile Include="..\bindings\js\JSCSSRuleCustom.cpp">
       <Filter>bindings\js</Filter>
     </ClCompile>
@@ -5125,6 +5128,9 @@
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCounter.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.cpp">
+      <Filter>DerivedSources</Filter>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCrypto.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
@@ -12514,6 +12520,9 @@
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCounter.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.h">
+      <Filter>DerivedSources</Filter>
+    </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCrypto.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
@@ -15205,6 +15214,9 @@
     <ClInclude Include="..\platform\graphics\FontCascadeFonts.h">
       <Filter>platform\graphics</Filter>
     </ClInclude>
+    <ClInclude Include="..\Modules\streams\CountQueuingStrategy.h">
+      <Filter>Modules\streams</Filter>
+    </ClInclude>
     <ClInclude Include="..\Modules\streams\ReadableStream.h">
       <Filter>Modules\streams</Filter>
     </ClInclude>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (188126 => 188127)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-08-07 16:35:43 UTC (rev 188127)
@@ -613,6 +613,8 @@
 		1479FAF4109AE37500DED655 /* RenderRubyText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAEC109AE37500DED655 /* RenderRubyText.h */; };
 		148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */; };
+		148B4FF81B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 148B4FF71B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp */; };
+		148B4FFE1B6904AA00C954E4 /* CountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */; };
 		14947FFD12F80CD200A0F631 /* DocumentOrderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */; };
 		14947FFE12F80CD200A0F631 /* DocumentOrderedMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14993BE50B2F2B1C0050497F /* FocusController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14993BE30B2F2B1C0050497F /* FocusController.cpp */; };
@@ -629,6 +631,8 @@
 		14D824080AF93AEB0004F057 /* ChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D824060AF93AEB0004F057 /* ChromeClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DC0D3509FED073007B0235 /* JSNode.cpp */; };
 		14DC0D3809FED073007B0235 /* JSNode.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 14DC0D3609FED073007B0235 /* JSNode.h */; settings = {ATTRIBUTES = (); }; };
+		14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */; };
+		14DCF3B31B6BE2080062D4C2 /* JSCountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */; };
 		14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */; };
 		14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; };
 		14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7745,6 +7749,9 @@
 		14813BF309EDF88E00F757E1 /* IDLParser.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = IDLParser.pm; path = scripts/IDLParser.pm; sourceTree = "<group>"; };
 		148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = "<group>"; };
 		148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = "<group>"; };
+		148B4FF71B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSCountQueuingStrategyCustom.cpp; path = bindings/js/JSCountQueuingStrategyCustom.cpp; sourceTree = "<group>"; };
+		148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CountQueuingStrategy.h; path = Modules/streams/CountQueuingStrategy.h; sourceTree = "<group>"; };
+		148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CountQueuingStrategy.idl; path = Modules/streams/CountQueuingStrategy.idl; sourceTree = "<group>"; };
 		14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOrderedMap.cpp; sourceTree = "<group>"; };
 		14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentOrderedMap.h; sourceTree = "<group>"; };
 		14993BE30B2F2B1C0050497F /* FocusController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FocusController.cpp; sourceTree = "<group>"; };
@@ -7767,6 +7774,8 @@
 		14DC0D0B09FECFA4007B0235 /* Node.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Node.idl; sourceTree = "<group>"; };
 		14DC0D3509FED073007B0235 /* JSNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNode.cpp; sourceTree = "<group>"; };
 		14DC0D3609FED073007B0235 /* JSNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNode.h; sourceTree = "<group>"; };
+		14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSCountQueuingStrategy.cpp; path = JSCountQueuingStrategy.cpp; sourceTree = "<group>"; };
+		14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSCountQueuingStrategy.h; path = JSCountQueuingStrategy.h; sourceTree = "<group>"; };
 		14E836D209F8512000B85AE4 /* Event.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Event.idl; sourceTree = "<group>"; };
 		14E8378309F85D1C00B85AE4 /* JSEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEvent.cpp; sourceTree = "<group>"; };
 		14E8378D09F85D4F00B85AE4 /* JSEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEvent.h; sourceTree = "<group>"; };
@@ -15060,6 +15069,9 @@
 		0867D691FE84028FC02AAC07 /* WebKit */ = {
 			isa = PBXGroup;
 			children = (
+				148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */,
+				148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */,
+				148B4FF71B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp */,
 				65C97AF208EA908800ACD273 /* config.h */,
 				EDEC98020AED7E170059137F /* WebCorePrefix.h */,
 				9307061309E0CA8200B17FE4 /* DerivedSources.make */,
@@ -16733,6 +16745,8 @@
 		656580EC09D12B20000E61D7 /* Derived Sources */ = {
 			isa = PBXGroup;
 			children = (
+				14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */,
+				14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */,
 				656581AC09D14EE6000E61D7 /* CharsetData.cpp */,
 				E406F3FB1198307D009D59D6 /* ColorData.cpp */,
 				6565814409D13043000E61D7 /* CSSGrammar.cpp */,
@@ -25138,6 +25152,7 @@
 				977B3876122883E900B81FF8 /* HTMLScriptRunnerHost.h in Headers */,
 				A81369D8097374F600D74463 /* HTMLSelectElement.h in Headers */,
 				E44613A80CD6331000FADA75 /* HTMLSourceElement.h in Headers */,
+				148B4FFE1B6904AA00C954E4 /* CountQueuingStrategy.h in Headers */,
 				977E2DCE12F0E28300C13379 /* HTMLSourceTracker.h in Headers */,
 				978AD67514130A8D00C7CAE3 /* HTMLSpanElement.h in Headers */,
 				536D5A20193E18E900CE4CAB /* HTMLSrcsetParser.h in Headers */,
@@ -26571,6 +26586,7 @@
 				A79BADA2161E7F3F00C2E652 /* RuleFeature.h in Headers */,
 				A79BADA4161E7F3F00C2E652 /* RuleSet.h in Headers */,
 				2D76BB821945632400CFD29A /* RunLoopObserver.h in Headers */,
+				14DCF3B31B6BE2080062D4C2 /* JSCountQueuingStrategy.h in Headers */,
 				1A569D1F0D7E2B82007C3983 /* runtime_array.h in Headers */,
 				1A569D210D7E2B82007C3983 /* runtime_method.h in Headers */,
 				1A569D230D7E2B82007C3983 /* runtime_object.h in Headers */,
@@ -27603,6 +27619,7 @@
 				A11E8C061B1E28FA0003A7C7 /* moveCursor.png in Resources */,
 				A11E8C071B1E28FE0003A7C7 /* northEastSouthWestResizeCursor.png in Resources */,
 				A11E8C081B1E29020003A7C7 /* northSouthResizeCursor.png in Resources */,
+				148B50001B6904C500C954E4 /* CountQueuingStrategy.idl in Resources */,
 				A11E8C091B1E29070003A7C7 /* northWestSouthEastResizeCursor.png in Resources */,
 				BE8C753110681324001E93F5 /* SpellingDot.png in Resources */,
 				01E6C2E41194B2820050821C /* spelling...@2x.png in Resources */,
@@ -28160,6 +28177,7 @@
 				5C9A7A751AA0F6EA00958ACF /* DFABytecodeCompiler.cpp in Sources */,
 				5C9A7A761AA0F6ED00958ACF /* DFABytecodeInterpreter.cpp in Sources */,
 				26A517FD1AB92238006335DF /* DFAMinimizer.cpp in Sources */,
+				14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */,
 				CD37B39815C1B971006DC898 /* DiagnosticLoggingKeys.cpp in Sources */,
 				CECADFC6153778FF00E37068 /* DictationAlternative.cpp in Sources */,
 				CECADFC8153778FF00E37068 /* DictationCommand.cpp in Sources */,
@@ -28678,6 +28696,7 @@
 				536D5A21193E18EE00CE4CAB /* HTMLSrcsetParser.cpp in Sources */,
 				A871DC260A15205700B12A68 /* HTMLStyleElement.cpp in Sources */,
 				310D71951B335C9D009C7B73 /* ThemeCocoa.cpp in Sources */,
+				148B4FF81B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp in Sources */,
 				D3D4E972130C7CFE007BA540 /* HTMLSummaryElement.cpp in Sources */,
 				A871DB320A150BD600B12A68 /* HTMLTableCaptionElement.cpp in Sources */,
 				A871DB2E0A150BD600B12A68 /* HTMLTableCellElement.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (188126 => 188127)


--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2015-08-07 16:35:43 UTC (rev 188127)
@@ -35,6 +35,9 @@
 #include "JSAudioTrackListCustom.cpp"
 #include "JSBlobCustom.cpp"
 #include "JSCDATASectionCustom.cpp"
+#if ENABLE(STREAMS_API)
+#include "JSCountQueuingStrategyCustom.cpp"
+#endif
 #include "JSCSSRuleCustom.cpp"
 #include "JSCSSRuleListCustom.cpp"
 #include "JSCSSStyleDeclarationCustom.cpp"

Added: trunk/Source/WebCore/bindings/js/JSCountQueuingStrategyCustom.cpp (0 => 188127)


--- trunk/Source/WebCore/bindings/js/JSCountQueuingStrategyCustom.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSCountQueuingStrategyCustom.cpp	2015-08-07 16:35:43 UTC (rev 188127)
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+
+#if ENABLE(STREAMS_API)
+#include "JSCountQueuingStrategy.h"
+
+#include "JSDOMBinding.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+EncodedJSValue JSC_HOST_CALL jsCountQueuingStrategyPrototypeFunctionSize(ExecState*)
+{
+    return JSValue::encode(jsNumber(CountQueuingStrategy::size()));
+}
+
+EncodedJSValue JSC_HOST_CALL constructJSCountQueuingStrategy(ExecState* exec)
+{
+    JSValue value = exec->argument(0);
+    if (value.isNull() || value.isUndefined())
+        return throwVMError(exec, createTypeError(exec, ASCIILiteral("constructor argument cannot be null or undefined")));
+
+    Ref<CountQueuingStrategy> countQueuingStrategy = adoptRef(*new CountQueuingStrategy());
+    JSValue jsCountQueuingStrategy = CREATE_DOM_WRAPPER(jsCast<DOMConstructorObject*>(exec->callee())->globalObject(), CountQueuingStrategy, countQueuingStrategy.ptr());
+
+    if (!value.isObject())
+        return JSValue::encode(jsCountQueuingStrategy);
+
+    JSObject* argumentObject = value.getObject();
+    JSValue jsHighWaterMark = getPropertyFromObject(*exec, *argumentObject, "highWaterMark");
+    if (exec->hadException())
+        return JSValue::encode(jsUndefined());
+    setPropertyToObject(*exec, *jsCountQueuingStrategy.getObject(), "highWaterMark", jsHighWaterMark);
+
+    return JSValue::encode(jsCountQueuingStrategy);
+}
+
+} // namespace WebCore
+
+#endif

Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (188126 => 188127)


--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h	2015-08-07 16:35:43 UTC (rev 188127)
@@ -632,6 +632,17 @@
     static bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, SecurityReportingOption = ReportSecurityError);
     static bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, SecurityReportingOption = ReportSecurityError);
 };
+
+inline JSC::JSValue getPropertyFromObject(JSC::ExecState& exec, JSC::JSObject& object, const char* identifier)
+{
+    return object.get(&exec, JSC::Identifier::fromString(&exec, identifier));
+}
+
+inline void setPropertyToObject(JSC::ExecState& exec, JSC::JSObject& object, const char* name, JSC::JSValue value)
+{
+    JSC::PutPropertySlot propertySlot(&object);
+    JSC::JSObject::put(&object, &exec, JSC::Identifier::fromString(&exec, name), value, propertySlot);
+}
     
 } // namespace WebCore
 

Modified: trunk/Source/WebCore/bindings/js/ReadableJSStream.cpp (188126 => 188127)


--- trunk/Source/WebCore/bindings/js/ReadableJSStream.cpp	2015-08-07 16:04:49 UTC (rev 188126)
+++ trunk/Source/WebCore/bindings/js/ReadableJSStream.cpp	2015-08-07 16:35:43 UTC (rev 188127)
@@ -51,11 +51,6 @@
 
 namespace WebCore {
 
-static inline JSValue getPropertyFromObject(ExecState& exec, JSObject& object, const char* identifier)
-{
-    return object.get(&exec, Identifier::fromString(&exec, identifier));
-}
-
 static inline JSValue callFunction(ExecState& exec, JSValue jsFunction, JSValue thisValue, const ArgList& arguments)
 {
     CallData callData;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to