Source/WebCore/ChangeLog

 12015-08-07 Xabier Rodriguez Calvar <calvaris@igalia.com>
 2
 3 [Streams API] Create CountQueuingStrategy object as per spec
 4 https://bugs.webkit.org/show_bug.cgi?id=146594
 5
 6 Reviewed by Geoffrey Garen.
 7
 8 CountQueuingStrategy is a class part of the Streams API that can be found at
 9 https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
 10 natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
 11 the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
 12 do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
 13 property taking it from the argument.
 14
 15 Covered by current tests
 16 (LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
 17 LayoutTests/streams/reference-implementation/brand-checks.html).
 18
 19 * CMakeLists.txt:
 20 * DerivedSources.cpp:
 21 * DerivedSources.make:
 22 * PlatformMac.cmake:
 23 * WebCore.vcxproj/WebCore.vcxproj:
 24 * WebCore.vcxproj/WebCore.vcxproj.filters:
 25 * WebCore.xcodeproj/project.pbxproj:
 26 * bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
 27 * Modules/streams/CountQueuingStrategy.h: Added.
 28 (WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
 29 (WebCore::CountQueuingStrategy::size): Returns 1.
 30 * Modules/streams/CountQueuingStrategy.idl: Added.
 31 * bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
 32 (WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
 33 (WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
 34 and returns it.
 35 * bindings/js/JSDOMBinding.h:
 36 (WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
 37 (WebCore::setPropertyToObject): Added to create a property into an object.
 38 * bindings/js/ReadableJSStream.cpp:
 39 (WebCore::getPropertyFromObject): Deleted.
 40
1412015-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
242
343 [GStreamer] Do not automatically show PackageKit codec installation notifications

Source/WebCore/CMakeLists.txt

@@set(WebCore_NON_SVG_IDL_FILES
289289 Modules/speech/SpeechSynthesisUtterance.idl
290290 Modules/speech/SpeechSynthesisVoice.idl
291291
 292 Modules/streams/CountQueuingStrategy.idl
292293 Modules/streams/ReadableStream.idl
293294 Modules/streams/ReadableStreamController.idl
294295 Modules/streams/ReadableStreamReader.idl

@@set(WebCore_SOURCES
10881089 bindings/js/JSCanvasRenderingContextCustom.cpp
10891090 bindings/js/JSCharacterDataCustom.cpp
10901091 bindings/js/JSCommandLineAPIHostCustom.cpp
 1092 bindings/js/JSCountQueuingStrategyCustom.cpp
10911093 bindings/js/JSCryptoAlgorithmBuilder.cpp
10921094 bindings/js/JSCryptoAlgorithmDictionary.cpp
10931095 bindings/js/JSCryptoCustom.cpp

Source/WebCore/DerivedSources.cpp

4141#include "JSCanvasPattern.cpp"
4242#include "JSCanvasRenderingContext.cpp"
4343#include "JSCanvasRenderingContext2D.cpp"
 44#if ENABLE(STREAMS_API)
 45#include "JSCountQueuingStrategy.cpp"
 46#endif
4447#if ENABLE(WEBGL)
4548#include "JSEXTBlendMinMax.cpp"
4649#include "JSEXTFragDepth.cpp"

Source/WebCore/DerivedSources.make

@@NON_SVG_BINDING_IDLS = \
174174 $(WebCore)/Modules/speech/SpeechSynthesisEvent.idl \
175175 $(WebCore)/Modules/speech/SpeechSynthesisUtterance.idl \
176176 $(WebCore)/Modules/speech/SpeechSynthesisVoice.idl \
 177 $(WebCore)/Modules/streams/CountQueuingStrategy.idl \
177178 $(WebCore)/Modules/streams/ReadableStream.idl \
178179 $(WebCore)/Modules/streams/ReadableStreamController.idl \
179180 $(WebCore)/Modules/streams/ReadableStreamReader.idl \

Source/WebCore/Modules/streams/CountQueuingStrategy.h

 1/*
 2 * Copyright (C) 2015 Canon Inc.
 3 * Copyright (C) 2015 Igalia S.L.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted, provided that the following conditions
 7 * are required to be met:
 8 *
 9 * 1. Redistributions of source code must retain the above copyright
 10 * notice, this list of conditions and the following disclaimer.
 11 * 2. Redistributions in binary form must reproduce the above copyright
 12 * notice, this list of conditions and the following disclaimer in the
 13 * documentation and/or other materials provided with the distribution.
 14 * 3. Neither the name of Canon Inc. nor the names of
 15 * its contributors may be used to endorse or promote products derived
 16 * from this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 21 * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
 22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 28 */
 29
 30#ifndef CountQueuingStrategy_h
 31#define CountQueuingStrategy_h
 32
 33#if ENABLE(STREAMS_API)
 34
 35#include <wtf/RefCounted.h>
 36
 37namespace WebCore {
 38
 39// CountQueuingStrategy implements a strategy for streams that counts chunks one by one according to the spec. See
 40// https://streams.spec.whatwg.org/#cqs-class
 41class CountQueuingStrategy : public RefCounted<CountQueuingStrategy> {
 42public:
 43 virtual ~CountQueuingStrategy() { }
 44
 45 inline static int size() { return 1; }
 46};
 47
 48}
 49
 50#endif
 51
 52#endif // CountQueuingStrategy_h

Source/WebCore/Modules/streams/CountQueuingStrategy.idl

 1/*
 2 * Copyright (C) 2015 Canon Inc.
 3 * Copyright (C) 2015 Igalia S.L.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted, provided that the following conditions
 7 * are required to be met:
 8 *
 9 * 1. Redistributions of source code must retain the above copyright
 10 * notice, this list of conditions and the following disclaimer.
 11 * 2. Redistributions in binary form must reproduce the above copyright
 12 * notice, this list of conditions and the following disclaimer in the
 13 * documentation and/or other materials provided with the distribution.
 14 * 3. Neither the name of Canon Inc. nor the names of
 15 * its contributors may be used to endorse or promote products derived
 16 * from this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 21 * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
 22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 28 */
 29
 30[
 31 CustomConstructor(any properties),
 32 Conditional=STREAMS_API,
 33] interface CountQueuingStrategy {
 34 [CustomBinding] double size();
 35};

Source/WebCore/PlatformMac.cmake

@@list(REMOVE_ITEM WebCore_SOURCES
537537 ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCommandLineAPIHost.mm
538538 ${DERIVED_SOURCES_WEBCORE_DIR}/DOMConvolverNode.mm
539539 ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCoordinates.mm
 540 ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCountQueuingStrategy.mm
540541 ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCrypto.mm
541542 ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCryptoKey.mm
542543 ${DERIVED_SOURCES_WEBCORE_DIR}/DOMCustomEvent.mm

Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

11731173 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
11741174 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
11751175 </ClCompile>
 1176 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.cpp">
 1177 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 1178 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
 1179 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
 1180 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
 1181 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
 1182 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
 1183 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 1184 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
 1185 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
 1186 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
 1187 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
 1188 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
 1189 </ClCompile>
11761190 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCrypto.cpp">
11771191 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
11781192 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>

1732817342 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
1732917343 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
1733017344 </ClCompile>
 17345 <ClCompile Include="..\bindings\js\JSCountQueuingStrategyCustom.cpp">
 17346 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 17347 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
 17348 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
 17349 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
 17350 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
 17351 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
 17352 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 17353 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
 17354 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
 17355 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
 17356 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
 17357 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
 17358 </ClCompile>
1733117359 <ClCompile Include="..\bindings\js\DOMWrapperWorld.cpp">
1733217360 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
1733317361 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>

1980619834 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCompositionEvent.h" />
1980719835 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCoordinates.h" />
1980819836 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCounter.h" />
 19837 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.h" />
1980919838 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCrypto.h" />
1981019839 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCSSCharsetRule.h" />
1981119840 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCSSFontFaceLoadEvent.h" />

2053720566 <ClInclude Include="..\Modules\notifications\NotificationClient.h" />
2053820567 <ClInclude Include="..\Modules\notifications\WorkerGlobalScopeNotifications.h" />
2053920568 <ClInclude Include="..\Modules\plugins\PluginReplacement.h" />
 20569 <ClInclude Include="..\Modules\streams\CountQueuingStrategy.h" />
2054020570 <ClInclude Include="..\Modules\streams\ReadableStream.h" />
2054120571 <ClInclude Include="..\Modules\streams\ReadableStreamController.h" />
2054220572 <ClInclude Include="..\Modules\streams\ReadableStreamReader.h" />

Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

42514251 <ClCompile Include="..\bindings\js\JSCommandLineAPIHostCustom.cpp">
42524252 <Filter>bindings\js</Filter>
42534253 </ClCompile>
 4254 <ClCompile Include="..\bindings\js\JSCountQueuingStrategyCustom.cpp">
 4255 <Filter>bindings\js</Filter>
 4256 </ClCompile>
42544257 <ClCompile Include="..\bindings\js\JSCSSRuleCustom.cpp">
42554258 <Filter>bindings\js</Filter>
42564259 </ClCompile>

51255128 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCounter.cpp">
51265129 <Filter>DerivedSources</Filter>
51275130 </ClCompile>
 5131 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.cpp">
 5132 <Filter>DerivedSources</Filter>
 5133 </ClCompile>
51285134 <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCrypto.cpp">
51295135 <Filter>DerivedSources</Filter>
51305136 </ClCompile>

1251412520 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCounter.h">
1251512521 <Filter>DerivedSources</Filter>
1251612522 </ClInclude>
 12523 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCountQueuingStrategy.h">
 12524 <Filter>DerivedSources</Filter>
 12525 </ClInclude>
1251712526 <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCrypto.h">
1251812527 <Filter>DerivedSources</Filter>
1251912528 </ClInclude>

1520515214 <ClInclude Include="..\platform\graphics\FontCascadeFonts.h">
1520615215 <Filter>platform\graphics</Filter>
1520715216 </ClInclude>
 15217 <ClInclude Include="..\Modules\streams\CountQueuingStrategy.h">
 15218 <Filter>Modules\streams</Filter>
 15219 </ClInclude>
1520815220 <ClInclude Include="..\Modules\streams\ReadableStream.h">
1520915221 <Filter>Modules\streams</Filter>
1521015222 </ClInclude>

Source/WebCore/WebCore.xcodeproj/project.pbxproj

613613 1479FAF4109AE37500DED655 /* RenderRubyText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAEC109AE37500DED655 /* RenderRubyText.h */; };
614614 148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */; settings = {ATTRIBUTES = (Private, ); }; };
615615 148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */; };
 616 148B4FF81B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 148B4FF71B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp */; };
 617 148B4FFE1B6904AA00C954E4 /* CountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */; };
616618 14947FFD12F80CD200A0F631 /* DocumentOrderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */; };
617619 14947FFE12F80CD200A0F631 /* DocumentOrderedMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
618620 14993BE50B2F2B1C0050497F /* FocusController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14993BE30B2F2B1C0050497F /* FocusController.cpp */; };

