[webkit-changes] [215317] trunk/LayoutTests
Title: [215317] trunk/LayoutTests Revision 215317 Author an...@apple.com Date 2017-04-13 01:31:54 -0700 (Thu, 13 Apr 2017) Log Message Try to unflake a test. * http/tests/cache/disk-cache/disk-cache-media-small.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-media-small.html Diff Modified: trunk/LayoutTests/ChangeLog (215316 => 215317) --- trunk/LayoutTests/ChangeLog 2017-04-13 06:55:50 UTC (rev 215316) +++ trunk/LayoutTests/ChangeLog 2017-04-13 08:31:54 UTC (rev 215317) @@ -1,3 +1,9 @@ +2017-04-13 Antti Koivisto + +Try to unflake a test. + +* http/tests/cache/disk-cache/disk-cache-media-small.html: + 2017-04-12 Brady Eidson QuotaExceededError when saving to localStorage in private mode. Modified: trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-media-small.html (215316 => 215317) --- trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-media-small.html 2017-04-13 06:55:50 UTC (rev 215316) +++ trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-media-small.html 2017-04-13 08:31:54 UTC (rev 215317) @@ -27,7 +27,7 @@ { const ranges = internals.mediaResponseContentRanges(media); const sources = internals.mediaResponseSources(media); -for (i = 0; i < ranges.length; ++i) +for (i = 0; i < Math.min(2, ranges.length); ++i) logdiv.innerHTML += `Content range: ${ranges[i]}, Response source: ${sources[i]}`; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [215318] trunk/Source
Title: [215318] trunk/Source Revision 215318 Author utatane@gmail.com Date 2017-04-13 07:17:00 -0700 (Thu, 13 Apr 2017) Log Message [JSC] Use proper ifdef guard for code using MachineContext https://bugs.webkit.org/show_bug.cgi?id=170800 Reviewed by Carlos Alberto Lopez Perez. Source/_javascript_Core: This patch drops MachineContext use if it is not available. This situation can be considered like, building WebKit with musl. In that case, we simply disable features that rely on MachineContext. Examples are wasm fast memory, sampling profiler, and code profiling. * runtime/Options.cpp: (JSC::overrideDefaults): * tools/CodeProfiling.cpp: (JSC::CodeProfiling::begin): (JSC::CodeProfiling::end): Previously, PLATFORM(GTK) is excluded. But it is not obvious why it is excluded. This patch just includes such platforms. * wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::enableFastMemory): Source/WTF: SamplingProfiler and FastMemory rely on MachineContext feature. * wtf/Platform.h: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/runtime/Options.cpp trunk/Source/_javascript_Core/tools/CodeProfiling.cpp trunk/Source/_javascript_Core/wasm/WasmFaultSignalHandler.cpp trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/Platform.h Diff Modified: trunk/Source/_javascript_Core/ChangeLog (215317 => 215318) --- trunk/Source/_javascript_Core/ChangeLog 2017-04-13 08:31:54 UTC (rev 215317) +++ trunk/Source/_javascript_Core/ChangeLog 2017-04-13 14:17:00 UTC (rev 215318) @@ -1,3 +1,26 @@ +2017-04-13 Yusuke Suzuki + +[JSC] Use proper ifdef guard for code using MachineContext +https://bugs.webkit.org/show_bug.cgi?id=170800 + +Reviewed by Carlos Alberto Lopez Perez. + +This patch drops MachineContext use if it is not available. +This situation can be considered like, building WebKit with musl. +In that case, we simply disable features that rely on MachineContext. +Examples are wasm fast memory, sampling profiler, and code profiling. + +* runtime/Options.cpp: +(JSC::overrideDefaults): +* tools/CodeProfiling.cpp: +(JSC::CodeProfiling::begin): +(JSC::CodeProfiling::end): +Previously, PLATFORM(GTK) is excluded. But it is not obvious why it is excluded. +This patch just includes such platforms. + +* wasm/WasmFaultSignalHandler.cpp: +(JSC::Wasm::enableFastMemory): + 2017-04-12 Dan Bernstein [Mac] Future-proof .xcconfig files Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (215317 => 215318) --- trunk/Source/_javascript_Core/runtime/Options.cpp 2017-04-13 08:31:54 UTC (rev 215317) +++ trunk/Source/_javascript_Core/runtime/Options.cpp 2017-04-13 14:17:00 UTC (rev 215318) @@ -346,6 +346,10 @@ #if !ENABLE(SIGNAL_BASED_VM_TRAPS) Options::usePollingTraps() = true; #endif + +#if !ENABLE(WEBASSEMBLY_FAST_MEMORY) +Options::useWebAssemblyFastMemory() = false; +#endif } static void recomputeDependentOptions() Modified: trunk/Source/_javascript_Core/tools/CodeProfiling.cpp (215317 => 215318) --- trunk/Source/_javascript_Core/tools/CodeProfiling.cpp 2017-04-13 08:31:54 UTC (rev 215317) +++ trunk/Source/_javascript_Core/tools/CodeProfiling.cpp 2017-04-13 14:17:00 UTC (rev 215318) @@ -34,7 +34,7 @@ #include #endif -#if OS(LINUX) || OS(DARWIN) +#if HAVE(MACHINE_CONTEXT) #include #endif @@ -49,7 +49,7 @@ #pragma clang diagnostic ignored "-Wmissing-noreturn" #endif -#if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) +#if HAVE(MACHINE_CONTEXT) // Helper function to start & stop the timer. // Presently we're using the wall-clock timer, since this seems to give the best results. static void setProfileTimer(unsigned usec) @@ -67,7 +67,7 @@ #pragma clang diagnostic pop #endif -#if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) +#if HAVE(MACHINE_CONTEXT) static void profilingTimer(int, siginfo_t*, void* uap) { mcontext_t context = static_cast(uap)->uc_mcontext; @@ -136,7 +136,7 @@ if (alreadyProfiling) return; -#if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) +#if HAVE(MACHINE_CONTEXT) // Regsiter a signal handler & itimer. struct sigaction action; action.sa_sigaction = reinterpret_cast(profilingTimer); @@ -160,7 +160,7 @@ if (s_profileStack) return; -#if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86)) +#if HAVE(MACHINE_CONTEXT) // Stop profiling setProfileTimer(0); #endif Modified: trunk/Source/_javascript_Core/wasm/WasmFaultSignalHandler.cpp (215317 => 215318) --- trunk/Source/_javascript_Core/wasm/WasmFaultSignalHandler.cpp 2017-04-13 08:31:54 UTC (rev 215317) +++ trunk/Source/_javascript_Core/wasm/WasmFaultSignalHandler.cpp 2017-04-13 14:17:00 UTC (rev 215318) @@ -41,16 +41,18 @@ namespace JSC { namespace Wasm { - namespace { stat
[webkit-changes] [215319] trunk
Title: [215319] trunk Revision 215319 Author achristen...@apple.com Date 2017-04-13 08:28:15 -0700 (Thu, 13 Apr 2017) Log Message Clean up SharedBuffer public functions https://bugs.webkit.org/show_bug.cgi?id=170795 Reviewed by Andreas Kling. Source/WebCore: Make some member functions that are now only used internally private. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::append): (WebCore::SharedBuffer::platformDataSize): Deleted. * platform/SharedBuffer.h: Tools: * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/archive/mhtml/MHTMLParser.cpp trunk/Source/WebCore/platform/SharedBuffer.cpp trunk/Source/WebCore/platform/SharedBuffer.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (215318 => 215319) --- trunk/Source/WebCore/ChangeLog 2017-04-13 14:17:00 UTC (rev 215318) +++ trunk/Source/WebCore/ChangeLog 2017-04-13 15:28:15 UTC (rev 215319) @@ -1,3 +1,17 @@ +2017-04-12 Alex Christensen + +Clean up SharedBuffer public functions +https://bugs.webkit.org/show_bug.cgi?id=170795 + +Reviewed by Andreas Kling. + +Make some member functions that are now only used internally private. + +* platform/SharedBuffer.cpp: +(WebCore::SharedBuffer::append): +(WebCore::SharedBuffer::platformDataSize): Deleted. +* platform/SharedBuffer.h: + 2017-04-12 Dan Bernstein [Mac] Future-proof .xcconfig files Modified: trunk/Source/WebCore/loader/archive/mhtml/MHTMLParser.cpp (215318 => 215319) --- trunk/Source/WebCore/loader/archive/mhtml/MHTMLParser.cpp 2017-04-13 14:17:00 UTC (rev 215318) +++ trunk/Source/WebCore/loader/archive/mhtml/MHTMLParser.cpp 2017-04-13 15:28:15 UTC (rev 215319) @@ -154,7 +154,7 @@ LOG_ERROR("Binary contents requires end of part"); return nullptr; } -content->append(part); +content->append(WTFMove(part)); m_lineReader.setSeparator("\r\n"); Vector nextChars; if (m_lineReader.peek(nextChars, 2) != 2) { Modified: trunk/Source/WebCore/platform/SharedBuffer.cpp (215318 => 215319) --- trunk/Source/WebCore/platform/SharedBuffer.cpp 2017-04-13 14:17:00 UTC (rev 215318) +++ trunk/Source/WebCore/platform/SharedBuffer.cpp 2017-04-13 15:28:15 UTC (rev 215319) @@ -231,7 +231,7 @@ #endif } -void SharedBuffer::append(const Vector& data) +void SharedBuffer::append(Vector&& data) { append(data.data(), data.size()); } @@ -416,13 +416,6 @@ return nullptr; } -inline unsigned SharedBuffer::platformDataSize() const -{ -ASSERT_NOT_REACHED(); - -return 0; -} - inline bool SharedBuffer::maybeAppendPlatformData(SharedBuffer&) { return false; Modified: trunk/Source/WebCore/platform/SharedBuffer.h (215318 => 215319) --- trunk/Source/WebCore/platform/SharedBuffer.h 2017-04-13 14:17:00 UTC (rev 215318) +++ trunk/Source/WebCore/platform/SharedBuffer.h 2017-04-13 15:28:15 UTC (rev 215319) @@ -69,8 +69,8 @@ #endif #if USE(CF) WEBCORE_EXPORT RetainPtr createCFData(); -WEBCORE_EXPORT CFDataRef existingCFData(); WEBCORE_EXPORT static Ref wrapCFData(CFDataRef); +WEBCORE_EXPORT void append(CFDataRef); #endif #if USE(SOUP) @@ -88,21 +88,14 @@ WEBCORE_EXPORT unsigned size() const; - bool isEmpty() const { return !size(); } WEBCORE_EXPORT void append(SharedBuffer&); WEBCORE_EXPORT void append(const char*, unsigned); -WEBCORE_EXPORT void append(const Vector&); +WEBCORE_EXPORT void append(Vector&&); WEBCORE_EXPORT void clear(); -const char* platformData() const; -unsigned platformDataSize() const; -#if USE(NETWORK_CFDATA_ARRAY_CALLBACK) -WEBCORE_EXPORT void append(CFDataRef); -#endif - WEBCORE_EXPORT Ref copy() const; // Return the number of consecutive bytes after "position". "data" @@ -166,9 +159,13 @@ mutable Vector m_segments; #endif +unsigned platformDataSize() const; +const char* platformData() const; + #if USE(CF) explicit SharedBuffer(CFDataRef); RetainPtr m_cfData; +CFDataRef existingCFData(); #endif #if USE(SOUP) Modified: trunk/Tools/ChangeLog (215318 => 215319) --- trunk/Tools/ChangeLog 2017-04-13 14:17:00 UTC (rev 215318) +++ trunk/Tools/ChangeLog 2017-04-13 15:28:15 UTC (rev 215319) @@ -1,3 +1,13 @@ +2017-04-12 Alex Christensen + +Clean up SharedBuffer public functions +https://bugs.webkit.org/show_bug.cgi?id=170795 + +Reviewed by Andreas Kling. + +* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: +(TestWebKitAPI::TEST_F): + 2017-04-12 Dan Bernstein [Mac] Future-proof .xcconfig files Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp (215318 => 215319) --- trunk/Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp 2017-04-13 14:17:
[webkit-changes] [215320] trunk
Title: [215320] trunk Revision 215320 Author hy...@apple.com Date 2017-04-13 09:37:00 -0700 (Thu, 13 Apr 2017) Log Message Rendering flexbox children across columns https://bugs.webkit.org/show_bug.cgi?id=164166 Reviewed by Zalan Bujtas. Source/WebCore: Added fast/multicol/flexbox-rows.html * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::adjustForUnsplittableChild): LayoutTests: * fast/multicol/flexbox-rows-expected.html: Added. * fast/multicol/flexbox-rows.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/ios-simulator/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderBlockFlow.cpp Added Paths trunk/LayoutTests/fast/multicol/flexbox-rows-expected.html trunk/LayoutTests/fast/multicol/flexbox-rows.html Diff Modified: trunk/LayoutTests/ChangeLog (215319 => 215320) --- trunk/LayoutTests/ChangeLog 2017-04-13 15:28:15 UTC (rev 215319) +++ trunk/LayoutTests/ChangeLog 2017-04-13 16:37:00 UTC (rev 215320) @@ -1,3 +1,14 @@ +2017-04-13 Dave Hyatt + +Rendering flexbox children across columns +https://bugs.webkit.org/show_bug.cgi?id=164166 + + +Reviewed by Zalan Bujtas. + +* fast/multicol/flexbox-rows-expected.html: Added. +* fast/multicol/flexbox-rows.html: Added. + 2017-04-13 Antti Koivisto Try to unflake a test. Added: trunk/LayoutTests/fast/multicol/flexbox-rows-expected.html (0 => 215320) --- trunk/LayoutTests/fast/multicol/flexbox-rows-expected.html (rev 0) +++ trunk/LayoutTests/fast/multicol/flexbox-rows-expected.html 2017-04-13 16:37:00 UTC (rev 215320) @@ -0,0 +1,56 @@ + + +.wrapper { +-webkit-column-count: 2; +-moz-column-count: 2; +column-count: 2; +} + + .pad-rows .row { +padding-top: 12px; +} + +/** + * Other styles + */ +.description { +margin: 0 1em; +font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +font-size: 14px; +line-height: 1.5; +} +.description > ul > li + li { +margin-top: 1em; +} +.description em { +font-size: 0.875em; +color: darkgray; +} + +input { +margin-left: 1em; +} + +hr { +margin: 1em 0; +} + + + + +Label +Label +Label +Label +Label + + + +Label +Label +Label +Label +Label + + + Added: trunk/LayoutTests/fast/multicol/flexbox-rows.html (0 => 215320) --- trunk/LayoutTests/fast/multicol/flexbox-rows.html (rev 0) +++ trunk/LayoutTests/fast/multicol/flexbox-rows.html 2017-04-13 16:37:00 UTC (rev 215320) @@ -0,0 +1,62 @@ + + +.wrapper { +-webkit-column-count: 2; +-moz-column-count: 2; +column-count: 2; +} + +.row { +display: -webkit-box; +display: -ms-flexbox; +display: flex; +} + +.pad-rows .row { +padding-top: 12px; +} + +/** + * Other styles + */ +.description { +margin: 0 1em; +font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +font-size: 14px; +line-height: 1.5; +} +.description > ul > li + li { +margin-top: 1em; +} +.description em { +font-size: 0.875em; +color: darkgray; +} + +input { +margin-left: 1em; +} + +hr { +margin: 1em 0; +} + + + + +Label +Label +Label +Label +Label + + + +Label +Label +Label +Label +Label + + + Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (215319 => 215320) --- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-04-13 15:28:15 UTC (rev 215319) +++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-04-13 16:37:00 UTC (rev 215320) @@ -3,3 +3,5 @@ # See http://trac.webkit.org/wiki/TestExpectations for more information on this file. # +fast/multicol/flexbox-rows.html [ Skip ] + Modified: trunk/Source/WebCore/ChangeL
[webkit-changes] [215321] trunk
Title: [215321] trunk Revision 215321 Author commit-qu...@webkit.org Date 2017-04-13 09:38:58 -0700 (Thu, 13 Apr 2017) Log Message onnegotiationneeded should only be called once https://bugs.webkit.org/show_bug.cgi?id=170785 Patch by Youenn Fablet on 2017-04-13 Reviewed by Alex Christensen. Source/WebCore: Covered by updated test. Disabling explicit call to markAsNeedingNegotiation in case libwebrtc is used as libwebrtc is calling it. Making sure removeTrack gets notified up to libwebrtc. * Modules/mediastream/PeerConnectionBackend.h: (WebCore::PeerConnectionBackend::notifyRemovedTrack): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::addTrack): (WebCore::RTCPeerConnection::removeTrack): (WebCore::RTCPeerConnection::completeAddTransceiver): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::removeTrack): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::LibWebRTCPeerConnectionBackend::notifyRemovedTrack): * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: LayoutTests: * webrtc/negotiatedneeded-event-addStream.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/webrtc/negotiatedneeded-event-addStream.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h Diff Modified: trunk/LayoutTests/ChangeLog (215320 => 215321) --- trunk/LayoutTests/ChangeLog 2017-04-13 16:37:00 UTC (rev 215320) +++ trunk/LayoutTests/ChangeLog 2017-04-13 16:38:58 UTC (rev 215321) @@ -1,3 +1,12 @@ +2017-04-13 Youenn Fablet + +onnegotiationneeded should only be called once +https://bugs.webkit.org/show_bug.cgi?id=170785 + +Reviewed by Alex Christensen. + +* webrtc/negotiatedneeded-event-addStream.html: + 2017-04-13 Dave Hyatt Rendering flexbox children across columns Modified: trunk/LayoutTests/webrtc/negotiatedneeded-event-addStream.html (215320 => 215321) --- trunk/LayoutTests/webrtc/negotiatedneeded-event-addStream.html 2017-04-13 16:37:00 UTC (rev 215320) +++ trunk/LayoutTests/webrtc/negotiatedneeded-event-addStream.html 2017-04-13 16:38:58 UTC (rev 215321) @@ -19,7 +19,11 @@ return navigator.mediaDevices.getUserMedia({ video: true}).then((stream) => { return new Promise((resolve, reject) => { var pc = new RTCPeerConnection(); -pc._onnegotiationneeded_ = () => { resolve(); }; +var count = 0; +pc._onnegotiationneeded_ = () => { +assert_equals(count++, 0, "Should only be called once"); +setTimeout(resolve, 500); +}; pc.addTrack(stream.getVideoTracks()[0], stream); }); }); Modified: trunk/Source/WebCore/ChangeLog (215320 => 215321) --- trunk/Source/WebCore/ChangeLog 2017-04-13 16:37:00 UTC (rev 215320) +++ trunk/Source/WebCore/ChangeLog 2017-04-13 16:38:58 UTC (rev 215321) @@ -1,3 +1,28 @@ +2017-04-13 Youenn Fablet + +onnegotiationneeded should only be called once +https://bugs.webkit.org/show_bug.cgi?id=170785 + +Reviewed by Alex Christensen. + +Covered by updated test. + +Disabling explicit call to markAsNeedingNegotiation in case libwebrtc is used as libwebrtc is calling it. +Making sure removeTrack gets notified up to libwebrtc. + +* Modules/mediastream/PeerConnectionBackend.h: +(WebCore::PeerConnectionBackend::notifyRemovedTrack): +* Modules/mediastream/RTCPeerConnection.cpp: +(WebCore::RTCPeerConnection::addTrack): +(WebCore::RTCPeerConnection::removeTrack): +(WebCore::RTCPeerConnection::completeAddTransceiver): +* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: +(WebCore::LibWebRTCMediaEndpoint::removeTrack): +* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: +* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: +(WebCore::LibWebRTCPeerConnectionBackend::notifyRemovedTrack): +* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: + 2017-04-13 Dave Hyatt Rendering flexbox children across columns Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h (215320 => 215321) --- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2017-04-13 16:37:00 UTC (rev 215320) +++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2017-04-13 16:38:58 UTC (rev 215321) @@ -96,6 +96,
[webkit-changes] [215322] trunk
Title: [215322] trunk Revision 215322 Author commit-qu...@webkit.org Date 2017-04-13 09:40:25 -0700 (Thu, 13 Apr 2017) Log Message [Readable Streams API] Implement cloneArrayBuffer in WebCore https://bugs.webkit.org/show_bug.cgi?id=170008 Patch by Romain Bellessort on 2017-04-13 Reviewed by Youenn Fablet. Source/WebCore: Implemented cloneArrayBuffer based on existing structuredCloneArrayBuffer implementation. The code has been factorized so that both cloneArrayBuffer and structuredCloneArrayBuffer rely on the same code (which is basically the previous implementation of structuredCloneArrayBuffer + the ability to clone only a part of considered buffer). Test: streams/clone-array-buffer.html * Modules/streams/ReadableByteStreamInternals.js: Deleted cloneArrayBuffer JS implementation. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Add cloneArrayBuffer private declaration. * bindings/js/StructuredClone.cpp: (WebCore::cloneArrayBufferImpl): Added (mostly based on previous structuredCloneArrayBuffer). (WebCore::cloneArrayBuffer): Added. (WebCore::structuredCloneArrayBuffer): Updated. * bindings/js/StructuredClone.h: Added cloneArrayBuffer declaration. * bindings/js/WebCoreBuiltinNames.h: Added cloneArrayBuffer declaration. * testing/Internals.cpp: Added support for testing cloneArrayBuffer. * testing/Internals.h: Added support for testing cloneArrayBuffer. * testing/Internals.idl: Added support for testing cloneArrayBuffer. LayoutTests: Added test to check cloneArrayBuffer behaviour. * streams/clone-array-buffer-expected.txt: Added. * streams/clone-array-buffer.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/streams/ReadableByteStreamInternals.js trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp trunk/Source/WebCore/bindings/js/StructuredClone.cpp trunk/Source/WebCore/bindings/js/StructuredClone.h trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/Internals.h trunk/Source/WebCore/testing/Internals.idl Added Paths trunk/LayoutTests/streams/clone-array-buffer-expected.txt trunk/LayoutTests/streams/clone-array-buffer.html Diff Modified: trunk/LayoutTests/ChangeLog (215321 => 215322) --- trunk/LayoutTests/ChangeLog 2017-04-13 16:38:58 UTC (rev 215321) +++ trunk/LayoutTests/ChangeLog 2017-04-13 16:40:25 UTC (rev 215322) @@ -1,3 +1,15 @@ +2017-04-13 Romain Bellessort + +[Readable Streams API] Implement cloneArrayBuffer in WebCore +https://bugs.webkit.org/show_bug.cgi?id=170008 + +Reviewed by Youenn Fablet. + +Added test to check cloneArrayBuffer behaviour. + +* streams/clone-array-buffer-expected.txt: Added. +* streams/clone-array-buffer.html: Added. + 2017-04-13 Youenn Fablet onnegotiationneeded should only be called once Added: trunk/LayoutTests/streams/clone-array-buffer-expected.txt (0 => 215322) --- trunk/LayoutTests/streams/clone-array-buffer-expected.txt (rev 0) +++ trunk/LayoutTests/streams/clone-array-buffer-expected.txt 2017-04-13 16:40:25 UTC (rev 215322) @@ -0,0 +1,3 @@ + +PASS Test cloneArrayBuffer implementation + Added: trunk/LayoutTests/streams/clone-array-buffer.html (0 => 215322) --- trunk/LayoutTests/streams/clone-array-buffer.html (rev 0) +++ trunk/LayoutTests/streams/clone-array-buffer.html 2017-04-13 16:40:25 UTC (rev 215322) @@ -0,0 +1,22 @@ + + + + + +'use strict'; + +const CloneArrayBuffer = internals.cloneArrayBuffer.bind(internals); + +test(function() { +const typedArray = new Uint8Array([3, 5, 7]); +const clonedBuffer = CloneArrayBuffer(typedArray.buffer, 1, 1); +const otherArray = new Uint8Array(clonedBuffer); +assert_equals(otherArray.byteLength, 1); +assert_equals(otherArray.byteOffset, 0); +assert_equals(otherArray.buffer.byteLength, 1); +assert_equals(otherArray[0], 5); +// Check that when typedArray is modified, otherArray is not modified. +typedArray[1] = 0; +assert_equals(otherArray[0], 5); +}, "Test cloneArrayBuffer implementation"); + Modified: trunk/Source/WebCore/ChangeLog (215321 => 215322) --- trunk/Source/WebCore/ChangeLog 2017-04-13 16:38:58 UTC (rev 215321) +++ trunk/Source/WebCore/ChangeLog 2017-04-13 16:40:25 UTC (rev 215322) @@ -1,3 +1,31 @@ +2017-04-13 Romain Bellessort + +[Readable Streams API] Implement cloneArrayBuffer in WebCore +https://bugs.webkit.org/show_bug.cgi?id=170008 + +Reviewed by Youenn Fablet. + +Implemented cloneArrayBuffer based on existing structuredCloneArrayBuffer +implementation. The code has been factorized so that both cloneArrayBuffer +and structuredCloneArrayBuffer rely on the same code (which is basically +the previous implementation of structuredCloneArrayBuffer + the ability +to clone only a part of
[webkit-changes] [215323] trunk/LayoutTests
Title: [215323] trunk/LayoutTests Revision 215323 Author commit-qu...@webkit.org Date 2017-04-13 09:54:32 -0700 (Thu, 13 Apr 2017) Log Message Add some more WebRTC tests https://bugs.webkit.org/show_bug.cgi?id=170796 Patch by Youenn Fablet on 2017-04-13 Reviewed by Eric Carlson. * webrtc/multi-video-expected.txt: Added. * webrtc/multi-video.html: Added. * webrtc/video-with-data-channel-expected.txt: Added. * webrtc/video-with-data-channel.html: Added. Modified Paths trunk/LayoutTests/ChangeLog Added Paths trunk/LayoutTests/webrtc/multi-video-expected.txt trunk/LayoutTests/webrtc/multi-video.html trunk/LayoutTests/webrtc/video-with-data-channel-expected.txt trunk/LayoutTests/webrtc/video-with-data-channel.html Diff Modified: trunk/LayoutTests/ChangeLog (215322 => 215323) --- trunk/LayoutTests/ChangeLog 2017-04-13 16:40:25 UTC (rev 215322) +++ trunk/LayoutTests/ChangeLog 2017-04-13 16:54:32 UTC (rev 215323) @@ -1,3 +1,15 @@ +2017-04-13 Youenn Fablet + +Add some more WebRTC tests +https://bugs.webkit.org/show_bug.cgi?id=170796 + +Reviewed by Eric Carlson. + +* webrtc/multi-video-expected.txt: Added. +* webrtc/multi-video.html: Added. +* webrtc/video-with-data-channel-expected.txt: Added. +* webrtc/video-with-data-channel.html: Added. + 2017-04-13 Romain Bellessort [Readable Streams API] Implement cloneArrayBuffer in WebCore Added: trunk/LayoutTests/webrtc/multi-video-expected.txt (0 => 215323) --- trunk/LayoutTests/webrtc/multi-video-expected.txt (rev 0) +++ trunk/LayoutTests/webrtc/multi-video-expected.txt 2017-04-13 16:54:32 UTC (rev 215323) @@ -0,0 +1,4 @@ + + +PASS Basic video exchange + Added: trunk/LayoutTests/webrtc/multi-video.html (0 => 215323) --- trunk/LayoutTests/webrtc/multi-video.html (rev 0) +++ trunk/LayoutTests/webrtc/multi-video.html 2017-04-13 16:54:32 UTC (rev 215323) @@ -0,0 +1,94 @@ + + + + +Testing basic video exchange from offerer to receiver + + + + + + + + + +