WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-146594-20150804120253.patch (text/plain), 36.20 KB, created by
Xabier RodrÃguez Calvar
on 2015-08-04 03:03:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Xabier RodrÃguez Calvar
Created:
2015-08-04 03:03:01 PDT
Size:
36.20 KB
patch
obsolete
>Subversion Revision: 187826 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c6d9724354c782a3a36a00168da5d22a321cea18..013f09afccdb2a2288ab002916dc3e055f3997db 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,43 @@ >+2015-08-04 Xabier Rodriguez Calvar <calvaris@igalia.com> >+ >+ [Streams API] Create CountQueuingStrategy object as per spec >+ https://bugs.webkit.org/show_bug.cgi?id=146594 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-07-30 Xabier Rodriguez Calvar <calvaris@igalia.com> > > Create [CustomBinding] extended IDL attribute >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index cf423831595a505e48c8bbcf2b8a56dd595a705c..be6ca6080b2279ce10bfc9e1cbe6910ccb9b4436 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -289,6 +289,7 @@ set(WebCore_NON_SVG_IDL_FILES > Modules/speech/SpeechSynthesisUtterance.idl > Modules/speech/SpeechSynthesisVoice.idl > >+ Modules/streams/CountQueuingStrategy.idl > Modules/streams/ReadableStream.idl > Modules/streams/ReadableStreamController.idl > Modules/streams/ReadableStreamReader.idl >@@ -1091,6 +1092,7 @@ set(WebCore_SOURCES > 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 >diff --git a/Source/WebCore/DerivedSources.cpp b/Source/WebCore/DerivedSources.cpp >index 4bf1194323efef7e1e213ceb72ef695fdce20c8e..1e89b91ec42ce7fd6129293a328bd278ac930cba 100644 >--- a/Source/WebCore/DerivedSources.cpp >+++ b/Source/WebCore/DerivedSources.cpp >@@ -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" >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index 00e7880877816df47ba33c894289f62b1dc76ea4..a3b9e9ecbba9d61dbdb9155e8e4241a72b2a4a48 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -174,6 +174,7 @@ NON_SVG_BINDING_IDLS = \ > $(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 \ >diff --git a/Source/WebCore/Modules/streams/CountQueuingStrategy.h b/Source/WebCore/Modules/streams/CountQueuingStrategy.h >new file mode 100644 >index 0000000000000000000000000000000000000000..637ed84519582e0a3a34aad55357472ffb6bf85a >--- /dev/null >+++ b/Source/WebCore/Modules/streams/CountQueuingStrategy.h >@@ -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 stratagy for the streams that counts the 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 >diff --git a/Source/WebCore/Modules/streams/CountQueuingStrategy.idl b/Source/WebCore/Modules/streams/CountQueuingStrategy.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..234dda99d51234e1ed890d12b41f21e69f68b801 >--- /dev/null >+++ b/Source/WebCore/Modules/streams/CountQueuingStrategy.idl >@@ -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(); >+}; >diff --git a/Source/WebCore/PlatformMac.cmake b/Source/WebCore/PlatformMac.cmake >index 861e7e94ed229e98cc127766e98ff1608b6fcc33..d28e5d70e2bef348bd7973a6a98c44b428f0dba9 100644 >--- a/Source/WebCore/PlatformMac.cmake >+++ b/Source/WebCore/PlatformMac.cmake >@@ -537,6 +537,7 @@ list(REMOVE_ITEM WebCore_SOURCES > ${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 >diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj >index c204fcf1604bb12c4e67d56c1f3e9d7f7eda2a8d..d7e55a88832c76207b6e576185782a4e5aea387e 100644 >--- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj >+++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj >@@ -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> >@@ -17331,6 +17345,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> >@@ -19809,6 +19837,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" /> >@@ -20540,6 +20569,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" /> >diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters >index 0fabbd84ecf963fc038cce73449d4c2aadfbb9dd..fd020d7e4216d0e7df8493b4b0bf834319ce617e 100644 >--- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters >+++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters >@@ -4260,6 +4260,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> >@@ -5134,6 +5137,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> >@@ -12532,6 +12538,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> >@@ -15223,6 +15232,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> >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index bd47539d2f259ceb06ec730c7daaef804e6e4372..4ef4491d2f2576ace14abd3bb34dfbf1f5163424 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -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, ); }; }; >@@ -7743,6 +7747,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>"; }; >@@ -7765,6 +7772,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>"; }; >@@ -15056,6 +15065,9 @@ > 0867D691FE84028FC02AAC07 /* WebKit */ = { > isa = PBXGroup; > children = ( >+ 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */, >+ 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */, >+ 148B4FF71B69042100C954E4 /* JSCountQueuingStrategyCustom.cpp */, > 65C97AF208EA908800ACD273 /* config.h */, > EDEC98020AED7E170059137F /* WebCorePrefix.h */, > 9307061309E0CA8200B17FE4 /* DerivedSources.make */, >@@ -16725,6 +16737,8 @@ > 656580EC09D12B20000E61D7 /* Derived Sources */ = { > isa = PBXGroup; > children = ( >+ 14DCF3B01B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp */, >+ 14DCF3B11B6BE2080062D4C2 /* JSCountQueuingStrategy.h */, > 656581AC09D14EE6000E61D7 /* CharsetData.cpp */, > E406F3FB1198307D009D59D6 /* ColorData.cpp */, > 6565814409D13043000E61D7 /* CSSGrammar.cpp */, >@@ -25134,6 +25148,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 */, >@@ -26564,6 +26579,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 */, >@@ -27596,6 +27612,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 /* SpellingDot@2x.png in Resources */, >@@ -28155,6 +28172,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 */, >@@ -28673,6 +28691,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 */, >diff --git a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp >index 476b6b0ce2be71fd481bb8439bf0335716efc66f..15df7c5e57c0b003195805306a3cee80f80bc6f6 100644 >--- a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp >+++ b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp >@@ -129,6 +129,9 @@ > #include "JSSVGLengthCustom.cpp" > #include "JSSVGPathSegCustom.cpp" > #include "JSStorageCustom.cpp" >+#if ENABLE(STREAMS_API) >+#include "JSCountQueuingStrategyCustom.cpp" >+#endif > #include "JSStyleSheetCustom.cpp" > #include "JSStyleSheetListCustom.cpp" > #include "JSTextCustom.cpp" >diff --git a/Source/WebCore/bindings/js/JSCountQueuingStrategyCustom.cpp b/Source/WebCore/bindings/js/JSCountQueuingStrategyCustom.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..9696a2cf99d50cad7fb0cc7ce6b11ef8a3d7a571 >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSCountQueuingStrategyCustom.cpp >@@ -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* state) >+{ >+ JSValue value = state->argument(0); >+ if (value.isNull() || value.isUndefined()) >+ return throwVMError(state, createTypeError(state, ASCIILiteral("constructor argument cannot be null or undefined"))); >+ >+ Ref<CountQueuingStrategy> countQueuingStrategy = adoptRef(*new CountQueuingStrategy()); >+ JSValue jsCountQueuingStrategy = CREATE_DOM_WRAPPER(jsCast<DOMConstructorObject*>(state->callee())->globalObject(), CountQueuingStrategy, countQueuingStrategy.ptr()); >+ >+ if (!value.isObject()) >+ return JSValue::encode(jsCountQueuingStrategy); >+ >+ JSObject* argumentObject = value.getObject(); >+ JSValue jsHighWaterMark = getPropertyFromObject(*state, *argumentObject, "highWaterMark"); >+ if (state->hadException()) >+ return JSValue::encode(jsUndefined()); >+ setPropertyToObject(*state, *jsCountQueuingStrategy.getObject(), "highWaterMark", jsHighWaterMark); >+ >+ return JSValue::encode(jsCountQueuingStrategy); >+} >+ >+} // namespace WebCore >+ >+#endif >diff --git a/Source/WebCore/bindings/js/JSDOMBinding.h b/Source/WebCore/bindings/js/JSDOMBinding.h >index 757519428a49e553afb50d63627b181cc97ba76f..1a54b8f239105476a78f372ec70d892c45563b18 100644 >--- a/Source/WebCore/bindings/js/JSDOMBinding.h >+++ b/Source/WebCore/bindings/js/JSDOMBinding.h >@@ -632,6 +632,17 @@ public: > static bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, SecurityReportingOption = ReportSecurityError); > static bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, SecurityReportingOption = ReportSecurityError); > }; >+ >+inline JSC::JSValue getPropertyFromObject(JSC::ExecState& state, JSC::JSObject& object, const char* identifier) >+{ >+ return object.get(&state, JSC::Identifier::fromString(&state, identifier)); >+} >+ >+inline void setPropertyToObject(JSC::ExecState& state, JSC::JSObject& targetObject, const char* name, JSC::JSValue value) >+{ >+ JSC::PutPropertySlot propertySlot(&targetObject); >+ targetObject.put(&targetObject, &state, JSC::Identifier::fromString(&state, name), value, propertySlot); >+} > > } // namespace WebCore > >diff --git a/Source/WebCore/bindings/js/ReadableJSStream.cpp b/Source/WebCore/bindings/js/ReadableJSStream.cpp >index 79b666c1d2a13a527d7bc78a6199955564dce41d..406658aed581ed8fd26e1fb9614a1c3dcc573b67 100644 >--- a/Source/WebCore/bindings/js/ReadableJSStream.cpp >+++ b/Source/WebCore/bindings/js/ReadableJSStream.cpp >@@ -51,11 +51,6 @@ using namespace JSC; > > 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; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fd47ddb1e7792f59e5e504a219c43d669406d83d..37e7fe6ce224dcdbd60a41fa91755de97ce6b0ff 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2015-08-04 Xabier Rodriguez Calvar <calvaris@igalia.com> >+ >+ [Streams API] Create CountQueuingStrategy object as per spec >+ https://bugs.webkit.org/show_bug.cgi?id=146594 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-03 Simon Fraser <simon.fraser@apple.com> > > Add WK1 Mac result for this test. >diff --git a/LayoutTests/streams/reference-implementation/brand-checks.html b/LayoutTests/streams/reference-implementation/brand-checks.html >index 197b8a6ccd50ea96bcf05f363382d532778953d3..1a57af751a0da34cf7bae5b0b48e5f2043c74d36 100644 >--- a/LayoutTests/streams/reference-implementation/brand-checks.html >+++ b/LayoutTests/streams/reference-implementation/brand-checks.html >@@ -2,7 +2,6 @@ > <script src='../../resources/testharness.js'></script> > <script src='../../resources/testharnessreport.js'></script> > <script src='resources/streams-utils.js'></script> >-<script src='resources/count-queuing-strategy.js'></script> > <script src='resources/byte-length-queuing-strategy.js'></script> > <script> > var ReadableStreamReader; >diff --git a/LayoutTests/streams/reference-implementation/count-queuing-strategy.html b/LayoutTests/streams/reference-implementation/count-queuing-strategy.html >index f027376960fc44e9f36bf2d4fb65dc897e1b8cdb..12d5d109a12307e69329b703268ecd06b974a737 100644 >--- a/LayoutTests/streams/reference-implementation/count-queuing-strategy.html >+++ b/LayoutTests/streams/reference-implementation/count-queuing-strategy.html >@@ -2,7 +2,6 @@ > <script src='../../resources/testharness.js'></script> > <script src='../../resources/testharnessreport.js'></script> > <script src='resources/streams-utils.js'></script> >-<script src='resources/count-queuing-strategy.js'></script> > <script> > test(function() { > new CountQueuingStrategy({ highWaterMark: 4 }); >diff --git a/LayoutTests/streams/reference-implementation/resources/count-queuing-strategy.js b/LayoutTests/streams/reference-implementation/resources/count-queuing-strategy.js >deleted file mode 100644 >index 5fc21f2ffc2b7ef348c8776e8ef4037fa328a73e..0000000000000000000000000000000000000000 >--- a/LayoutTests/streams/reference-implementation/resources/count-queuing-strategy.js >+++ /dev/null >@@ -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; >- } >-}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 146594
:
256109
|
256298
|
256972
|
257087
|
257091
|
257094
|
257113
|
257168
|
257177
|
257192
|
257260
|
257348
|
257647
|
257649
|
257752
|
257949
|
257955
|
258061
|
258169
|
258480
|
258481
|
258484
|
258485
|
258489
|
258490
|
258491
|
258493
|
258494
|
258497
|
258498