629631 14D824080AF93AEB0004F057 /* ChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D824060AF93AEB0004F057 /* ChromeClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
630632 14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DC0D3509FED073007B0235 /* JSNode.cpp */; };
631633 14DC0D3809FED073007B0235 /* JSNode.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 14DC0D3609FED073007B0235 /* JSNode.h */; settings = {ATTRIBUTES = (); }; };
 634 14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */; };
 635 14DCF3B31B6BE2080062D4C2 /* JSCountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */; };
632636 14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */; };
633637 14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; };
634638 14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */; settings = {ATTRIBUTES = (Private, ); }; };

77417745 14813BF309EDF88E00F757E1 /* IDLParser.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = IDLParser.pm; path = scripts/IDLParser.pm; sourceTree = "<group>"; };
77427746 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = "<group>"; };
77437747 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = "<group>"; };
 7748 148B4FF71B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSCountQueuingStrategyCustom.cpp; path = bindings/js/JSCountQueuingStrategyCustom.cpp; sourceTree = "<group>"; };
 7749 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CountQueuingStrategy.h; path = Modules/streams/CountQueuingStrategy.h; sourceTree = "<group>"; };
 7750 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CountQueuingStrategy.idl; path = Modules/streams/CountQueuingStrategy.idl; sourceTree = "<group>"; };
77447751 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOrderedMap.cpp; sourceTree = "<group>"; };
77457752 14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentOrderedMap.h; sourceTree = "<group>"; };
77467753 14993BE30B2F2B1C0050497F /* FocusController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FocusController.cpp; sourceTree = "<group>"; };

77637770 14DC0D0B09FECFA4007B0235 /* Node.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Node.idl; sourceTree = "<group>"; };
77647771 14DC0D3509FED073007B0235 /* JSNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNode.cpp; sourceTree = "<group>"; };
77657772 14DC0D3609FED073007B0235 /* JSNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNode.h; sourceTree = "<group>"; };
 7773 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSCountQueuingStrategy.cpp; path = JSCountQueuingStrategy.cpp; sourceTree = "<group>"; };
 7774 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSCountQueuingStrategy.h; path = JSCountQueuingStrategy.h; sourceTree = "<group>"; };
77667775 14E836D209F8512000B85AE4 /* Event.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Event.idl; sourceTree = "<group>"; };
77677776 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEvent.cpp; sourceTree = "<group>"; };
77687777 14E8378D09F85D4F00B85AE4 /* JSEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEvent.h; sourceTree = "<group>"; };

1505215061 0867D691FE84028FC02AAC07 /* WebKit */ = {
1505315062 isa = PBXGroup;
1505415063 children = (
 15064 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */,
 15065 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */,
 15066 148B4FF71B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp */,
1505515067 65C97AF208EA908800ACD273 /* config.h */,
1505615068 EDEC98020AED7E170059137F /* WebCorePrefix.h */,
1505715069 9307061309E0CA8200B17FE4 /* DerivedSources.make */,

1672116733 656580EC09D12B20000E61D7 /* Derived Sources */ = {
1672216734 isa = PBXGroup;
1672316735 children = (
 16736 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */,
 16737 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */,
1672416738 656581AC09D14EE6000E61D7 /* CharsetData.cpp */,
1672516739 E406F3FB1198307D009D59D6 /* ColorData.cpp */,
1672616740 6565814409D13043000E61D7 /* CSSGrammar.cpp */,

2512625140 977B3876122883E900B81FF8 /* HTMLScriptRunnerHost.h in Headers */,
2512725141 A81369D8097374F600D74463 /* HTMLSelectElement.h in Headers */,
2512825142 E44613A80CD6331000FADA75 /* HTMLSourceElement.h in Headers */,
 25143 148B4FFE1B6904AA00C954E4 /* CountQueuingStrategy.h in Headers */,
2512925144 977E2DCE12F0E28300C13379 /* HTMLSourceTracker.h in Headers */,
2513025145 978AD67514130A8D00C7CAE3 /* HTMLSpanElement.h in Headers */,
2513125146 536D5A20193E18E900CE4CAB /* HTMLSrcsetParser.h in Headers */,

2655726572 A79BADA2161E7F3F00C2E652 /* RuleFeature.h in Headers */,
2655826573 A79BADA4161E7F3F00C2E652 /* RuleSet.h in Headers */,
2655926574 2D76BB821945632400CFD29A /* RunLoopObserver.h in Headers */,
 26575 14DCF3B31B6BE2080062D4C2 /* JSCountQueuingStrategy.h in Headers */,
2656026576 1A569D1F0D7E2B82007C3983 /* runtime_array.h in Headers */,
2656126577 1A569D210D7E2B82007C3983 /* runtime_method.h in Headers */,
2656226578 1A569D230D7E2B82007C3983 /* runtime_object.h in Headers */,

2758927605 A11E8C061B1E28FA0003A7C7 /* moveCursor.png in Resources */,
2759027606 A11E8C071B1E28FE0003A7C7 /* northEastSouthWestResizeCursor.png in Resources */,
2759127607 A11E8C081B1E29020003A7C7 /* northSouthResizeCursor.png in Resources */,
 27608 148B50001B6904C500C954E4 /* CountQueuingStrategy.idl in Resources */,
2759227609 A11E8C091B1E29070003A7C7 /* northWestSouthEastResizeCursor.png in Resources */,
2759327610 BE8C753110681324001E93F5 /* SpellingDot.png in Resources */,
2759427611 01E6C2E41194B2820050821C /* SpellingDot@2x.png in Resources */,

2814628163 5C9A7A751AA0F6EA00958ACF /* DFABytecodeCompiler.cpp in Sources */,
2814728164 5C9A7A761AA0F6ED00958ACF /* DFABytecodeInterpreter.cpp in Sources */,
2814828165 26A517FD1AB92238006335DF /* DFAMinimizer.cpp in Sources */,
 28166 14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */,
2814928167 CD37B39815C1B971006DC898 /* DiagnosticLoggingKeys.cpp in Sources */,
2815028168 CECADFC6153778FF00E37068 /* DictationAlternative.cpp in Sources */,
2815128169 CECADFC8153778FF00E37068 /* DictationCommand.cpp in Sources */,

2866428682 536D5A21193E18EE00CE4CAB /* HTMLSrcsetParser.cpp in Sources */,
2866528683 A871DC260A15205700B12A68 /* HTMLStyleElement.cpp in Sources */,
2866628684 310D71951B335C9D009C7B73 /* ThemeCocoa.cpp in Sources */,
 28685 148B4FF81B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp in Sources */,
2866728686 D3D4E972130C7CFE007BA540 /* HTMLSummaryElement.cpp in Sources */,
2866828687 A871DB320A150BD600B12A68 /* HTMLTableCaptionElement.cpp in Sources */,
2866928688 A871DB2E0A150BD600B12A68 /* HTMLTableCellElement.cpp in Sources */,

Source/WebCore/bindings/js/JSBindingsAllInOne.cpp

3535#include "JSAudioTrackListCustom.cpp"
3636#include "JSBlobCustom.cpp"
3737#include "JSCDATASectionCustom.cpp"
 38#if ENABLE(STREAMS_API)
 39#include "JSCountQueuingStrategyCustom.cpp"
 40#endif
3841#include "JSCSSRuleCustom.cpp"
3942#include "JSCSSRuleListCustom.cpp"
4043#include "JSCSSStyleDeclarationCustom.cpp"

Source/WebCore/bindings/js/JSCountQueuingStrategyCustom.cpp

 1/*
 2 * Copyright (C) 2015 Canon Inc.
 3 * Copyright (C) 2015 Igalia S.L.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted, provided that the following conditions
 7 * are required to be met:
 8 *
 9 * 1. Redistributions of source code must retain the above copyright
 10 * notice, this list of conditions and the following disclaimer.
 11 * 2. Redistributions in binary form must reproduce the above copyright
 12 * notice, this list of conditions and the following disclaimer in the
 13 * documentation and/or other materials provided with the distribution.
 14 * 3. Neither the name of Canon Inc. nor the names of
 15 * its contributors may be used to endorse or promote products derived
 16 * from this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 21 * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
 22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 28 */
 29
 30#include "config.h"
 31
 32#if ENABLE(STREAMS_API)
 33#include "JSCountQueuingStrategy.h"
 34
 35#include "JSDOMBinding.h"
 36
 37using namespace JSC;
 38
 39namespace WebCore {
 40
 41EncodedJSValue JSC_HOST_CALL jsCountQueuingStrategyPrototypeFunctionSize(ExecState*)
 42{
 43 return JSValue::encode(jsNumber(CountQueuingStrategy::size()));
 44}
 45
 46EncodedJSValue JSC_HOST_CALL constructJSCountQueuingStrategy(ExecState* exec)
 47{
 48 JSValue value = exec->argument(0);
 49 if (value.isNull() || value.isUndefined())
 50 return throwVMError(exec, createTypeError(exec, ASCIILiteral("constructor argument cannot be null or undefined")));
 51
 52 Ref<CountQueuingStrategy> countQueuingStrategy = adoptRef(*new CountQueuingStrategy());
 53 JSValue jsCountQueuingStrategy = CREATE_DOM_WRAPPER(jsCast<DOMConstructorObject*>(exec->callee())->globalObject(), CountQueuingStrategy, countQueuingStrategy.ptr());
 54
 55 if (!value.isObject())
 56 return JSValue::encode(jsCountQueuingStrategy);
 57
 58 JSObject* argumentObject = value.getObject();
 59 JSValue jsHighWaterMark = getPropertyFromObject(*exec, *argumentObject, "highWaterMark");
 60 if (exec->hadException())
 61 return JSValue::encode(jsUndefined());
 62 setPropertyToObject(*exec, *jsCountQueuingStrategy.getObject(), "highWaterMark", jsHighWaterMark);
 63
 64 return JSValue::encode(jsCountQueuingStrategy);
 65}
 66
 67} // namespace WebCore
 68
 69#endif

Source/WebCore/bindings/js/JSDOMBinding.h

@@public:
632632 static bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, SecurityReportingOption = ReportSecurityError);
633633 static bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, SecurityReportingOption = ReportSecurityError);
634634};
 635
 636inline JSC::JSValue getPropertyFromObject(JSC::ExecState& exec, JSC::JSObject& object, const char* identifier)
 637{
 638 return object.get(&exec, JSC::Identifier::fromString(&exec, identifier));
 639}
 640
 641inline void setPropertyToObject(JSC::ExecState& exec, JSC::JSObject& object, const char* name, JSC::JSValue value)
 642{
 643 JSC::PutPropertySlot propertySlot(&object);
 644 JSC::JSObject::put(&object, &exec, JSC::Identifier::fromString(&exec, name), value, propertySlot);
 645}
635646
636647} // namespace WebCore
637648

Source/WebCore/bindings/js/ReadableJSStream.cpp

@@using namespace JSC;
5151
5252namespace WebCore {
5353
54 static inline JSValue getPropertyFromObject(ExecState& exec, JSObject& object, const char* identifier)
55 {
56  return object.get(&exec, Identifier::fromString(&exec, identifier));
57 }
58 
5954static inline JSValue callFunction(ExecState& exec, JSValue jsFunction, JSValue thisValue, const ArgList& arguments)
6055{
6156 CallData callData;

LayoutTests/ChangeLog

 12015-08-07 Xabier Rodriguez Calvar <calvaris@igalia.com>
 2
 3 [Streams API] Create CountQueuingStrategy object as per spec
 4 https://bugs.webkit.org/show_bug.cgi?id=146594
 5
 6 Reviewed by Geoffrey Garen.
 7
 8 * js/dom/global-constructors-attributes-expected.txt:
 9 * platform/efl/js/dom/global-constructors-attributes-expected.txt:
 10 * platform/gtk/js/dom/global-constructors-attributes-expected.txt: Updated expectations with
 11 CountQueuingStrategy constructor.
 12 * streams/reference-implementation/brand-checks.html:
 13 * streams/reference-implementation/count-queuing-strategy.html: Removed reference to count-queuing-strategy.js.
 14 * streams/reference-implementation/resources/count-queuing-strategy.js: Removed.
 15 (CountQueuingStrategy): Deleted.
 16 (CountQueuingStrategy.prototype.size): Deleted.
 17
1182015-08-07 Doug Russell <d_russell@apple.com>
219
320 AX: Bug 147737 is causing test failures in Mavericks WK1

LayoutTests/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('ge
223223PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
224224PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
225225PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
 226PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
 227PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
 228PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
 229PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
 230PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
226231PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
227232PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
228233PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('ge
228228PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
229229PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
230230PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
 231PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
 232PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
 233PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
 234PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
 235PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
231236PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
232237PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
233238PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('ge
228228PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').hasOwnProperty('set') is false
229229PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').enumerable is false
230230PASS Object.getOwnPropertyDescriptor(global, 'ConvolverNode').configurable is true
 231PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
 232PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
 233PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
 234PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
 235PASS Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
231236PASS Object.getOwnPropertyDescriptor(global, 'Counter').value is Counter
232237PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('get') is false
233238PASS Object.getOwnPropertyDescriptor(global, 'Counter').hasOwnProperty('set') is false

LayoutTests/streams/reference-implementation/brand-checks.html

22<script src='../../resources/testharness.js'></script>
33<script src='../../resources/testharnessreport.js'></script>
44<script src='resources/streams-utils.js'></script>
5 <script src='resources/count-queuing-strategy.js'></script>
65<script src='resources/byte-length-queuing-strategy.js'></script>
76<script>
87var ReadableStreamReader;

LayoutTests/streams/reference-implementation/count-queuing-strategy.html

22<script src='../../resources/testharness.js'></script>
33<script src='../../resources/testharnessreport.js'></script>
44<script src='resources/streams-utils.js'></script>
5 <script src='resources/count-queuing-strategy.js'></script>
65<script>
76test(function() {
87 new CountQueuingStrategy({ highWaterMark: 4 });

LayoutTests/streams/reference-implementation/resources/count-queuing-strategy.js

1 // FIXME: Remove this file when implemented in WebCore.
2 
3 function CountQueuingStrategy({ highWaterMark }) {
4  createDataProperty(this, 'highWaterMark', highWaterMark);
5 }
6 
7 CountQueuingStrategy.prototype = {
8  size: function(chunk) {
9  return 1;
10  }
11 }