[webkit-changes] [205890] trunk
Title: [205890] trunk Revision 205890 Author jer.no...@apple.com Date 2016-09-13 17:11:42 -0700 (Tue, 13 Sep 2016) Log Message [media-source] MediaSource.addSourceBuffer(null) should throw an exception https://bugs.webkit.org/show_bug.cgi?id=161884 Reviewed by Eric Carlson. Source/WebCore: Fixes test: imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html * Modules/mediasource/MediaSource.idl: The addSourceBuffer() parameter is not optional and not nullable. LayoutTests: * platform/mac/TestExpectations: * platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/MediaSource.idl Added Paths trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt Diff Modified: trunk/LayoutTests/ChangeLog (205889 => 205890) --- trunk/LayoutTests/ChangeLog 2016-09-14 00:10:50 UTC (rev 205889) +++ trunk/LayoutTests/ChangeLog 2016-09-14 00:11:42 UTC (rev 205890) @@ -1,3 +1,13 @@ +2016-09-13 Jer Noble + +[media-source] MediaSource.addSourceBuffer(null) should throw an exception +https://bugs.webkit.org/show_bug.cgi?id=161884 + +Reviewed by Eric Carlson. + +* platform/mac/TestExpectations: +* platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added. + 2016-09-13 Myles C. Maxfield [Cocoa] Unify font's ascent, descent, and x-height between macOS and iOS Modified: trunk/LayoutTests/platform/mac/TestExpectations (205889 => 205890) --- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-14 00:10:50 UTC (rev 205889) +++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-14 00:11:42 UTC (rev 205890) @@ -1046,6 +1046,7 @@ [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-readyState.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-removed.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-closed.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-endofstream-invaliderror.html [ Pass ] @@ -1058,7 +1059,6 @@ webkit.org/b/161391 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate.html [ Pass Failure ] # Newly failing Media Source tests -webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-remove.html [ Failure ] Added: trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt (0 => 205890) --- trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt (rev 0) +++ trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt 2016-09-14 00:11:42 UTC (rev 205890) @@ -0,0 +1,13 @@ + +PASS Test addSourceBuffer() in 'ended' state. +PASS Test addSourceBuffer() with empty type +PASS Test addSourceBuffer() with null +PASS Test addSourceBuffer() with unsupported type +FAIL Test addSourceBuffer() with Vorbis and VP8 assert_true: video/webm;codecs="vp8,vorbis" is supported expected true got false +FAIL Test addSourceBuffer() with Vorbis and VP8 in separate SourceBuffers assert_true: video/webm;codecs="vp8" is supported expected true got false +PASS Test addSourceBuffer() video only +PASS Test addSourceBuffer() audio only +PASS Test addSourceBuffer() with AAC and H.264 +PASS Test addSourceBuffer() with AAC and H.264 in separate SourceBuffers +FAIL Test addSourceBuffer() QuotaExceededError. assert_true: Reached SourceBuffer limit. expected true got false + Modified: trunk/Source/WebCore/ChangeLog (205889 => 205890) --- trunk/Source/WebCore/ChangeLog 2016-09-14 00:10:50 UTC (rev 205889) +++ trunk/Source/WebCore/ChangeLog 2016-09-14 00:11:42 UTC (rev 205890) @@ -1,3 +1,15 @@ +2016-09-13 Jer Noble + +[media-source] MediaSource.addSourceBuffer
[webkit-changes] [206001] trunk
es/mediasource/SourceBuffer.cpp trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h trunk/Source/WebCore/platform/MediaSample.h trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h trunk/Source/WebCore/platform/graphics/PlatformTimeRanges.cpp trunk/Source/WebCore/platform/graphics/avfoundation/MediaSampleAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm trunk/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp Diff Modified: trunk/LayoutTests/ChangeLog (206000 => 206001) --- trunk/LayoutTests/ChangeLog 2016-09-15 22:38:17 UTC (rev 206000) +++ trunk/LayoutTests/ChangeLog 2016-09-15 23:13:56 UTC (rev 206001) @@ -1,3 +1,12 @@ +2016-09-13 Jer Noble + +[media-source] web-platform-test/media-source/mediasource-remove.html test failing +https://bugs.webkit.org/show_bug.cgi?id=161950 + +Reviewed by Eric Carlson. + +* platform/mac/TestExpectations: + 2016-09-15 Zalan Bujtas ASSERTION FAILED: willBeComposited == needsToBeComposited(layer) in WebCore::RenderLayerCompositor::computeCompositingRequirements Modified: trunk/LayoutTests/platform/mac/TestExpectations (206000 => 206001) --- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-15 22:38:17 UTC (rev 206000) +++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-15 23:13:56 UTC (rev 206001) @@ -1052,6 +1052,7 @@ [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-endofstream-invaliderror.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-multiple-attach.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-remove.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-sourcebufferlist.html [ Pass ] # Flaky Media Source tests @@ -1061,7 +1062,6 @@ # Newly failing Media Source tests webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html [ Failure ] -webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-remove.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode.html [ Failure ] # These two tests have "InvalidStateError (DOM Exception 11): The object is in an invalid state." in output. Modified: trunk/Source/WebCore/ChangeLog (206000 => 206001) --- trunk/Source/WebCore/ChangeLog 2016-09-15 22:38:17 UTC (rev 206000) +++ trunk/Source/WebCore/ChangeLog 2016-09-15 23:13:56 UTC (rev 206001) @@ -1,3 +1,89 @@ +2016-09-13 Jer Noble + +[media-source] web-platform-test/media-source/mediasource-remove.html test failing +https://bugs.webkit.org/show_bug.cgi?id=161950 + +Reviewed by Eric Carlson. + +Fixes test: web-platform-test/media-source/mediasource-remove.html + +The mediasource-remove.html test was failing in a number of ways: + +- Tests with invalid start or end times were not throwing the correct exception + code, or not throwing exception codes at all + +- Tests were showing an incorrect start buffered range at the beginning of each test. + +- Tests which removed samples were not getting the expected buffered values at the end + each test. + +For the exception failures, update the implementation of abort() and remove() to throw +the correct exceptions at the correct times. + +For the incorrect initial buffered range, update our buffered calculations to store +individual PlatformTimeRanges on each TrackBuffer, and coalesce them into a single +value when an append operation completes, a remove operation completes, or when the +MediaSource's ready state changes. + +For the incorrect buffered ranges after removal, this is caused because the "samples" +that make up an audio track are actually a collection of a large number of individual +samples. So when we are asked to remove media data in a given range, break these audio +meta-samples into two pieces at the removal points. This allows the removal algorithm +to operate on a individual audio sample basis. (We should look into using this technique +when audio samples are evicted during an append operation.) This requires adding some +methods to MediaSample and it's concrete subclasses to "divide" a sample into two at +a given presentation time. + +Fixing these behaviors, however, breaks the media-source-end-of-stream-buffered.html +test, which expects the buffered range for th
[webkit-changes] [206023] trunk/Source/WebCore
Title: [206023] trunk/Source/WebCore Revision 206023 Author jer.no...@apple.com Date 2016-09-16 09:20:13 -0700 (Fri, 16 Sep 2016) Log Message [media-source] ASAN crash running imported/w3c/web-platform-tests/media-source/mediasource-remove.html https://bugs.webkit.org/show_bug.cgi?id=162050 Reviewed by Brent Fulgham. SampleMap::removeSample() was accessing the passed-in sample after removing it from its own storage. If the SampleMap held the last reference to the sample, it would end up acessing freed memory. Fix the post-removal access, but also ensure that the caller, SourceBuffer::removeCodedFrames(), retains the sample it passes into removeSample(). * Modules/mediasource/SampleMap.cpp: (WebCore::SampleMap::removeSample): * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::removeCodedFrames): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (206022 => 206023) --- trunk/Source/WebCore/ChangeLog 2016-09-16 13:08:31 UTC (rev 206022) +++ trunk/Source/WebCore/ChangeLog 2016-09-16 16:20:13 UTC (rev 206023) @@ -1,3 +1,20 @@ +2016-09-16 Jer Noble + +[media-source] ASAN crash running imported/w3c/web-platform-tests/media-source/mediasource-remove.html +https://bugs.webkit.org/show_bug.cgi?id=162050 + +Reviewed by Brent Fulgham. + +SampleMap::removeSample() was accessing the passed-in sample after removing it from its own storage. If +the SampleMap held the last reference to the sample, it would end up acessing freed memory. Fix the +post-removal access, but also ensure that the caller, SourceBuffer::removeCodedFrames(), retains the +sample it passes into removeSample(). + +* Modules/mediasource/SampleMap.cpp: +(WebCore::SampleMap::removeSample): +* Modules/mediasource/SourceBuffer.cpp: +(WebCore::SourceBuffer::removeCodedFrames): + 2016-09-16 Javier Fernandez [GTK] Unreviewed build fix after r206007. Modified: trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp (206022 => 206023) --- trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp 2016-09-16 13:08:31 UTC (rev 206022) +++ trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp 2016-09-16 16:20:13 UTC (rev 206023) @@ -125,12 +125,11 @@ ASSERT(sample); MediaTime presentationTime = sample->presentationTime(); -presentationOrder().m_samples.erase(presentationTime); +m_totalSize -= sample->sizeInBytes(); auto decodeKey = DecodeOrderSampleMap::KeyType(sample->decodeTime(), presentationTime); +presentationOrder().m_samples.erase(presentationTime); decodeOrder().m_samples.erase(decodeKey); - -m_totalSize -= sample->sizeInBytes(); } PresentationOrderSampleMap::iterator PresentationOrderSampleMap::findSampleWithPresentationTime(const MediaTime& time) Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (206022 => 206023) --- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-09-16 13:08:31 UTC (rev 206022) +++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-09-16 16:20:13 UTC (rev 206023) @@ -770,16 +770,17 @@ auto sampleIterator = trackBuffer.samples.presentationOrder().findSampleContainingPresentationTime(time); if (sampleIterator == trackBuffer.samples.presentationOrder().end()) return; -if (!sampleIterator->second->isDivisable()) +RefPtr sample = sampleIterator->second; +if (!sample->isDivisable()) return; -std::pair, RefPtr> replacementSamples = sampleIterator->second->divide(time); +std::pair, RefPtr> replacementSamples = sample->divide(time); if (!replacementSamples.first || !replacementSamples.second) return; LOG(MediaSource, "SourceBuffer::removeCodedFrames(%p) - splitting sample (%s) into\n\t(%s)\n\t(%s)", this, -toString(sampleIterator->second).utf8().data(), +toString(sample).utf8().data(), toString(replacementSamples.first).utf8().data(), toString(replacementSamples.second).utf8().data()); -trackBuffer.samples.removeSample(sampleIterator->second.get()); +trackBuffer.samples.removeSample(sample.get()); trackBuffer.samples.addSample(*replacementSamples.first); trackBuffer.samples.addSample(*replacementSamples.second); }; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [206025] trunk/Source/WebCore
Title: [206025] trunk/Source/WebCore Revision 206025 Author jer.no...@apple.com Date 2016-09-16 09:21:58 -0700 (Fri, 16 Sep 2016) Log Message [media-source] Only fire 'resize' events when new sized frame is displayed, not parsed. https://bugs.webkit.org/show_bug.cgi?id=162039 Reviewed by Eric Carlson. Fixes tests: imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize.html imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html Currently, the SourceBufferPrivateAVFObjC will signal a size change as soon as the sample is parsed during appendData(). This is incorrect, as the intrinsic size of the video element should be based on when the sample is displayed, and it causes some W3C test cases to fail. Set a boundary time observer on the player's synchronizer at each sample's presentation time where that sample signals a change in intrinsic size. Flush those observers whenever the samples are flushed un-displayed (typically, during a seek). Because the observer callback may have already been issued (but not executed) at a flush, use a separate weak pointer factory, and invalidate all outstanding size change observer weak pointers when flushing. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::reenqueueMediaForTime): When re-enqueing, enqueue the next decodable sample, even if it doesn't include the current time. This handles cases where the current time is 0, and the first video sample starts at 0.033. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::flushPendingSizeChanges): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeChanged): Deleted. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (206024 => 206025) --- trunk/Source/WebCore/ChangeLog 2016-09-16 16:21:30 UTC (rev 206024) +++ trunk/Source/WebCore/ChangeLog 2016-09-16 16:21:58 UTC (rev 206025) @@ -1,3 +1,40 @@ +2016-09-16 Jer Noble + +[media-source] Only fire 'resize' events when new sized frame is displayed, not parsed. +https://bugs.webkit.org/show_bug.cgi?id=162039 + +Reviewed by Eric Carlson. + +Fixes tests: imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize.html + imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html + +Currently, the SourceBufferPrivateAVFObjC will signal a size change as soon as the sample is +parsed during appendData(). This is incorrect, as the intrinsic size of the video element +should be based on when the sample is displayed, and it causes some W3C test cases to fail. +Set a boundary time observer on the player's synchronizer at each sample's presentation time +where that sample signals a change in intrinsic size. Flush those observers whenever the +samples are flushed un-displayed (typically, during a seek). Because the observer callback +may have already been issued (but not executed) at a flush, use a separate weak pointer +factory, and invalidate all outstanding size change observer weak pointers when flushing. + +* Modules/mediasource/SourceBuffer.cpp: +(WebCore::SourceBuffer::reenqueueMediaForTime): When re-enqueing, enqueue the next decodable +sample, even if it doesn't include the current time. This handles cases where the current +time is 0, and the first video sample starts at 0.033. +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: +
[webkit-changes] [206028] trunk
Title: [206028] trunk Revision 206028 Author jer.no...@apple.com Date 2016-09-16 09:45:04 -0700 (Fri, 16 Sep 2016) Log Message [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html https://bugs.webkit.org/show_bug.cgi?id=162038 Reviewed by Eric Carlson. Source/WebCore: The timestampOffset property is no longer specified as an 'unrestricted' double. * Modules/mediasource/SourceBuffer.idl: LayoutTests: * platform/mac/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl Diff Modified: trunk/LayoutTests/ChangeLog (206027 => 206028) --- trunk/LayoutTests/ChangeLog 2016-09-16 16:40:43 UTC (rev 206027) +++ trunk/LayoutTests/ChangeLog 2016-09-16 16:45:04 UTC (rev 206028) @@ -1,3 +1,12 @@ +2016-09-16 Jer Noble + +[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html +https://bugs.webkit.org/show_bug.cgi?id=162038 + +Reviewed by Eric Carlson. + +* platform/mac/TestExpectations: + 2016-09-16 Chris Dumez Cloning a textarea does not clone the textarea's value Modified: trunk/LayoutTests/platform/mac/TestExpectations (206027 => 206028) --- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 16:40:43 UTC (rev 206027) +++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 16:45:04 UTC (rev 206028) @@ -1054,6 +1054,7 @@ [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-remove.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-sourcebufferlist.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html [ Pass ] # Flaky Media Source tests webkit.org/b/149816 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-updating.html [ Pass Timeout ] Modified: trunk/Source/WebCore/ChangeLog (206027 => 206028) --- trunk/Source/WebCore/ChangeLog 2016-09-16 16:40:43 UTC (rev 206027) +++ trunk/Source/WebCore/ChangeLog 2016-09-16 16:45:04 UTC (rev 206028) @@ -1,3 +1,14 @@ +2016-09-16 Jer Noble + +[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html +https://bugs.webkit.org/show_bug.cgi?id=162038 + +Reviewed by Eric Carlson. + +The timestampOffset property is no longer specified as an 'unrestricted' double. + +* Modules/mediasource/SourceBuffer.idl: + 2016-09-16 Per Arne Vollan [Win] Compile fix. Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl (206027 => 206028) --- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl 2016-09-16 16:40:43 UTC (rev 206027) +++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl 2016-09-16 16:45:04 UTC (rev 206028) @@ -48,7 +48,7 @@ [GetterRaisesException] readonly attribute TimeRanges buffered; // Applies an offset to media segment timestamps. -[SetterRaisesException] attribute unrestricted double timestampOffset; +[SetterRaisesException] attribute double timestampOffset; // Track support [Conditional=VIDEO_TRACK] readonly attribute AudioTrackList audioTracks; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [206032] trunk
Title: [206032] trunk Revision 206032 Author jer.no...@apple.com Date 2016-09-16 11:04:54 -0700 (Fri, 16 Sep 2016) Log Message [media-source] fix imported/w3c/web-platform-tests/media-source/mediasource-duration.html https://bugs.webkit.org/show_bug.cgi?id=161999 Reviewed by Eric Carlson. LayoutTests/imported/w3c: Expected results had a stray newline. * web-platform-tests/media-source/mediasource-duration-expected.txt: Source/WTF: The mediasource-duration.html test tries to set the duration of a MediaSource to a double value (5.0), then some work happens and the duration is set to a media time (12533/2500, or 5.0132). The test then tries to set that value as the duration, converted from a media time to a double, and asserts that no duration change event is fired. But because the floating point value and the media time value are ever so slightly different, this round-tripping fails. Fix this bug in MediaTime by, when one side or the other of a comparison is a floating point MediaTime, convert both sides to doubles and run the comparison against those values. This preserves the transitive equality of doubles <-> MediaTimes. * wtf/MediaTime.cpp: (WTF::MediaTime::compare): Tools: * TestWebKitAPI/Tests/WTF/MediaTime.cpp: (TestWebKitAPI::TEST): LayoutTests: * platform/mac/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/imported/w3c/ChangeLog trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-duration-expected.txt trunk/LayoutTests/platform/mac/TestExpectations trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/MediaTime.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp Diff Modified: trunk/LayoutTests/ChangeLog (206031 => 206032) --- trunk/LayoutTests/ChangeLog 2016-09-16 17:46:51 UTC (rev 206031) +++ trunk/LayoutTests/ChangeLog 2016-09-16 18:04:54 UTC (rev 206032) @@ -1,3 +1,12 @@ +2016-09-14 Jer Noble + +[media-source] fix imported/w3c/web-platform-tests/media-source/mediasource-duration.html +https://bugs.webkit.org/show_bug.cgi?id=161999 + +Reviewed by Eric Carlson. + +* platform/mac/TestExpectations: + 2016-09-16 Jer Noble [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html Modified: trunk/LayoutTests/imported/w3c/ChangeLog (206031 => 206032) --- trunk/LayoutTests/imported/w3c/ChangeLog 2016-09-16 17:46:51 UTC (rev 206031) +++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-09-16 18:04:54 UTC (rev 206032) @@ -1,3 +1,14 @@ +2016-09-14 Jer Noble + +[media-source] fix imported/w3c/web-platform-tests/media-source/mediasource-duration.html +https://bugs.webkit.org/show_bug.cgi?id=161999 + +Reviewed by Eric Carlson. + +Expected results had a stray newline. + +* web-platform-tests/media-source/mediasource-duration-expected.txt: + 2016-09-16 Chris Dumez Cloning a textarea does not clone the textarea's value Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-duration-expected.txt (206031 => 206032) --- trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-duration-expected.txt 2016-09-16 17:46:51 UTC (rev 206031) +++ trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-duration-expected.txt 2016-09-16 18:04:54 UTC (rev 206032) @@ -4,3 +4,4 @@ PASS Test endOfStream completes previous seek to truncated duration PASS Test setting same duration multiple times does not fire duplicate durationchange PASS Test setting the duration to less than the highest starting presentation timestamp will throw + Modified: trunk/LayoutTests/platform/mac/TestExpectations (206031 => 206032) --- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 17:46:51 UTC (rev 206031) +++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 18:04:54 UTC (rev 206032) @@ -1049,6 +1049,7 @@ [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-closed.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-duration.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-endofstream-invaliderror.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-multiple-attach.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play.html [ Pass ] Modified: trunk/Source/WTF/ChangeLog (206031 => 206032) --- trunk/Source/WTF/ChangeLog 2016-09-16 17:46:51 UTC (rev 206031) +++ trunk/Source/WTF/ChangeLog 2016-09-16 18:04:54 UTC (rev 206032) @@ -1,3 +1,23 @@ +2016-09-14 Jer Noble + +[media-source] fix imported/w3c/web-p
[webkit-changes] [206037] trunk
Title: [206037] trunk Revision 206037 Author jer.no...@apple.com Date 2016-09-16 12:25:29 -0700 (Fri, 16 Sep 2016) Log Message [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html https://bugs.webkit.org/show_bug.cgi?id=162052 Reviewed by Brent Fulgham. Source/WebCore: Fixes tests: imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html The above tests would throw an assertion while trying to invert a range with an invalid end time. Check the validity of trackBuffer.lastEnqueuedPresentationTime before comparing it and assigning it to a range. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::removeCodedFrames): LayoutTests: * platform/mac/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp Diff Modified: trunk/LayoutTests/ChangeLog (206036 => 206037) --- trunk/LayoutTests/ChangeLog 2016-09-16 18:59:01 UTC (rev 206036) +++ trunk/LayoutTests/ChangeLog 2016-09-16 19:25:29 UTC (rev 206037) @@ -1,3 +1,12 @@ +2016-09-16 Jer Noble + +[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html +https://bugs.webkit.org/show_bug.cgi?id=162052 + +Reviewed by Brent Fulgham. + +* platform/mac/TestExpectations: + 2016-09-14 Jer Noble [media-source] fix imported/w3c/web-platform-tests/media-source/mediasource-duration.html Modified: trunk/LayoutTests/platform/mac/TestExpectations (206036 => 206037) --- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 18:59:01 UTC (rev 206036) +++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 19:25:29 UTC (rev 206037) @@ -1048,6 +1048,8 @@ [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-closed.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-duration.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-endofstream-invaliderror.html [ Pass ] Modified: trunk/Source/WebCore/ChangeLog (206036 => 206037) --- trunk/Source/WebCore/ChangeLog 2016-09-16 18:59:01 UTC (rev 206036) +++ trunk/Source/WebCore/ChangeLog 2016-09-16 19:25:29 UTC (rev 206037) @@ -1,3 +1,19 @@ +2016-09-16 Jer Noble + +[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html +https://bugs.webkit.org/show_bug.cgi?id=162052 + +Reviewed by Brent Fulgham. + +Fixes tests: imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html + imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html + +The above tests would throw an assertion while trying to invert a range with an invalid end time. Check the +validity of trackBuffer.lastEnqueuedPresentationTime before comparing it and assigning it to a range. + +* Modules/mediasource/SourceBuffer.cpp: +(WebCore::SourceBuffer::removeCodedFrames): + 2016-09-16 Alex Christensen URLParser should percent encode the user and password according to spec Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (206036 => 206037) --- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-09-16 18:59:01 UTC (rev 206036) +++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-09-16 19:25:29 UTC (rev 206037) @@ -814,7 +814,7 @@ // Only force the TrackBuffer to re-enqueue if the removed ranges overlap with enqueued and possibly // not yet displayed samples. -if (currentMediaTime < trackBuffer.lastEnqueuedPresentationTime) { +if (trackBuffer.lastEnqueuedPresentationTime.isValid() && currentMediaTime < trackBuffer.lastEnqueuedPresentationTime) { PlatformTimeRanges possiblyEnqueuedRanges(currentMediaTime, trackBuffer.lastEnqueuedPresentationTime); possiblyEnqueuedRanges.intersectWith(erasedRanges); if (possiblyEnqueuedRanges.length())
[webkit-changes] [206039] trunk/LayoutTests
Title: [206039] trunk/LayoutTests Revision 206039 Author jer.no...@apple.com Date 2016-09-16 12:33:22 -0700 (Fri, 16 Sep 2016) Log Message Unreviewed gardening; enable newly passing imported/w3c/web-platform-tests/media-source/ tests. * platform/mac/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (206038 => 206039) --- trunk/LayoutTests/ChangeLog 2016-09-16 19:32:20 UTC (rev 206038) +++ trunk/LayoutTests/ChangeLog 2016-09-16 19:33:22 UTC (rev 206039) @@ -1,5 +1,11 @@ 2016-09-16 Jer Noble +Unreviewed gardening; enable newly passing imported/w3c/web-platform-tests/media-source/ tests. + +* platform/mac/TestExpectations: + +2016-09-16 Jer Noble + [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html https://bugs.webkit.org/show_bug.cgi?id=162052 Modified: trunk/LayoutTests/platform/mac/TestExpectations (206038 => 206039) --- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 19:32:20 UTC (rev 206038) +++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 19:33:22 UTC (rev 206039) @@ -1045,24 +1045,31 @@ [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/ [ Skip ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-readyState.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-removed.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-updating.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/URL-createObjectURL.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-mode.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-closed.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-a-bitrate.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-detach.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-duration.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-endofstream-invaliderror.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-multiple-attach.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play-then-seek-back.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play.html [ Pass ] +[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-redundant-seek.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-remove.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-sourcebufferlist.html [ Pass ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html [ Pass ] -# Flaky Media Source tests -webkit.org/b/149816 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-updating.html [ Pass Timeout ] -webkit.org/b/161391 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate.html [ Pass Failure ] - # Newly failing Media Source tests webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html [ Failure ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [206041] trunk/LayoutTests
Title: [206041] trunk/LayoutTests Revision 206041 Author jer.no...@apple.com Date 2016-09-16 12:55:58 -0700 (Fri, 16 Sep 2016) Log Message Unreviewed gardening; enable newly passing media/media-source/ tests. * platform/mac/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (206040 => 206041) --- trunk/LayoutTests/ChangeLog 2016-09-16 19:44:50 UTC (rev 206040) +++ trunk/LayoutTests/ChangeLog 2016-09-16 19:55:58 UTC (rev 206041) @@ -1,5 +1,11 @@ 2016-09-16 Jer Noble +Unreviewed gardening; enable newly passing media/media-source/ tests. + +* platform/mac/TestExpectations: + +2016-09-16 Jer Noble + Unreviewed gardening; enable newly passing imported/w3c/web-platform-tests/media-source/ tests. * platform/mac/TestExpectations: Modified: trunk/LayoutTests/platform/mac/TestExpectations (206040 => 206041) --- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 19:44:50 UTC (rev 206040) +++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-16 19:55:58 UTC (rev 206041) @@ -1038,9 +1038,8 @@ # FIXME: Needs bugzilla () [ Yosemite+ ] platform/mac/fast/text/systemFont.html [ Pass Failure ] -# FIXME: Needs bugzilla () -[ Yosemite+ ] media/media-source/media-source-tracks.html [ Skip ] - +# --- Start Media Source Tests --- +## --- Start W3C Imported Media Source Tests # Passing Media Source tests [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/ [ Skip ] [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-readyState.html [ Pass ] @@ -1074,13 +1073,11 @@ webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html [ Failure ] webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode.html [ Failure ] +## --- End W3C Imported Media Source Tests -# These two tests have "InvalidStateError (DOM Exception 11): The object is in an invalid state." in output. -[ Yosemite+ ] media/media-source/media-source-duplicate-seeked.html [ Failure ] -[ Yosemite+ ] media/media-source/media-source-play.html [ Failure ] - # This test times out. [ Yosemite+ ] media/media-source/media-source-seek-complete.html [ Timeout ] +# --- End Media Source Tests --- # These tests used to only fail with WK2, but on Yosemite, they also fail with WK1. webkit.org/b/132766 [ Yosemite ] fast/hidpi/filters-blur.html [ Pass ImageOnlyFailure ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [199252] trunk/Source/WebCore
Title: [199252] trunk/Source/WebCore Revision 199252 Author jer.no...@apple.com Date 2016-04-08 15:41:46 -0700 (Fri, 08 Apr 2016) Log Message CRASH in AudioDestinationNode::render() https://bugs.webkit.org/show_bug.cgi?id=156308 Reviewed by Eric Carlson. Yet another math error in AudioDestinationIOS::render(). It is possible for the difference between m_startSpareFrame and m_endSpareFrame to be greater than the numberOfFrames to be rendered. Protect against this case by taking the min() of those two values and only advancing m_startSpareFrame by that amount. This guarantees that framesThisTime will never underflow, and that data will not be written past the end of the ioData parameter. * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestinationIOS::render): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (199251 => 199252) --- trunk/Source/WebCore/ChangeLog 2016-04-08 22:37:34 UTC (rev 199251) +++ trunk/Source/WebCore/ChangeLog 2016-04-08 22:41:46 UTC (rev 199252) @@ -1,3 +1,19 @@ +2016-04-08 Jer Noble + +CRASH in AudioDestinationNode::render() +https://bugs.webkit.org/show_bug.cgi?id=156308 + +Reviewed by Eric Carlson. + +Yet another math error in AudioDestinationIOS::render(). It is possible for the difference between +m_startSpareFrame and m_endSpareFrame to be greater than the numberOfFrames to be rendered. Protect +against this case by taking the min() of those two values and only advancing m_startSpareFrame by +that amount. This guarantees that framesThisTime will never underflow, and that data will not be +written past the end of the ioData parameter. + +* platform/audio/ios/AudioDestinationIOS.cpp: +(WebCore::AudioDestinationIOS::render): + 2016-04-08 Brady Eidson Modern IDB: Use more IDBValue and IDBGetResult in IDBBackingStore. Modified: trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp (199251 => 199252) --- trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp 2016-04-08 22:37:34 UTC (rev 199251) +++ trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp 2016-04-08 22:41:46 UTC (rev 199252) @@ -218,15 +218,14 @@ UInt32 framesRemaining = numberOfFrames; UInt32 frameOffset = 0; while (framesRemaining > 0) { -if (m_startSpareFrame && m_endSpareFrame) { +if (m_startSpareFrame < m_endSpareFrame) { ASSERT(m_startSpareFrame < m_endSpareFrame); -UInt32 framesThisTime = m_endSpareFrame - m_startSpareFrame; +UInt32 framesThisTime = std::min(m_endSpareFrame - m_startSpareFrame, numberOfFrames); assignAudioBuffersToBus(buffers, *m_renderBus, numberOfBuffers, numberOfFrames, frameOffset, framesThisTime); m_renderBus->copyFromRange(*m_spareBus, m_startSpareFrame, m_endSpareFrame); frameOffset += framesThisTime; framesRemaining -= framesThisTime; -m_startSpareFrame = 0; -m_endSpareFrame = 0; +m_startSpareFrame += framesThisTime; } UInt32 framesThisTime = std::min(kRenderBufferSize, framesRemaining); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [199253] trunk/Source/WebCore
Title: [199253] trunk/Source/WebCore Revision 199253 Author jer.no...@apple.com Date 2016-04-08 15:54:50 -0700 (Fri, 08 Apr 2016) Log Message Unreviewed 32-bit build fix; make type of std::min<> explicit. * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestinationIOS::render): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (199252 => 199253) --- trunk/Source/WebCore/ChangeLog 2016-04-08 22:41:46 UTC (rev 199252) +++ trunk/Source/WebCore/ChangeLog 2016-04-08 22:54:50 UTC (rev 199253) @@ -1,5 +1,12 @@ 2016-04-08 Jer Noble +Unreviewed 32-bit build fix; make type of std::min<> explicit. + +* platform/audio/ios/AudioDestinationIOS.cpp: +(WebCore::AudioDestinationIOS::render): + +2016-04-08 Jer Noble + CRASH in AudioDestinationNode::render() https://bugs.webkit.org/show_bug.cgi?id=156308 Modified: trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp (199252 => 199253) --- trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp 2016-04-08 22:41:46 UTC (rev 199252) +++ trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp 2016-04-08 22:54:50 UTC (rev 199253) @@ -220,7 +220,7 @@ while (framesRemaining > 0) { if (m_startSpareFrame < m_endSpareFrame) { ASSERT(m_startSpareFrame < m_endSpareFrame); -UInt32 framesThisTime = std::min(m_endSpareFrame - m_startSpareFrame, numberOfFrames); +UInt32 framesThisTime = std::min(m_endSpareFrame - m_startSpareFrame, numberOfFrames); assignAudioBuffersToBus(buffers, *m_renderBus, numberOfBuffers, numberOfFrames, frameOffset, framesThisTime); m_renderBus->copyFromRange(*m_spareBus, m_startSpareFrame, m_endSpareFrame); frameOffset += framesThisTime; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [199597] trunk/Source/WebCore
Title: [199597] trunk/Source/WebCore Revision 199597 Author jer.no...@apple.com Date 2016-04-15 11:08:13 -0700 (Fri, 15 Apr 2016) Log Message Unreviewed build fix for iOS simulator. Assert the correct variable. * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (-[WebAVPlayerLayer layoutSublayers]): (-[WebAVPlayerLayer resolveBounds]): (-[WebAVPlayerLayer setVideoGravity:]): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm Diff Modified: trunk/Source/WebCore/ChangeLog (199596 => 199597) --- trunk/Source/WebCore/ChangeLog 2016-04-15 17:59:00 UTC (rev 199596) +++ trunk/Source/WebCore/ChangeLog 2016-04-15 18:08:13 UTC (rev 199597) @@ -1,3 +1,12 @@ +2016-04-15 Jer Noble + +Unreviewed build fix for iOS simulator. Assert the correct variable. + +* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: +(-[WebAVPlayerLayer layoutSublayers]): +(-[WebAVPlayerLayer resolveBounds]): +(-[WebAVPlayerLayer setVideoGravity:]): + 2016-04-14 Jer Noble Allow WebVideoFullscreenManager and Proxy to be used by audio elements. Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (199596 => 199597) --- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-04-15 17:59:00 UTC (rev 199596) +++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-04-15 18:08:13 UTC (rev 199597) @@ -294,7 +294,7 @@ } else if ([getAVLayerVideoGravityResizeAspectFill() isEqualToString:self.videoGravity]) { sourceVideoFrame = smallestRectWithAspectRatioAroundRect(videoAspectRatio, self.modelVideoLayerFrame); self.modelVideoLayerFrame = CGRectMake(0, 0, sourceVideoFrame.width(), sourceVideoFrame.height()); -ASSERT(fullscreenInterface->model()); +ASSERT(_fullscreenInterface->model()); _fullscreenInterface->model()->setVideoLayerFrame(self.modelVideoLayerFrame); targetVideoFrame = smallestRectWithAspectRatioAroundRect(videoAspectRatio, self.bounds); } else @@ -327,7 +327,7 @@ [CATransaction setDisableActions:YES]; self.modelVideoLayerFrame = [self bounds]; -ASSERT(fullscreenInterface->model()); +ASSERT(_fullscreenInterface->model()); _fullscreenInterface->model()->setVideoLayerFrame(self.modelVideoLayerFrame); [(UIView *)[_videoSublayer delegate] setTransform:CGAffineTransformIdentity]; @@ -351,7 +351,7 @@ else ASSERT_NOT_REACHED(); -ASSERT(fullscreenInterface->model()); +ASSERT(_fullscreenInterface->model()); _fullscreenInterface->model()->setVideoLayerGravity(gravity); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [199603] trunk/Source/WebCore
Title: [199603] trunk/Source/WebCore Revision 199603 Author jer.no...@apple.com Date 2016-04-15 12:06:30 -0700 (Fri, 15 Apr 2016) Log Message Audio elements should be able to have a controls manager. https://bugs.webkit.org/show_bug.cgi?id=156630 Reviewed by Beth Dakin. Now that there is no longer a architectural restriction about what kind of media elements can be used with WebPlaybackSessionManager, allow audio elements to create a controls manager. Drive-by fix: clear the controls manager when destroying the media player due to entering the page cache, and when destroying the media element. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::~HTMLMediaElement): (WebCore::HTMLMediaElement::updatePlayState): (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): * html/MediaElementSession.cpp: (WebCore::MediaElementSession::canControlControlsManager): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/MediaElementSession.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (199602 => 199603) --- trunk/Source/WebCore/ChangeLog 2016-04-15 19:01:39 UTC (rev 199602) +++ trunk/Source/WebCore/ChangeLog 2016-04-15 19:06:30 UTC (rev 199603) @@ -1,3 +1,24 @@ +2016-04-15 Jer Noble + +Audio elements should be able to have a controls manager. +https://bugs.webkit.org/show_bug.cgi?id=156630 + +Reviewed by Beth Dakin. + +Now that there is no longer a architectural restriction about what kind of media elements +can be used with WebPlaybackSessionManager, allow audio elements to create a controls +manager. + +Drive-by fix: clear the controls manager when destroying the media player due to entering +the page cache, and when destroying the media element. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::~HTMLMediaElement): +(WebCore::HTMLMediaElement::updatePlayState): +(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): +* html/MediaElementSession.cpp: +(WebCore::MediaElementSession::canControlControlsManager): + 2016-04-15 Said Abou-Hallawa Calling SVGAnimatedPropertyTearOff::animationEnded() will crash if the SVG property is not animating Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (199602 => 199603) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-04-15 19:01:39 UTC (rev 199602) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-04-15 19:06:30 UTC (rev 199603) @@ -499,6 +499,9 @@ setShouldDelayLoadEvent(false); unregisterWithDocument(document()); +if (document().page()) +document().page()->chrome().client().clearPlaybackControlsManager(*this); + #if ENABLE(VIDEO_TRACK) if (m_audioTracks) { m_audioTracks->clearElement(); @@ -4824,10 +4827,8 @@ LOG(Media, "HTMLMediaElement::updatePlayState(%p) - shouldBePlaying = %s, playerPaused = %s", this, boolString(shouldBePlaying), boolString(playerPaused)); if (shouldBePlaying) { -if (document().page() && m_mediaSession->canControlControlsManager(*this)) { -HTMLVideoElement& asVideo = downcast(*this); -document().page()->chrome().client().setUpPlaybackControlsManager(asVideo); -} +if (document().page() && m_mediaSession->canControlControlsManager(*this)) +document().page()->chrome().client().setUpPlaybackControlsManager(*this); setDisplayMode(Video); invalidateCachedTime(); @@ -4861,7 +4862,7 @@ startPlaybackProgressTimer(); setPlaying(true); } else { -if (endedPlayback() && document().page() && is(*this)) +if (endedPlayback() && document().page()) document().page()->chrome().client().clearPlaybackControlsManager(*this); if (!playerPaused) @@ -5030,7 +5031,10 @@ if (m_videoFullscreenMode != VideoFullscreenModeNone) exitFullscreen(); - + +if (document().page()) +document().page()->chrome().client().clearPlaybackControlsManager(*this); + m_inActiveDocument = false; // Stop the playback without generating events Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (199602 => 199603) --- trunk/Source/WebCore/html/MediaElementSession.cpp 2016-04-15 19:01:39 UTC (rev 199602) +++ trunk/Source/WebCore/html/MediaElementSession.cpp 2016-04-15 19:06:30 UTC (rev 199603) @@ -214,9 +214,7 @@ bool MediaElementSession::canControlControlsManager(const HTMLMediaElement& element) const { -// FIXME: rdar://problem/25537071 Audio elements should be able to have a controls manager as well. -// Audio elements should probably only have a controls manager if they started playing via a user gesture. -if (!element.isVideo()) +if (!element.hasAudio()) return false;
[webkit-changes] [199615] trunk/Source/WebKit2
Title: [199615] trunk/Source/WebKit2 Revision 199615 Author jer.no...@apple.com Date 2016-04-15 17:01:59 -0700 (Fri, 15 Apr 2016) Log Message REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext https://bugs.webkit.org/show_bug.cgi?id=156648 Reviewed by Beth Dakin. Mistakenly checked in a reversed condition check, which causes a subsequent assert and crash. * WebProcess/cocoa/WebPlaybackSessionManager.mm: (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (199614 => 199615) --- trunk/Source/WebKit2/ChangeLog 2016-04-15 22:37:42 UTC (rev 199614) +++ trunk/Source/WebKit2/ChangeLog 2016-04-16 00:01:59 UTC (rev 199615) @@ -1,3 +1,16 @@ +2016-04-15 Jer Noble + +REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext +https://bugs.webkit.org/show_bug.cgi?id=156648 + + +Reviewed by Beth Dakin. + +Mistakenly checked in a reversed condition check, which causes a subsequent assert and crash. + +* WebProcess/cocoa/WebPlaybackSessionManager.mm: +(WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager): + 2016-04-15 Chris Dumez Mark NetworkLoad as FastAllocated Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm (199614 => 199615) --- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm 2016-04-15 22:37:42 UTC (rev 199614) +++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm 2016-04-16 00:01:59 UTC (rev 199615) @@ -256,7 +256,7 @@ void WebPlaybackSessionManager::clearPlaybackControlsManager(WebCore::HTMLMediaElement& mediaElement) { #if PLATFORM(MAC) -if (m_mediaElements.contains(&mediaElement)) +if (!m_mediaElements.contains(&mediaElement)) return; uint64_t contextId = m_mediaElements.get(&mediaElement); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [199671] trunk/Source/WebKit2
Title: [199671] trunk/Source/WebKit2 Revision 199671 Author jer.no...@apple.com Date 2016-04-18 09:04:07 -0700 (Mon, 18 Apr 2016) Log Message REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext https://bugs.webkit.org/show_bug.cgi?id=156648 Reviewed by Darin Adler. Follow up patch to r199615; avoid a double hash lookup by using a .find() pattern instead of .contains() & .get(). * WebProcess/cocoa/WebPlaybackSessionManager.mm: (WebKit::WebPlaybackSessionManager::setUpPlaybackControlsManager): (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (199670 => 199671) --- trunk/Source/WebKit2/ChangeLog 2016-04-18 15:54:50 UTC (rev 199670) +++ trunk/Source/WebKit2/ChangeLog 2016-04-18 16:04:07 UTC (rev 199671) @@ -1,3 +1,17 @@ +2016-04-18 Jer Noble + +REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext +https://bugs.webkit.org/show_bug.cgi?id=156648 + +Reviewed by Darin Adler. + +Follow up patch to r199615; avoid a double hash lookup by using a .find() pattern instead of +.contains() & .get(). + +* WebProcess/cocoa/WebPlaybackSessionManager.mm: +(WebKit::WebPlaybackSessionManager::setUpPlaybackControlsManager): +(WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager): + 2016-04-18 Chris Dumez Unreviewed, rolling out r199644. Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm (199670 => 199671) --- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm 2016-04-18 15:54:50 UTC (rev 199670) +++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm 2016-04-18 16:04:07 UTC (rev 199671) @@ -233,8 +233,9 @@ void WebPlaybackSessionManager::setUpPlaybackControlsManager(WebCore::HTMLMediaElement& mediaElement) { #if PLATFORM(MAC) -if (m_mediaElements.contains(&mediaElement)) { -uint64_t contextId = m_mediaElements.get(&mediaElement); +auto foundIterator = m_mediaElements.find(&mediaElement); +if (foundIterator != m_mediaElements.end()) { +uint64_t contextId = foundIterator->value; if (m_controlsManagerContextId == contextId) return; @@ -256,11 +257,11 @@ void WebPlaybackSessionManager::clearPlaybackControlsManager(WebCore::HTMLMediaElement& mediaElement) { #if PLATFORM(MAC) -if (!m_mediaElements.contains(&mediaElement)) +auto foundIterator = m_mediaElements.find(&mediaElement); +if (foundIterator == m_mediaElements.end()) return; -uint64_t contextId = m_mediaElements.get(&mediaElement); -if (m_controlsManagerContextId != contextId) +if (m_controlsManagerContextId != foundIterator->value) return; removeClientForContext(m_controlsManagerContextId); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [199672] trunk/Source/WebCore
Title: [199672] trunk/Source/WebCore Revision 199672 Author jer.no...@apple.com Date 2016-04-18 09:14:36 -0700 (Mon, 18 Apr 2016) Log Message [Mac][EME] Protected content over HLS is not notified when a HDCP violation occurs. https://bugs.webkit.org/show_bug.cgi?id=156633 Reviewed by Eric Carlson. Pass through the existing "outputObscuredDueToInsufficientExternalProtection" status as an error, similarly to what we do for CDMSessionMediaSourceAVFObjC. * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: (WebCore::CDMSessionAVFoundationObjC::~CDMSessionAVFoundationObjC): Deleted. * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm: (SOFT_LINK_CLASS): (-[WebCDMSessionAVFoundationObjCListener initWithParent:player:]): (-[WebCDMSessionAVFoundationObjCListener invalidate]): (-[WebCDMSessionAVFoundationObjCListener observeValueForKeyPath:ofObject:change:context:]): (WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC): (WebCore::CDMSessionAVFoundationObjC::~CDMSessionAVFoundationObjC): (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest): (WebCore::CDMSessionAVFoundationObjC::playerDidReceiveError): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: (WebCore::MediaPlayerPrivateAVFoundationObjC::avPlayer): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h Diff Modified: trunk/Source/WebCore/ChangeLog (199671 => 199672) --- trunk/Source/WebCore/ChangeLog 2016-04-18 16:04:07 UTC (rev 199671) +++ trunk/Source/WebCore/ChangeLog 2016-04-18 16:14:36 UTC (rev 199672) @@ -1,3 +1,27 @@ +2016-04-15 Jer Noble + +[Mac][EME] Protected content over HLS is not notified when a HDCP violation occurs. +https://bugs.webkit.org/show_bug.cgi?id=156633 + +Reviewed by Eric Carlson. + +Pass through the existing "outputObscuredDueToInsufficientExternalProtection" status as an +error, similarly to what we do for CDMSessionMediaSourceAVFObjC. + +* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: +(WebCore::CDMSessionAVFoundationObjC::~CDMSessionAVFoundationObjC): Deleted. +* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm: +(SOFT_LINK_CLASS): +(-[WebCDMSessionAVFoundationObjCListener initWithParent:player:]): +(-[WebCDMSessionAVFoundationObjCListener invalidate]): +(-[WebCDMSessionAVFoundationObjCListener observeValueForKeyPath:ofObject:change:context:]): +(WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC): +(WebCore::CDMSessionAVFoundationObjC::~CDMSessionAVFoundationObjC): +(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest): +(WebCore::CDMSessionAVFoundationObjC::playerDidReceiveError): +* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: +(WebCore::MediaPlayerPrivateAVFoundationObjC::avPlayer): + 2016-04-18 Chris Dumez Unreviewed, rolling out r199644. Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h (199671 => 199672) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h 2016-04-18 16:04:07 UTC (rev 199671) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h 2016-04-18 16:14:36 UTC (rev 199672) @@ -28,10 +28,12 @@ #include "CDMSession.h" #include +#include #if ENABLE(ENCRYPTED_MEDIA_V2) OBJC_CLASS AVAssetResourceLoadingRequest; +OBJC_CLASS WebCDMSessionAVFoundationObjCListener; namespace WebCore { @@ -40,7 +42,7 @@ class CDMSessionAVFoundationObjC : public CDMSession { public: CDMSessionAVFoundationObjC(MediaPlayerPrivateAVFoundationObjC* parent, CDMSessionClient*); -virtual ~CDMSessionAVFoundationObjC() { } +virtual ~CDMSessionAVFoundationObjC(); CDMSessionType type() override { return CDMSessionTypeAVFoundationObjC; } void setClient(CDMSessionClient* client) override { m_client = client; } @@ -49,11 +51,14 @@ void releaseKeys() override; bool update(Uint8Array*, RefPtr& nextMessage, unsigned short& errorCode, uint32_t& systemCode) override; +void playerDidReceiveError(NSError *); + protected: -MediaPlayerPrivateAVFoundationObjC* m_parent; +WeakPtr m_parent; CDMSessionClient* m_client; String m_sessionId; RetainPtr m_request; +RetainPtr m_listener; }; } Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm (199671 => 199672) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm 2016-04-18 16:04:07
[webkit-changes] [199846] trunk/Source/WebKit/mac
Title: [199846] trunk/Source/WebKit/mac Revision 199846 Author jer.no...@apple.com Date 2016-04-21 16:56:03 -0700 (Thu, 21 Apr 2016) Log Message [WK1] Add WebPlaybackSession support to WebKit https://bugs.webkit.org/show_bug.cgi?id=156854 Reviewed by Beth Dakin. Add support for WebPlaybackSession and the ChromeClient methods setUpPlaybackControlsManager() and clearPlaybackControlsManager() to WebKit. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::setUpPlaybackControlsManager): (WebChromeClient::clearPlaybackControlsManager): * WebView/WebView.mm: (-[WebView _hasActiveVideoForControlsInterface]): (-[WebView _setUpPlaybackControlsManagerForMediaElement:]): (-[WebView _clearPlaybackControlsManagerForMediaElement:]): * WebView/WebViewData.h: * WebView/WebViewData.mm: * WebView/WebViewInternal.h: Modified Paths trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit/mac/WebView/WebViewData.h trunk/Source/WebKit/mac/WebView/WebViewData.mm trunk/Source/WebKit/mac/WebView/WebViewInternal.h Diff Modified: trunk/Source/WebKit/mac/ChangeLog (199845 => 199846) --- trunk/Source/WebKit/mac/ChangeLog 2016-04-21 23:30:36 UTC (rev 199845) +++ trunk/Source/WebKit/mac/ChangeLog 2016-04-21 23:56:03 UTC (rev 199846) @@ -1,3 +1,25 @@ +2016-04-21 Jer Noble + +[WK1] Add WebPlaybackSession support to WebKit +https://bugs.webkit.org/show_bug.cgi?id=156854 + +Reviewed by Beth Dakin. + +Add support for WebPlaybackSession and the ChromeClient methods setUpPlaybackControlsManager() and +clearPlaybackControlsManager() to WebKit. + +* WebCoreSupport/WebChromeClient.h: +* WebCoreSupport/WebChromeClient.mm: +(WebChromeClient::setUpPlaybackControlsManager): +(WebChromeClient::clearPlaybackControlsManager): +* WebView/WebView.mm: +(-[WebView _hasActiveVideoForControlsInterface]): +(-[WebView _setUpPlaybackControlsManagerForMediaElement:]): +(-[WebView _clearPlaybackControlsManagerForMediaElement:]): +* WebView/WebViewData.h: +* WebView/WebViewData.mm: +* WebView/WebViewInternal.h: + 2016-04-21 Anders Carlsson Stop using ApplicationCacheStorage::singleton() in WebKitLegacy Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h (199845 => 199846) --- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h 2016-04-21 23:30:36 UTC (rev 199845) +++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h 2016-04-21 23:56:03 UTC (rev 199846) @@ -175,6 +175,11 @@ } #if ENABLE(VIDEO) +#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) +void setUpPlaybackControlsManager(WebCore::HTMLMediaElement&) override; +void clearPlaybackControlsManager(WebCore::HTMLMediaElement&) override; +#endif + bool supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override; void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override; void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) override; Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (199845 => 199846) --- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm 2016-04-21 23:30:36 UTC (rev 199845) +++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm 2016-04-21 23:56:03 UTC (rev 199846) @@ -909,7 +909,6 @@ } #if ENABLE(VIDEO) - bool WebChromeClient::supportsVideoFullscreen(HTMLMediaElementEnums::VideoFullscreenMode) { #if PLATFORM(IOS) @@ -934,8 +933,19 @@ END_BLOCK_OBJC_EXCEPTIONS; } -#endif +#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) +void WebChromeClient::setUpPlaybackControlsManager(HTMLMediaElement& element) +{ +[m_webView _setUpPlaybackControlsManagerForMediaElement:element]; +} +void WebChromeClient::clearPlaybackControlsManager(HTMLMediaElement& element) +{ +[m_webView _clearPlaybackControlsManagerForMediaElement:element]; +} +#endif // PLATFORM(MAC) +#endif // ENABLE(VIDEO) + #if ENABLE(FULLSCREEN_API) bool WebChromeClient::supportsFullScreenForElement(const Element* element, bool withKeyboard) Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (199845 => 199846) --- trunk/Source/WebKit/mac/WebView/WebView.mm 2016-04-21 23:30:36 UTC (rev 199845) +++ trunk/Source/WebKit/mac/WebView/WebView.mm 2016-04-21 23:56:03 UTC (rev 199846) @@ -301,6 +301,11 @@ #import #endif +#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) +#import +#import +#endif + #if PLATFORM(MAC) SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUNotificationPopoverWillClose, NSString *) #endif @@ -8517,6 +8522,50 @@ _private->fullscreenController = nil; }
[webkit-changes] [199912] trunk/Source/WebCore
Title: [199912] trunk/Source/WebCore Revision 199912 Author jer.no...@apple.com Date 2016-04-22 14:48:39 -0700 (Fri, 22 Apr 2016) Log Message [iOS] Crash at -[WebAVPlayerLayer resolveBounds] https://bugs.webkit.org/show_bug.cgi?id=156931 Reviewed by Eric Carlson. When cloning the WebAVPlayerLayer, we must copy over the fullscreenInterface to the cloned layer. * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm Diff Modified: trunk/Source/WebCore/ChangeLog (199911 => 199912) --- trunk/Source/WebCore/ChangeLog 2016-04-22 21:40:39 UTC (rev 199911) +++ trunk/Source/WebCore/ChangeLog 2016-04-22 21:48:39 UTC (rev 199912) @@ -1,3 +1,16 @@ +2016-04-22 Jer Noble + +[iOS] Crash at -[WebAVPlayerLayer resolveBounds] +https://bugs.webkit.org/show_bug.cgi?id=156931 + + +Reviewed by Eric Carlson. + +When cloning the WebAVPlayerLayer, we must copy over the fullscreenInterface to the cloned layer. + +* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: +(WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView): + 2016-04-22 Chris Dumez Crash under WebCore::DataDetection::detectContentInRange() Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (199911 => 199912) --- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-04-22 21:40:39 UTC (rev 199911) +++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-04-22 21:48:39 UTC (rev 199912) @@ -458,6 +458,7 @@ [pipPlayerLayer setVideoGravity:playerLayer.videoGravity]; [pipPlayerLayer setModelVideoLayerFrame:playerLayer.modelVideoLayerFrame]; [pipPlayerLayer setPlayerController:playerLayer.playerController]; +[pipPlayerLayer setFullscreenInterface:playerLayer.fullscreenInterface]; [pipView addSubview:playerLayerView.videoView]; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [200052] trunk/Source/WebCore
Title: [200052] trunk/Source/WebCore Revision 200052 Author jer.no...@apple.com Date 2016-04-25 14:58:11 -0700 (Mon, 25 Apr 2016) Log Message WebKitPlaybackSessionModelMediaElement should initialize the interface added by setWebPlaybackSessionInterface() with initial data https://bugs.webkit.org/show_bug.cgi?id=156996 Reviewed by Beth Dakin. Notify the interface of the current values in the media element when the model is given an interface. * platform/cocoa/WebPlaybackSessionModelMediaElement.mm: (WebPlaybackSessionModelMediaElement::setWebPlaybackSessionInterface): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm Diff Modified: trunk/Source/WebCore/ChangeLog (200051 => 200052) --- trunk/Source/WebCore/ChangeLog 2016-04-25 21:38:19 UTC (rev 200051) +++ trunk/Source/WebCore/ChangeLog 2016-04-25 21:58:11 UTC (rev 200052) @@ -1,3 +1,15 @@ +2016-04-25 Jer Noble + +WebKitPlaybackSessionModelMediaElement should initialize the interface added by setWebPlaybackSessionInterface() with initial data +https://bugs.webkit.org/show_bug.cgi?id=156996 + +Reviewed by Beth Dakin. + +Notify the interface of the current values in the media element when the model is given an interface. + +* platform/cocoa/WebPlaybackSessionModelMediaElement.mm: +(WebPlaybackSessionModelMediaElement::setWebPlaybackSessionInterface): + 2016-04-25 Simon Fraser Toggling animation-play-state can re-start a finished animation Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm (200051 => 200052) --- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm 2016-04-25 21:38:19 UTC (rev 200051) +++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm 2016-04-25 21:58:11 UTC (rev 200052) @@ -65,11 +65,21 @@ m_playbackSessionInterface = interface; -if (m_playbackSessionInterface) { -m_playbackSessionInterface->resetMediaState(); -if (m_mediaElement) -m_playbackSessionInterface->setWirelessVideoPlaybackDisabled(m_mediaElement->mediaSession().wirelessVideoPlaybackDisabled(*m_mediaElement)); -} +if (!m_playbackSessionInterface) +return; + +m_playbackSessionInterface->resetMediaState(); +if (!m_mediaElement) +return; + +m_playbackSessionInterface->setDuration(m_mediaElement->duration()); +m_playbackSessionInterface->setCurrentTime(m_mediaElement->currentTime(), [[NSProcessInfo processInfo] systemUptime]); +m_playbackSessionInterface->setBufferedTime(m_mediaElement->maxBufferedTime()); +m_playbackSessionInterface->setRate(!m_mediaElement->paused(), m_mediaElement->playbackRate()); +m_playbackSessionInterface->setSeekableRanges(*m_mediaElement->seekable()); +m_playbackSessionInterface->setCanPlayFastReverse(m_mediaElement->minFastReverseRate() < 0.0); +m_playbackSessionInterface->setWirelessVideoPlaybackDisabled(m_mediaElement->mediaSession().wirelessVideoPlaybackDisabled(*m_mediaElement)); +updateLegibleOptions(); } void WebPlaybackSessionModelMediaElement::setMediaElement(HTMLMediaElement* mediaElement) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [200254] trunk/Source/WebCore
Title: [200254] trunk/Source/WebCore Revision 200254 Author jer.no...@apple.com Date 2016-04-29 11:24:57 -0700 (Fri, 29 Apr 2016) Log Message WebPlaybackControlsManager should not be owned by the WebPlaybackSessionInterfaceMac. https://bugs.webkit.org/show_bug.cgi?id=157155 Reviewed by Beth Dakin. Move the WebPlaybackControlsManager class into its own header and implementation files. * WebCore.xcodeproj/project.pbxproj: * platform/mac/WebPlaybackControlsManager.h: Added. * platform/mac/WebPlaybackControlsManager.mm: Added. (-[WebPlaybackControlsManager timing]): Moved from WebPlaybackSessionInterfaceMac. (-[WebPlaybackControlsManager setTiming:]): Ditto. (-[WebPlaybackControlsManager seekableTimeRanges]): Ditto. (-[WebPlaybackControlsManager setSeekableTimeRanges:]): Ditto. (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Ditto. (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Ditto. * platform/mac/WebPlaybackSessionInterfaceMac.h: * platform/mac/WebPlaybackSessionInterfaceMac.mm: (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager): (-[WebPlaybackControlsManager initWithWebPlaybackSessionInterfaceMac:]): Deleted. (-[WebPlaybackControlsManager timing]): Deleted. (-[WebPlaybackControlsManager setTiming:]): Deleted. (-[WebPlaybackControlsManager seekableTimeRanges]): Deleted. (-[WebPlaybackControlsManager setSeekableTimeRanges:]): Deleted. (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Deleted. (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Deleted. (WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm Added Paths trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm Diff Modified: trunk/Source/WebCore/ChangeLog (200253 => 200254) --- trunk/Source/WebCore/ChangeLog 2016-04-29 18:23:40 UTC (rev 200253) +++ trunk/Source/WebCore/ChangeLog 2016-04-29 18:24:57 UTC (rev 200254) @@ -1,3 +1,34 @@ +2016-04-28 Jer Noble + +WebPlaybackControlsManager should not be owned by the WebPlaybackSessionInterfaceMac. +https://bugs.webkit.org/show_bug.cgi?id=157155 + + +Reviewed by Beth Dakin. + +Move the WebPlaybackControlsManager class into its own header and implementation files. + +* WebCore.xcodeproj/project.pbxproj: +* platform/mac/WebPlaybackControlsManager.h: Added. +* platform/mac/WebPlaybackControlsManager.mm: Added. +(-[WebPlaybackControlsManager timing]): Moved from WebPlaybackSessionInterfaceMac. +(-[WebPlaybackControlsManager setTiming:]): Ditto. +(-[WebPlaybackControlsManager seekableTimeRanges]): Ditto. +(-[WebPlaybackControlsManager setSeekableTimeRanges:]): Ditto. +(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Ditto. +(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Ditto. +* platform/mac/WebPlaybackSessionInterfaceMac.h: +* platform/mac/WebPlaybackSessionInterfaceMac.mm: +(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager): +(-[WebPlaybackControlsManager initWithWebPlaybackSessionInterfaceMac:]): Deleted. +(-[WebPlaybackControlsManager timing]): Deleted. +(-[WebPlaybackControlsManager setTiming:]): Deleted. +(-[WebPlaybackControlsManager seekableTimeRanges]): Deleted. +(-[WebPlaybackControlsManager setSeekableTimeRanges:]): Deleted. +(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]): Deleted. +(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]): Deleted. +(WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager): Deleted. + 2016-04-29 Commit Queue Unreviewed, rolling out r200232. Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (200253 => 200254) --- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-04-29 18:23:40 UTC (rev 200253) +++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-04-29 18:24:57 UTC (rev 200254) @@ -6038,6 +6038,8 @@ CD54DE4B17469C6D005E5B36 /* AudioSessionMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */; }; CD5596911475B678001D0BD0 /* AudioFileReaderIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD55968F1475B678001D0BD0 /* AudioFileReaderIOS.cpp */; }; CD5596921475B678001D0BD0 /* AudioFileReaderIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5596901475B678001D0BD0 /* AudioFileReade
[webkit-changes] [200396] trunk/Source/WebKit2
Title: [200396] trunk/Source/WebKit2 Revision 200396 Author jer.no...@apple.com Date 2016-05-03 18:04:37 -0700 (Tue, 03 May 2016) Log Message [iOS][WK2] Allow WKWebView to play local filesystem media when created with -loadFileURL:allowingReadAccessToURL: https://bugs.webkit.org/show_bug.cgi?id=156875 Reviewed by Alexey Proskuryakov. Grant AVFoundation the right to issue file read sandbox extensions from the WebContent process to the mediaserverd process, so that it can play back local media files. * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb Diff Modified: trunk/Source/WebKit2/ChangeLog (200395 => 200396) --- trunk/Source/WebKit2/ChangeLog 2016-05-04 01:03:55 UTC (rev 200395) +++ trunk/Source/WebKit2/ChangeLog 2016-05-04 01:04:37 UTC (rev 200396) @@ -1,3 +1,16 @@ +2016-05-03 Jer Noble + +[iOS][WK2] Allow WKWebView to play local filesystem media when created with -loadFileURL:allowingReadAccessToURL: +https://bugs.webkit.org/show_bug.cgi?id=156875 + + +Reviewed by Alexey Proskuryakov. + +Grant AVFoundation the right to issue file read sandbox extensions from the WebContent process to the mediaserverd +process, so that it can play back local media files. + +* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: + 2016-05-03 Jiewen Tan File Upload: Photo upload name is always generic (image.jpg) Modified: trunk/Source/WebKit2/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (200395 => 200396) --- trunk/Source/WebKit2/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb 2016-05-04 01:03:55 UTC (rev 200395) +++ trunk/Source/WebKit2/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb 2016-05-04 01:04:37 UTC (rev 200396) @@ -91,3 +91,8 @@ ;; Allow ManagedPreference access (allow file-read* (literal "/private/var/Managed Preferences/mobile/com.apple.webcontentfilter.plist")) + +;; Allow mediaserverd to issue file extensions for the purposes of reading media +(allow file-issue-extension (require-all +(extension "com.apple.app-sandbox.read") +(extension-class "com.apple.mediaserverd.read"))) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [200490] trunk/Source
e values passed through WebPlaybackSessionManagerProxy. * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h: * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: (WebKit::WebPlaybackSessionManagerProxy::setCurrentTime): (WebKit::WebPlaybackSessionManagerProxy::setBufferedTime): (WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector): (WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse): (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions): (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions): (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties): (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled): (WebKit::WebPlaybackSessionManagerProxy::setDuration): (WebKit::WebPlaybackSessionManagerProxy::setRate): * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h: * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode): Deleted. (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted. (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted. (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Deleted. (WebKit::WebVideoFullscreenModelContext::isVisible): Deleted. (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen): Deleted. (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen): Deleted. (WebKit::WebVideoFullscreenModelContext::didExitFullscreen): Deleted. (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen): Deleted. (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): Deleted. (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.h trunk/Source/WebCore/html/MediaController.cpp trunk/Source/WebCore/html/MediaController.h trunk/Source/WebCore/html/MediaControllerInterface.h trunk/Source/WebCore/html/TimeRanges.cpp trunk/Source/WebCore/html/TimeRanges.h trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm trunk/Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm Diff Modified: trunk/Source/WebCore/ChangeLog (200489 => 200490) --- trunk/Source/WebCore/ChangeLog 2016-05-05 23:11:13 UTC (rev 200489) +++ trunk/Source/WebCore/ChangeLog 2016-05-05 23:18:20 UTC (rev 200490) @@ -1,3 +1,94 @@ +2016-05-05 Jer Noble + +[WK2] Media controls don't update if controller is created after the interface is created +https://bugs.webkit.org/show_bug.cgi?id=157376 + +Reviewed by Beth Dakin. + +Add getter methods to WebPlaybackSessionModel so that the model's values can be retrieved +if those values were missed before the equivalent WebPlaybackSessionInterface methods were +called. This necessatates a bunch of changes in HTMLMediaElement and related classes to +change PassRefPtr types to Ref (and one change in TimeRanges itself). +WebPlaybackSessionModelMediaElement can implement these new getter methods by querying the +values from the HTMLMediaElement, something it was doing already, so most of those changes +are simple refactoring. + +There's no reason any longer for WebVideoFullscreenModel to inherit from WebPlaybackSessionModel, +so remove that superclass. + +In WebPlaybackSessionInterfaceMac, when a new WebPlaybackControlsManager is set, use the new +getter methods on WebPlaybackSessionModel to update the values in the manager. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): +(WebCore::HTMLMediaElement::maxBufferedTime): +(WebCore::HTMLMediaElement::played): +(WebCore::HTMLMediaElement::buffered): Deleted. +(WebCore::HTMLMediaElement::seekable): Deleted. +* html/HT
[webkit-changes] [200516] trunk
Title: [200516] trunk Revision 200516 Author jer.no...@apple.com Date 2016-05-06 12:54:15 -0700 (Fri, 06 May 2016) Log Message Muted media elements should be allowed to autoplay, even if RequireUserGestureForAudioRateChange is set. https://bugs.webkit.org/show_bug.cgi?id=157404 Reviewed by Eric Carlson. Source/WebCore: Test: media/audio-playback-restriction-play-muted.html Add element.muted() as a critera of whether playback is permitted when RequireUserGestureForAudioRateChange is set. Also, make sure to re-evaluate whether the element should be playing when muted is changed without a user gesture. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setMuted): * html/MediaElementSession.cpp: (WebCore::MediaElementSession::playbackPermitted): LayoutTests: * media/audio-playback-restriction-play-muted-expected.txt: Added. * media/audio-playback-restriction-play-muted.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/MediaElementSession.cpp Added Paths trunk/LayoutTests/media/audio-playback-restriction-play-muted-expected.txt trunk/LayoutTests/media/audio-playback-restriction-play-muted.html Diff Modified: trunk/LayoutTests/ChangeLog (200515 => 200516) --- trunk/LayoutTests/ChangeLog 2016-05-06 19:25:41 UTC (rev 200515) +++ trunk/LayoutTests/ChangeLog 2016-05-06 19:54:15 UTC (rev 200516) @@ -1,3 +1,14 @@ +2016-05-06 Jer Noble + +Muted media elements should be allowed to autoplay, even if RequireUserGestureForAudioRateChange is set. +https://bugs.webkit.org/show_bug.cgi?id=157404 + + +Reviewed by Eric Carlson. + +* media/audio-playback-restriction-play-muted-expected.txt: Added. +* media/audio-playback-restriction-play-muted.html: Added. + 2016-05-06 Manuel Rego Casasnovas [css-grid] Unprefix CSS Grid Layout properties Added: trunk/LayoutTests/media/audio-playback-restriction-play-muted-expected.txt (0 => 200516) --- trunk/LayoutTests/media/audio-playback-restriction-play-muted-expected.txt (rev 0) +++ trunk/LayoutTests/media/audio-playback-restriction-play-muted-expected.txt 2016-05-06 19:54:15 UTC (rev 200516) @@ -0,0 +1,12 @@ +Test that, when RequireUserGestureForAudioRateChange is set, starting playback of an muted audio file does not require a user gesture. + + +RUN(internals.setMediaElementRestrictions(video, "RequireUserGestureForAudioRateChange")) +RUN(video.src = "" "content/test")) +EVENT(canplaythrough) +RUN(video.play()) +EVENT(playing) +RUN(video.muted = false) +EVENT(pause) +END OF TEST + Added: trunk/LayoutTests/media/audio-playback-restriction-play-muted.html (0 => 200516) --- trunk/LayoutTests/media/audio-playback-restriction-play-muted.html (rev 0) +++ trunk/LayoutTests/media/audio-playback-restriction-play-muted.html 2016-05-06 19:54:15 UTC (rev 200516) @@ -0,0 +1,41 @@ + + + +audio-playback-restriction + +function runTest() +{ +video = document.getElementsByTagName('audio')[0]; + +if (window.internals) +run('internals.setMediaElementRestrictions(video, "RequireUserGestureForAudioRateChange")'); + +waitForEventAndFail('error'); +waitForEvent('canplaythrough', canplaythrough); +run('video.src = "" "content/test")'); +} + +function canplaythrough() +{ +waitForEvent('playing', playing); +run('video.play()'); +} + +function playing() +{ +run('video.muted = false'); +waitForEventAndEnd('pause'); +failTestIn(100); +} + + + + +Test that, when RequireUserGestureForAudioRateChange is set, starting playback of an muted audio file does not require a user gesture. + + + + Modified: trunk/Source/WebCore/ChangeLog (200515 => 200516) --- trunk/Source/WebCore/ChangeLog 2016-05-06 19:25:41 UTC (rev 200515) +++ trunk/Source/WebCore/ChangeLog 2016-05-06 19:54:15 UTC (rev 200516) @@ -1,3 +1,22 @@ +2016-05-06 Jer Noble + +Muted media elements should be allowed to autoplay, even if RequireUserGestureForAudioRateChange is set. +https://bugs.webkit.org/show_bug.cgi?id=157404 + + +Reviewed by Eric Carlson. + +Test: media/audio-playback-restriction-play-muted.html + +Add element.muted() as a critera of whether playback is permitted when +RequireUserGestureForAudioRateChange is set. Also, make sure to re-evaluate whether the +element should be playing when muted is changed without a user gesture. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::setMuted): +* html/MediaElementSession.cpp: +(WebCore::MediaElementSession::playbackPermi
[webkit-changes] [221937] trunk/Source/WebCore
Title: [221937] trunk/Source/WebCore Revision 221937 Author jer.no...@apple.com Date 2017-09-12 13:14:57 -0700 (Tue, 12 Sep 2017) Log Message [MSE] Don't increase the reported totalFrameDelay for non-displayed frames (or frames coming in while paused). https://bugs.webkit.org/show_bug.cgi?id=175900 Reviewed by Eric Carlson. When seeking to a specific time, the decompression session necessarily needs to be fed samples from before that time (i.e., all samples from the previous I-frame forward). These shouldn't contribute to the "total frame delay" metric. Neither should samples delivered when the video is paused (like, during seeking), as a frame can't be "late" if time is not moving forward. * platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::handleDecompressionOutput): * platform/cf/CoreMediaSoftLink.cpp: * platform/cf/CoreMediaSoftLink.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm Diff Modified: trunk/Source/WebCore/ChangeLog (221936 => 221937) --- trunk/Source/WebCore/ChangeLog 2017-09-12 20:03:43 UTC (rev 221936) +++ trunk/Source/WebCore/ChangeLog 2017-09-12 20:14:57 UTC (rev 221937) @@ -1,3 +1,20 @@ +2017-09-12 Jer Noble + +[MSE] Don't increase the reported totalFrameDelay for non-displayed frames (or frames coming in while paused). +https://bugs.webkit.org/show_bug.cgi?id=175900 + +Reviewed by Eric Carlson. + +When seeking to a specific time, the decompression session necessarily needs to be fed samples from before that +time (i.e., all samples from the previous I-frame forward). These shouldn't contribute to the "total frame +delay" metric. Neither should samples delivered when the video is paused (like, during seeking), as a frame can't +be "late" if time is not moving forward. + +* platform/graphics/cocoa/WebCoreDecompressionSession.mm: +(WebCore::WebCoreDecompressionSession::handleDecompressionOutput): +* platform/cf/CoreMediaSoftLink.cpp: +* platform/cf/CoreMediaSoftLink.h: + 2017-09-12 Sam Weinig Gtk build fix for "Finish off the FormData implementation" - https://bugs.webkit.org/show_bug.cgi?id=176659 Modified: trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp (221936 => 221937) --- trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp 2017-09-12 20:03:43 UTC (rev 221936) +++ trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp 2017-09-12 20:14:57 UTC (rev 221937) @@ -102,6 +102,7 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMSetAttachment, void, (CMAttachmentBearerRef target, CFStringRef key, CFTypeRef value, CMAttachmentMode attachmentMode), (target, key, value, attachmentMode)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseCreateWithMasterClock, OSStatus, (CFAllocatorRef allocator, CMClockRef masterClock, CMTimebaseRef *timebaseOut), (allocator, masterClock, timebaseOut)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseGetTime, CMTime, (CMTimebaseRef timebase), (timebase)) +SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseGetRate, Float64, (CMTimebaseRef timebase), (timebase)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseSetRate, OSStatus, (CMTimebaseRef timebase, Float64 rate), (timebase, rate)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseSetTime, OSStatus, (CMTimebaseRef timebase, CMTime time), (timebase, time)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreMedia, CMTimebaseGetEffectiveRate, Float64, (CMTimebaseRef timebase), (timebase)) Modified: trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h (221936 => 221937) --- trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h 2017-09-12 20:03:43 UTC (rev 221936) +++ trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h 2017-09-12 20:14:57 UTC (rev 221937) @@ -163,6 +163,8 @@ #define CMTimebaseCreateWithMasterClock softLink_CoreMedia_CMTimebaseCreateWithMasterClock SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreMedia, CMTimebaseGetTime, CMTime, (CMTimebaseRef timebase), (timebase)) #define CMTimebaseGetTime softLink_CoreMedia_CMTimebaseGetTime +SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreMedia, CMTimebaseGetRate, Float64, (CMTimebaseRef timebase), (timebase)) +#define CMTimebaseGetRate softLink_CoreMedia_CMTimebaseGetRate SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreMedia, CMTimebaseSetRate, OSStatus, (CMTimebaseRef timebase, Float64 rate), (timebase, rate)) #define CMTimebaseSetRate softLink_CoreMedia_CMTimebaseSetRate SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreMedia, CMTimebaseSetTime, OSStatus, (CMTimebaseRef timebase, CMTime time), (timebase, time)) Modified: trunk/Source/WebCore/platform/graphics/c
[webkit-changes] [222225] trunk
ore::ImageDecoderAVFObjC::frameBytesAtIndex const): Ditto. (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): If the sample data has already been decompressed, return it. Otherwise, walk through the sample table decompressing frames until the desired frame is decoded. (WebCore::ImageDecoderAVFObjC::setData): (WebCore::ImageDecoderAVFObjC::clearFrameBufferCache): Modify WebCoreDecompressionSession so that it can emit frames which have been converted from YUV -> RGB as part of the decode operation. Also, add a synchronous decoding operation method, for use in ImageDecoderAVFObjC. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession): * platform/graphics/cocoa/WebCoreDecompressionSession.h: (WebCore::WebCoreDecompressionSession::createOpenGL): (WebCore::WebCoreDecompressionSession::createRGB): * platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::WebCoreDecompressionSession): (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample): (WebCore::WebCoreDecompressionSession::decodeSample): (WebCore::WebCoreDecompressionSession::decodeSampleSync): Other changes: * WebCore.xcodeproj/project.pbxproj: Add new files to project. * platform/cocoa/VideoToolboxSoftLink.cpp: Add newly referenced methods. * platform/cocoa/VideoToolboxSoftLink.h: Ditto. Source/WTF: * wtf/Platform.h: LayoutTests: * fast/images/animated-image-mp4-expected.txt: Added. * fast/images/animated-image-mp4.html: Added. * fast/images/resources/animated-red-green-blue.mp4: Added. * platform/ios/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/ios/TestExpectations trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/Platform.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/loader/cache/CachedImage.h trunk/Source/WebCore/loader/cache/CachedResource.h trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h trunk/Source/WebCore/platform/graphics/Image.cpp trunk/Source/WebCore/platform/graphics/Image.h trunk/Source/WebCore/platform/graphics/ImageDecoder.cpp trunk/Source/WebCore/platform/graphics/ImageDecoder.h trunk/Source/WebCore/platform/graphics/ImageFrameCache.cpp trunk/Source/WebCore/platform/graphics/ImageFrameCache.h trunk/Source/WebCore/platform/graphics/ImageObserver.h trunk/Source/WebCore/platform/graphics/ImageSource.cpp trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm Added Paths trunk/LayoutTests/fast/images/animated-image-mp4-expected.txt trunk/LayoutTests/fast/images/animated-image-mp4.html trunk/LayoutTests/fast/images/resources/animated-red-green-blue.mp4 trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm Diff Modified: trunk/LayoutTests/ChangeLog (24 => 25) --- trunk/LayoutTests/ChangeLog 2017-09-19 21:11:41 UTC (rev 24) +++ trunk/LayoutTests/ChangeLog 2017-09-19 21:15:46 UTC (rev 25) @@ -1,3 +1,15 @@ +2017-09-19 Jer Noble + +[Cocoa] Add an ImageDecoder subclass backed by AVFoundation +https://bugs.webkit.org/show_bug.cgi?id=176825 + +Reviewed by Eric Carlson. + +* fast/images/animated-image-mp4-expected.txt: Added. +* fast/images/animated-image-mp4.html: Added. +* fast/images/resources/animated-red-green-blue.mp4: Added. +* platform/ios/TestExpectations: + 2017-09-19 Matt Lewis Marked imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https.html as flaky on El Capitan Debug. Added: trunk/LayoutTests/fast/images/animated-image-mp4-expected.txt (0 => 25) --- trunk/LayoutTests/fast/images/animated-image-mp4-expected.txt (rev 0) +++ trunk/LayoutTests/fast/images/animated-image-mp4-expected.txt 2017-09-19 21:15:46 UTC (rev 25) @@ -0,0 +1,16 @@ +Test that an mp4 media file loaded as an image can be painted in a canvas. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS Image eventually became red +PASS Image eventually became green +PASS Image eventually became blue +PASS Image eventually became red +PASS Image eventually became green +PASS Image eventually became blue +PASS Image eventually became red +PASS successfullyParsed is true + +TEST COMPLETE + Added: trunk/LayoutTests/fast/images/animated-image-mp4.html (0 => 25) --- trunk/LayoutTests/fast/images/animated-image-mp4.ht
[webkit-changes] [222505] trunk
Title: [222505] trunk Revision 222505 Author jer.no...@apple.com Date 2017-09-26 10:53:47 -0700 (Tue, 26 Sep 2017) Log Message Thrown ObjC exception when right clicking on containing mp4 link https://bugs.webkit.org/show_bug.cgi?id=177370 Reviewed by Darin Adler. Source/WebKit: Creating a NSImage from mp4 data will fail and return nil; do a nil-check before attempting to put the results into a NSMutableArray. * UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::WebContextMenuProxyMac::createShareMenuItem): Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.html: Added. * TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm: Added. (-[ContextMenuImgWithVideoDelegate _webView:contextMenu:forElement:]): (TestWebKitAPI::TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.html trunk/Tools/TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm Diff Modified: trunk/Source/WebKit/ChangeLog (222504 => 222505) --- trunk/Source/WebKit/ChangeLog 2017-09-26 17:40:40 UTC (rev 222504) +++ trunk/Source/WebKit/ChangeLog 2017-09-26 17:53:47 UTC (rev 222505) @@ -1,3 +1,16 @@ +2017-09-26 Jer Noble + +Thrown ObjC exception when right clicking on containing mp4 link +https://bugs.webkit.org/show_bug.cgi?id=177370 + +Reviewed by Darin Adler. + +Creating a NSImage from mp4 data will fail and return nil; do a nil-check before attempting +to put the results into a NSMutableArray. + +* UIProcess/mac/WebContextMenuProxyMac.mm: +(WebKit::WebContextMenuProxyMac::createShareMenuItem): + 2017-09-26 Brian Burg Web Automation: add commands to get and set user permissions for pages in an automation session Modified: trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm (222504 => 222505) --- trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm 2017-09-26 17:40:40 UTC (rev 222504) +++ trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm 2017-09-26 17:53:47 UTC (rev 222505) @@ -283,8 +283,8 @@ } if (hitTestData.imageSharedMemory && hitTestData.imageSize) { -auto image = adoptNS([[NSImage alloc] initWithData:[NSData dataWithBytes:(unsigned char*)hitTestData.imageSharedMemory->data() length:hitTestData.imageSize]]); -[items addObject:image.get()]; +if (auto image = adoptNS([[NSImage alloc] initWithData:[NSData dataWithBytes:(unsigned char*)hitTestData.imageSharedMemory->data() length:hitTestData.imageSize]])) +[items addObject:image.get()]; } if (!m_context.selectedText().isEmpty()) Modified: trunk/Tools/ChangeLog (222504 => 222505) --- trunk/Tools/ChangeLog 2017-09-26 17:40:40 UTC (rev 222504) +++ trunk/Tools/ChangeLog 2017-09-26 17:53:47 UTC (rev 222505) @@ -1,3 +1,16 @@ +2017-09-26 Jer Noble + +Thrown ObjC exception when right clicking on containing mp4 link +https://bugs.webkit.org/show_bug.cgi?id=177370 + +Reviewed by Darin Adler. + +* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: +* TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.html: Added. +* TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm: Added. +(-[ContextMenuImgWithVideoDelegate _webView:contextMenu:forElement:]): +(TestWebKitAPI::TEST): + 2017-09-26 Per Arne Vollan [Win] 'webkit-patch clean' is failing on bot. Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (222504 => 222505) --- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-09-26 17:40:40 UTC (rev 222504) +++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-09-26 17:53:47 UTC (rev 222505) @@ -621,6 +621,8 @@ C9C60E651E53A9DC006DA181 /* autoplay-check-frame.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C9C60E631E53A9BA006DA181 /* autoplay-check-frame.html */; }; C9C60E661E53A9DC006DA181 /* autoplay-check-in-iframe.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C9C60E641E53A9BA006DA181 /* autoplay-check-in-iframe.html */; }; C9E6DD351EA97D0800DD78AA /* FirstResponderSuppression.mm in Sources */ = {isa = PBXBuildFile; fileRef = C9E6DD311EA972D800DD78AA /* FirstResponderSuppression.mm */; }; + CD0BD0A61F79924D001AB2CF /* ContextMenuImgWithVideo.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD0BD0A51F799220001AB2CF /* ContextMenuImgWithVideo.mm */; }; + CD0BD0A81F79982D001AB2CF /* ContextMenuImgWithVideo.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD0BD0A71F7997C2001AB2CF /* ContextMenuImgWithVideo.html */; }; CD321B041E3A85FA00EB21C8 /* video-with-muted-audio-and-webau
[webkit-changes] [222803] trunk/Source/WebCore
Title: [222803] trunk/Source/WebCore Revision 222803 Author jer.no...@apple.com Date 2017-10-03 12:56:34 -0700 (Tue, 03 Oct 2017) Log Message Implement quality-of-service tiers in WebCoreDecompressionSession https://bugs.webkit.org/show_bug.cgi?id=177769 Reviewed by Dean Jackson. VTDecompressionSession will suggest quality-of-service tiers to be used when decompression can't keep up with playback speed. Use a simple exponential-moving-average heuristic to determine when to move up and down the tiers. Drive-by fix: When frames are so late that they miss the display deadline, mark them as dropped rather than just delayed. * platform/graphics/cocoa/WebCoreDecompressionSession.h: * platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample): (WebCore::WebCoreDecompressionSession::decodeSample): (WebCore::WebCoreDecompressionSession::handleDecompressionOutput): (WebCore::WebCoreDecompressionSession::automaticDequeue): (WebCore::WebCoreDecompressionSession::enqueueDecodedSample): (WebCore::WebCoreDecompressionSession::resetQosTier): (WebCore::WebCoreDecompressionSession::increaseQosTier): (WebCore::WebCoreDecompressionSession::decreaseQosTier): (WebCore::WebCoreDecompressionSession::updateQosWithDecodeTimeStatistics): * platform/cocoa/VideoToolboxSoftLink.cpp: * platform/cocoa/VideoToolboxSoftLink.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm Diff Modified: trunk/Source/WebCore/ChangeLog (222802 => 222803) --- trunk/Source/WebCore/ChangeLog 2017-10-03 19:23:27 UTC (rev 222802) +++ trunk/Source/WebCore/ChangeLog 2017-10-03 19:56:34 UTC (rev 222803) @@ -1,3 +1,31 @@ +2017-10-03 Jer Noble + +Implement quality-of-service tiers in WebCoreDecompressionSession +https://bugs.webkit.org/show_bug.cgi?id=177769 + +Reviewed by Dean Jackson. + +VTDecompressionSession will suggest quality-of-service tiers to be used when decompression +can't keep up with playback speed. Use a simple exponential-moving-average heuristic to +determine when to move up and down the tiers. + +Drive-by fix: When frames are so late that they miss the display deadline, mark them as +dropped rather than just delayed. + +* platform/graphics/cocoa/WebCoreDecompressionSession.h: +* platform/graphics/cocoa/WebCoreDecompressionSession.mm: +(WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample): +(WebCore::WebCoreDecompressionSession::decodeSample): +(WebCore::WebCoreDecompressionSession::handleDecompressionOutput): +(WebCore::WebCoreDecompressionSession::automaticDequeue): +(WebCore::WebCoreDecompressionSession::enqueueDecodedSample): +(WebCore::WebCoreDecompressionSession::resetQosTier): +(WebCore::WebCoreDecompressionSession::increaseQosTier): +(WebCore::WebCoreDecompressionSession::decreaseQosTier): +(WebCore::WebCoreDecompressionSession::updateQosWithDecodeTimeStatistics): +* platform/cocoa/VideoToolboxSoftLink.cpp: +* platform/cocoa/VideoToolboxSoftLink.h: + 2017-10-03 Adrian Perez de Castro [GTK] Support the "system" CSS font family Modified: trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp (222802 => 222803) --- trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp 2017-10-03 19:23:27 UTC (rev 222802) +++ trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp 2017-10-03 19:56:34 UTC (rev 222803) @@ -33,6 +33,7 @@ SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, VideoToolbox) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTSessionCopyProperty, OSStatus, (VTSessionRef session, CFStringRef propertyKey, CFAllocatorRef allocator, void* propertyValueOut), (session, propertyKey, allocator, propertyValueOut)) +SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTSessionSetProperties, OSStatus, (VTSessionRef session, CFDictionaryRef propertyDictionary), (session, propertyDictionary)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTDecompressionSessionCreate, OSStatus, (CFAllocatorRef allocator, CMVideoFormatDescriptionRef videoFormatDescription, CFDictionaryRef videoDecoderSpecification, CFDictionaryRef destinationImageBufferAttributes, const VTDecompressionOutputCallbackRecord* outputCallback, VTDecompressionSessionRef* decompressionSessionOut), (allocator, videoFormatDescription, videoDecoderSpecification, destinationImageBufferAttributes, outputCallback, decompressionSessionOut)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTDecompressionSessionCanAcceptFormatDescription, Boolean, (VTDecompressionSessionRef sessi
[webkit-changes] [222946] trunk
/CDMSessionMediaSourceAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/LegacyMockCDM.cpp trunk/Source/WebCore/testing/LegacyMockCDM.h trunk/Source/WebCore/testing/MockCDMFactory.cpp trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig trunk/Source/WebKitLegacy/mac/ChangeLog trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig Diff Modified: trunk/Source/_javascript_Core/ChangeLog (222945 => 222946) --- trunk/Source/_javascript_Core/ChangeLog 2017-10-05 23:48:10 UTC (rev 222945) +++ trunk/Source/_javascript_Core/ChangeLog 2017-10-06 00:13:23 UTC (rev 222946) @@ -1,3 +1,12 @@ +2017-10-05 Jer Noble + +[Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting +https://bugs.webkit.org/show_bug.cgi?id=177261 + +Reviewed by Eric Carlson. + +* Configurations/FeatureDefines.xcconfig: + 2017-10-05 Ryan Haddad Unreviewed, rolling out r222929. Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (222945 => 222946) --- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2017-10-05 23:48:10 UTC (rev 222945) +++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2017-10-06 00:13:23 UTC (rev 222946) @@ -68,7 +68,7 @@ ENABLE_AVF_CAPTIONS = ENABLE_AVF_CAPTIONS; ENABLE_CACHE_PARTITIONING = ENABLE_CACHE_PARTITIONING; ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING; -ENABLE_ENCRYPTED_MEDIA = ; +ENABLE_ENCRYPTED_MEDIA = ENABLE_ENCRYPTED_MEDIA; ENABLE_CONTENT_FILTERING[sdk=appletv*] = ; ENABLE_CONTENT_FILTERING[sdk=iphone*] = ENABLE_CONTENT_FILTERING; ENABLE_CONTENT_FILTERING[sdk=macosx*] = ENABLE_CONTENT_FILTERING; Modified: trunk/Source/WebCore/ChangeLog (222945 => 222946) --- trunk/Source/WebCore/ChangeLog 2017-10-05 23:48:10 UTC (rev 222945) +++ trunk/Source/WebCore/ChangeLog 2017-10-06 00:13:23 UTC (rev 222946) @@ -1,3 +1,141 @@ +2017-10-05 Jer Noble + +[Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting +https://bugs.webkit.org/show_bug.cgi?id=177261 + +Reviewed by Eric Carlson. + +Enable ENCRYPTED_MEDIA, and make the changes required for ENABLED_MEDIA and LEGACY_ENABLED_MEDIA +to co-exist while both enabled simultaneously. + +* Configurations/FeatureDefines.xcconfig: +* Modules/encryptedmedia/legacy/LegacyCDM.cpp: +(WebCore::LegacyCDM::registerCDMFactory): +(WebCore::LegacyCDM::supportsKeySystem): +(WebCore::LegacyCDM::keySystemSupportsMimeType): +(WebCore::LegacyCDM::create): +(WebCore::LegacyCDM::LegacyCDM): +(WebCore::LegacyCDM::~LegacyCDM): +(WebCore::LegacyCDM::supportsMIMEType const): +(WebCore::LegacyCDM::createSession): +(WebCore::LegacyCDM::mediaPlayer const): +(WebCore::CDM::registerCDMFactory): Deleted. +(WebCore::CDM::supportsKeySystem): Deleted. +(WebCore::CDM::keySystemSupportsMimeType): Deleted. +(WebCore::CDM::create): Deleted. +(WebCore::CDM::CDM): Deleted. +(WebCore::CDM::~CDM): Deleted. +(WebCore::CDM::supportsMIMEType const): Deleted. +(WebCore::CDM::createSession): Deleted. +(WebCore::CDM::mediaPlayer const): Deleted. +* Modules/encryptedmedia/legacy/LegacyCDM.h: +(WebCore::LegacyCDMClient::~LegacyCDMClient): +(WebCore::LegacyCDM::client const): +(WebCore::LegacyCDM::setClient): +(WebCore::CDMClient::~CDMClient): Deleted. +(WebCore::CDM::keySystem const): Deleted. +(WebCore::CDM::client const): Deleted. +(WebCore::CDM::setClient): Deleted. +* Modules/encryptedmedia/legacy/LegacyCDMPrivate.h: +* Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: +(WebCore::LegacyCDMPrivateClearKey::supportsKeySystem): +(WebCore::LegacyCDMPrivateClearKey::supportsKeySystemAndMimeType): +(WebCore::LegacyCDMPrivateClearKey::supportsMIMEType): +(WebCore::LegacyCDMPrivateClearKey::createSession): +(WebCore::CDMPrivateClearKey::supportsKeySystem): Deleted. +(WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Deleted. +(WebCore::CDMPrivateClearKey::supportsMIMEType): Deleted. +(WebCore::CDMPrivateClearKey::createSession)
[webkit-changes] [217799] trunk/Source
rev 217798) +++ trunk/Source/WTF/ChangeLog 2017-06-05 22:40:30 UTC (rev 217799) @@ -1,3 +1,19 @@ +2017-06-05 Jer Noble + +Allow clients to specify a list of codecs which should require hardware decode support. +https://bugs.webkit.org/show_bug.cgi?id=172787 + +Reviewed by Alex Christensen. + +Add a couple of convenience methods: +- a String::split() that returns a vector (rather than taking an out-reference to a vector). +- A Vector::map() template which takes a Callable and returns a Vector of a different type. + +* wtf/Vector.h: +(WTF::Vector::map): +* wtf/text/WTFString.h: +(WTF::String::split): + 2017-06-04 Konstantin Tokarev Fix build of Windows-specific code with ICU 59.1 Modified: trunk/Source/WTF/wtf/Vector.h (217798 => 217799) --- trunk/Source/WTF/wtf/Vector.h 2017-06-05 22:28:03 UTC (rev 217798) +++ trunk/Source/WTF/wtf/Vector.h 2017-06-05 22:40:30 UTC (rev 217799) @@ -780,6 +780,8 @@ void checkConsistency(); +template::type> Vector map(MapFunction) const; + private: void expandCapacity(size_t newMinCapacity); T* expandCapacity(size_t newMinCapacity, T*); @@ -1457,6 +1459,16 @@ std::swap(at(i), at(m_size - 1 - i)); } +template template +inline Vector Vector::map(MapFunction mapFunction) const +{ +Vector result; +result.reserveInitialCapacity(size()); +for (size_t i = 0; i < size(); ++i) +result.uncheckedAppend(mapFunction(at(i))); +return result; +} + template inline MallocPtr Vector::releaseBuffer() { Modified: trunk/Source/WTF/wtf/text/WTFString.h (217798 => 217799) --- trunk/Source/WTF/wtf/text/WTFString.h 2017-06-05 22:28:03 UTC (rev 217798) +++ trunk/Source/WTF/wtf/text/WTFString.h 2017-06-05 22:40:30 UTC (rev 217799) @@ -370,6 +370,13 @@ split(separator, false, result); } +Vector split(const String& separator) const +{ +Vector result; +split(separator, false, result); +return result; +} + WTF_EXPORT_STRING_API int toIntStrict(bool* ok = nullptr, int base = 10) const; WTF_EXPORT_STRING_API unsigned toUIntStrict(bool* ok = nullptr, int base = 10) const; WTF_EXPORT_STRING_API int64_t toInt64Strict(bool* ok = nullptr, int base = 10) const; Modified: trunk/Source/WebCore/ChangeLog (217798 => 217799) --- trunk/Source/WebCore/ChangeLog 2017-06-05 22:28:03 UTC (rev 217798) +++ trunk/Source/WebCore/ChangeLog 2017-06-05 22:40:30 UTC (rev 217799) @@ -1,3 +1,36 @@ +2017-06-05 Jer Noble + +Allow clients to specify a list of codecs which should require hardware decode support. +https://bugs.webkit.org/show_bug.cgi?id=172787 + +Reviewed by Alex Christensen. + +Add a new setting, checked by HTMLMediaElement, which allows MediaPlayerPrivate implementation +to require that the specified codecs have hardware support. This requirement will be supported +in the normal media loading path and the MSE path on Cocoa ports. + +* WebCore.xcodeproj/project.pbxproj: +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::mediaCodecsRequiringHardwareSupport): +* html/HTMLMediaElement.h: +* page/Settings.cpp: +(WebCore::Settings::setMediaCodecsRequiringHardwareSupport): +* page/Settings.h: +(WebCore::Settings::mediaCodecsRequiringHardwareSupport): +* platform/cocoa/VideoToolboxSoftLink.cpp: +* platform/cocoa/VideoToolboxSoftLink.h: +* platform/graphics/MediaPlayer.h: +(WebCore::MediaPlayerClient::mediaCodecsRequiringHardwareSupport): +* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.h: Added. +* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm: Added. +(WebCore::assetTrackMeetsHardwareDecodeRequirements): +* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: +* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: +(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): +(WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): +* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: +(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset): + 2017-06-05 Dan Bernstein Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK. Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (217798 => 217799) --- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-06-05 22:28:03 UTC (rev 217798) +++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-06-05 22:40:30 UTC (rev 217799) @@ -1780,7 +1780,7 @@ 41C760B10EDE03D300C1655F /* ScriptState.h in Headers */ = {isa = PBXBuildFile; fileRef = 41C760B00EDE03D300C1655F /* ScriptState.h */; settings = {ATTRIBUTES = (Private, ); }; };
[webkit-changes] [217845] trunk/Source
Title: [217845] trunk/Source Revision 217845 Author jer.no...@apple.com Date 2017-06-06 11:28:55 -0700 (Tue, 06 Jun 2017) Log Message [Cocoa] Set defaults for mediaContentTypesRequiringHardwareSupport setting https://bugs.webkit.org/show_bug.cgi?id=173008 Reviewed by Eric Carlson. Source/WebKit/mac: Add a private preference (with default) for the mediaContentTypesRequiringHardwareSupport WebCore setting. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences mediaUserGestureInheritsFromDocument]): (-[WebPreferences setMediaUserGestureInheritsFromDocument:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): Modified Paths trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h trunk/Source/WebKit/mac/WebView/WebPreferences.mm trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm Diff Modified: trunk/Source/WebKit/mac/ChangeLog (217844 => 217845) --- trunk/Source/WebKit/mac/ChangeLog 2017-06-06 18:27:53 UTC (rev 217844) +++ trunk/Source/WebKit/mac/ChangeLog 2017-06-06 18:28:55 UTC (rev 217845) @@ -1,3 +1,21 @@ +2017-06-06 Jer Noble + +[Cocoa] Set defaults for mediaContentTypesRequiringHardwareSupport setting +https://bugs.webkit.org/show_bug.cgi?id=173008 + +Reviewed by Eric Carlson. + +Add a private preference (with default) for the mediaContentTypesRequiringHardwareSupport WebCore setting. + +* WebView/WebPreferenceKeysPrivate.h: +* WebView/WebPreferences.mm: +(+[WebPreferences initialize]): +(-[WebPreferences mediaUserGestureInheritsFromDocument]): +(-[WebPreferences setMediaUserGestureInheritsFromDocument:]): +* WebView/WebPreferencesPrivate.h: +* WebView/WebView.mm: +(-[WebView _preferencesChanged:]): + 2017-06-06 Youenn Fablet Add an option to disable getUserMedia prompt in case of mock capture sources Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (217844 => 217845) --- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2017-06-06 18:27:53 UTC (rev 217844) +++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2017-06-06 18:28:55 UTC (rev 217845) @@ -237,3 +237,4 @@ #define WebKitDisplayContentsEnabledPreferenceKey @"WebKitDisplayContentsEnabled" #define WebKitUserTimingEnabledPreferenceKey @"WebKitUserTimingEnabled" #define WebKitResourceTimingEnabledPreferenceKey @"WebKitResourceTimingEnabled" +#define WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey @"WebKitMediaContentTypesRequiringHardwareSupport" Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (217844 => 217845) --- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2017-06-06 18:27:53 UTC (rev 217844) +++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2017-06-06 18:28:55 UTC (rev 217845) @@ -671,6 +671,7 @@ @NO, WebKitResourceTimingEnabledPreferenceKey, @NO, WebKitCredentialManagementEnabledPreferenceKey, @NO, WebKitMediaUserGestureInheritsFromDocument, +@"video/mp4;codecs=hvc1:video/mp4;codecs=hev1", WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey, nil]; #if !PLATFORM(IOS) @@ -3096,6 +3097,15 @@ } #endif +- (NSString *)mediaContentTypesRequiringHardwareSupport +{ +return [self _stringValueForKey:WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey]; +} + +- (void)setMediaContentTypesRequiringHardwareSupport:(NSString *)value +{ +[self _setStringValue:value forKey:WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey]; +} @end @implementation WebPreferences (WebInternal) Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (217844 => 217845) --- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2017-06-06 18:27:53 UTC (rev 217844) +++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2017-06-06 18:28:55 UTC (rev 217845) @@ -566,4 +566,6 @@ @property (nonatomic) BOOL quickLookDocumentSavingEnabled; #endif +@property (nonatomic) NSString *mediaContentTypesRequiringHardwareSupport; + @end Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (217844 => 217845) --- trunk/Source/WebKit/mac/WebView/WebView.mm 2017-06-06 18:27:53 UTC (rev 217844) +++ trunk/Source/WebKit/mac/WebView/WebView.mm 2017-06-06 18:28:55 UTC (rev 217845) @@ -2879,6 +2879,7 @@ settings.setJavaScriptCanOpenWindowsAutomatically([preferences _javascript_CanOpenWindowsAutomatically] || shouldAllowWindowOpenWithoutUserGesture()); settings.setVisualViewportEnabled([preferences visualViewportEnab
[webkit-changes] [217893] trunk/Source
Title: [217893] trunk/Source Revision 217893 Author jer.no...@apple.com Date 2017-06-07 10:44:45 -0700 (Wed, 07 Jun 2017) Log Message Clean-up: RenderElement.h includes headers it doesn't use https://bugs.webkit.org/show_bug.cgi?id=173046 Reviewed by Andy Estes. Source/WebCore: Remove a couple of unneeded includes from RenderElement.h, and then clean up all the follow-on compile errors that causes. Mostly, these errors are fixed by including the correct headers at the point of use; otherwise, they're solved by forward-declaring types and in one case by moving default constructors implementation to the cpp file from the header. * css/parser/SizesAttributeParser.cpp: * editing/cocoa/EditorCocoa.mm: * platform/mac/PasteboardMac.mm: * rendering/InlineIterator.h: (WebCore::embedCharFromDirection): * rendering/RenderBoxModelObject.h: * rendering/RenderElement.cpp: * rendering/RenderElement.h: * rendering/RenderIterator.h: * rendering/RenderLineBreak.cpp: * rendering/RenderQuote.cpp: * rendering/RenderText.h: * rendering/SimpleLineLayoutPagination.cpp: * rendering/SimpleLineLayoutTextFragmentIterator.cpp: * rendering/TextAutoSizing.cpp: * rendering/style/RenderStyle.cpp: * rendering/style/RenderStyle.h: * style/RenderTreeUpdater.cpp: * style/StyleResolveForDocument.cpp: * style/StyleTreeResolver.cpp: Source/WebKit/mac: * WebView/WebImmediateActionController.mm: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm trunk/Source/WebCore/platform/mac/PasteboardMac.mm trunk/Source/WebCore/rendering/InlineIterator.h trunk/Source/WebCore/rendering/RenderBoxModelObject.h trunk/Source/WebCore/rendering/RenderElement.cpp trunk/Source/WebCore/rendering/RenderElement.h trunk/Source/WebCore/rendering/RenderIterator.h trunk/Source/WebCore/rendering/RenderLineBreak.cpp trunk/Source/WebCore/rendering/RenderQuote.cpp trunk/Source/WebCore/rendering/RenderText.h trunk/Source/WebCore/rendering/SimpleLineLayoutPagination.cpp trunk/Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp trunk/Source/WebCore/rendering/TextAutoSizing.cpp trunk/Source/WebCore/rendering/style/RenderStyle.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h trunk/Source/WebCore/style/RenderTreeUpdater.cpp trunk/Source/WebCore/style/StyleResolveForDocument.cpp trunk/Source/WebCore/style/StyleTreeResolver.cpp trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebImmediateActionController.mm Diff Modified: trunk/Source/WebCore/ChangeLog (217892 => 217893) --- trunk/Source/WebCore/ChangeLog 2017-06-07 17:40:43 UTC (rev 217892) +++ trunk/Source/WebCore/ChangeLog 2017-06-07 17:44:45 UTC (rev 217893) @@ -1,3 +1,36 @@ +2017-06-07 Jer Noble + +Clean-up: RenderElement.h includes headers it doesn't use +https://bugs.webkit.org/show_bug.cgi?id=173046 + +Reviewed by Andy Estes. + +Remove a couple of unneeded includes from RenderElement.h, and then clean up all the +follow-on compile errors that causes. Mostly, these errors are fixed by including the +correct headers at the point of use; otherwise, they're solved by forward-declaring types +and in one case by moving default constructors implementation to the cpp file from the header. + +* css/parser/SizesAttributeParser.cpp: +* editing/cocoa/EditorCocoa.mm: +* platform/mac/PasteboardMac.mm: +* rendering/InlineIterator.h: +(WebCore::embedCharFromDirection): +* rendering/RenderBoxModelObject.h: +* rendering/RenderElement.cpp: +* rendering/RenderElement.h: +* rendering/RenderIterator.h: +* rendering/RenderLineBreak.cpp: +* rendering/RenderQuote.cpp: +* rendering/RenderText.h: +* rendering/SimpleLineLayoutPagination.cpp: +* rendering/SimpleLineLayoutTextFragmentIterator.cpp: +* rendering/TextAutoSizing.cpp: +* rendering/style/RenderStyle.cpp: +* rendering/style/RenderStyle.h: +* style/RenderTreeUpdater.cpp: +* style/StyleResolveForDocument.cpp: +* style/StyleTreeResolver.cpp: + 2017-06-07 Youenn Fablet Add WebRTC stats logging Modified: trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp (217892 => 217893) --- trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp 2017-06-07 17:40:43 UTC (rev 217892) +++ trunk/Source/WebCore/css/parser/SizesAttributeParser.cpp 2017-06-07 17:44:45 UTC (rev 217893) @@ -33,6 +33,7 @@ #include "CSSPrimitiveValue.h" #include "CSSToLengthConversionData.h" #include "CSSTokenizer.h" +#include "FontCascade.h" #include "MediaQueryEvaluator.h" #include "RenderView.h" #include "SizesCalcParser.h" Modified: trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm (217892 => 217893) --- trunk/Source/WebCore/editi
[webkit-changes] [217905] trunk/Source
Title: [217905] trunk/Source Revision 217905 Author jer.no...@apple.com Date 2017-06-07 15:15:50 -0700 (Wed, 07 Jun 2017) Log Message Refactoring: MediaEngineSupportParameters should take a ContentType rather than separate type & codecs strings https://bugs.webkit.org/show_bug.cgi?id=173038 Reviewed by Eric Carlson. Source/WebCore: * Modules/encryptedmedia/CDM.cpp: (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType): * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::addSourceBuffer): (WebCore::MediaSource::isTypeSupported): * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlayType): (WebCore::HTMLMediaElement::selectNextSourceChild): * platform/ContentType.cpp: (WebCore::ContentType::codecsParameter): (WebCore::ContentType::profilesParameter): (WebCore::ContentType::containerType): (WebCore::simplifyWhitespace): (WebCore::ContentType::codecs): (WebCore::ContentType::profiles): (WebCore::ContentType::type): Deleted. * platform/ContentType.h: * platform/graphics/MediaPlayer.cpp: (WebCore::bestMediaEngineForSupportParameters): (WebCore::MediaPlayer::load): (WebCore::MediaPlayer::nextBestMediaEngine): (WebCore::MediaPlayer::loadWithNextMediaEngine): (WebCore::MediaPlayer::supportsType): (WebCore::MediaPlayer::networkStateChanged): (WebCore::codecs): Deleted. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayer::contentMIMEType): (WebCore::MediaPlayer::contentTypeCodecs): * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType): (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::supportsType): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::supportsType): * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: (WebCore::MediaPlayerPrivateMediaFoundation::supportsType): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::supportsType): * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::addSourceBuffer): Source/WTF: Drive by fix: add a version of split that takes a UChar and returns a Vector. * wtf/text/WTFString.h: (WTF::String::split): Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/text/WTFString.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp trunk/Source/WebCore/dom/DOMImplementation.cpp trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/platform/ContentType.cpp trunk/Source/WebCore/platform/ContentType.h trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp trunk/Source/WebCore/platform/graphics/MediaPlayer.h trunk/Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp trunk/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp trunk/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp Diff Modified: trunk/Source/WTF/ChangeLog (217904 => 217905) --- trunk/Source/WTF/ChangeLog 2017-06-07 22:07:10 UTC (rev 217904) +++ trunk/Source/WTF/ChangeLog 2017-06-07 22:15:50 UTC (rev 217905) @@ -1,3 +1,15 @@ +2017-06-07 Jer Noble + +Refactoring: MediaEngineSupportParameters should take a ContentType rather than separate type & codecs strings +https://bugs.webkit.org/show
[webkit-changes] [217906] trunk/Source/WebCore
Title: [217906] trunk/Source/WebCore Revision 217906 Author jer.no...@apple.com Date 2017-06-07 15:18:56 -0700 (Wed, 07 Jun 2017) Log Message Exempt exclusively wall-powered devices from hardware codec requirement https://bugs.webkit.org/show_bug.cgi?id=173009 Reviewed by Eric Carlson. * WebCore.xcodeproj/project.pbxproj: * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm: (WebCore::systemHasBattery): (WebCore::assetTrackMeetsHardwareDecodeRequirements): * platform/spi/cocoa/IOPSLibSPI.h: Added. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm Added Paths trunk/Source/WebCore/platform/spi/cocoa/IOPSLibSPI.h Diff Modified: trunk/Source/WebCore/ChangeLog (217905 => 217906) --- trunk/Source/WebCore/ChangeLog 2017-06-07 22:15:50 UTC (rev 217905) +++ trunk/Source/WebCore/ChangeLog 2017-06-07 22:18:56 UTC (rev 217906) @@ -1,5 +1,18 @@ 2017-06-07 Jer Noble +Exempt exclusively wall-powered devices from hardware codec requirement +https://bugs.webkit.org/show_bug.cgi?id=173009 + +Reviewed by Eric Carlson. + +* WebCore.xcodeproj/project.pbxproj: +* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm: +(WebCore::systemHasBattery): +(WebCore::assetTrackMeetsHardwareDecodeRequirements): +* platform/spi/cocoa/IOPSLibSPI.h: Added. + +2017-06-07 Jer Noble + Refactoring: MediaEngineSupportParameters should take a ContentType rather than separate type & codecs strings https://bugs.webkit.org/show_bug.cgi?id=173038 Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (217905 => 217906) --- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-06-07 22:15:50 UTC (rev 217905) +++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-06-07 22:18:56 UTC (rev 217906) @@ -14840,6 +14840,7 @@ CDCD41E51C3DDB0900965D99 /* ParsedContentRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentRange.cpp; sourceTree = ""; }; CDCD41E61C3DDB0900965D99 /* ParsedContentRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParsedContentRange.h; sourceTree = ""; }; CDCE5CD014633BC900D47CCA /* EventTargetFactory.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventTargetFactory.in; sourceTree = ""; }; + CDCEA92A1EE76D9800E7552B /* IOPSLibSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IOPSLibSPI.h; sourceTree = ""; }; CDCFABBB18C0AE31006F8450 /* SelectionSubtreeRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionSubtreeRoot.h; sourceTree = ""; }; CDCFABBC18C0AF19006F8450 /* SelectionSubtreeRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionSubtreeRoot.cpp; sourceTree = ""; }; CDD1E525167BA56400CE820B /* TextTrackRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackRepresentation.h; sourceTree = ""; }; @@ -18828,6 +18829,7 @@ 1C5E980F1A02CEFA002DB55F /* CoreTextSPI.h */, 935E2B4D1AFF06CA00976F9F /* DataDetectorsCoreSPI.h */, CE12524C1A1A77DE00864480 /* IOPMLibSPI.h */, +CDCEA92A1EE76D9800E7552B /* IOPSLibSPI.h */, 44DEF6421A6FF92700D45EEC /* IOReturnSPI.h */, 44DFF6421A6FF92700D45EEC /* IOSurfaceSPI.h */, 44EFF6421A6FF92700D45EEC /* IOTypesSPI.h */, Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm (217905 => 217906) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm 2017-06-07 22:15:50 UTC (rev 217905) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm 2017-06-07 22:18:56 UTC (rev 217906) @@ -29,6 +29,7 @@ #if ENABLE(VIDEO) && USE(AVFOUNDATION) #import "FourCC.h" +#import "IOPSLibSPI.h" #import #import "CoreMediaSoftLink.h" @@ -36,8 +37,31 @@ namespace WebCore { +static bool systemHasBattery() +{ +RetainPtr powerSourcesInfo = adoptCF(IOPSCopyPowerSourcesInfo()); +if (!powerSourcesInfo) +return false; +RetainPtr powerSourcesList = adoptCF(IOPSCopyPowerSourcesList(powerSourcesInfo.get())); +if (!powerSourcesList) +return false; +for (CFIndex i = 0, count = CFArrayGetCount(powerSourcesList.get()); i < count; ++i) { +CFDictionaryRef description = IOPSGetPowerSourceDescription(powerSourcesInfo.get(), CFArrayGetValueAtIndex(powerSourcesList.get(), i)); +CFTypeRef value = CFDictionaryGetValue(description, CFSTR(kIOPSTypeKey)); +i
[webkit-changes] [217919] trunk
Title: [217919] trunk Revision 217919 Author jer.no...@apple.com Date 2017-06-07 21:31:31 -0700 (Wed, 07 Jun 2017) Log Message [Web Audio] createScriptProcessor throws IndexSizeError for valid arguments https://bugs.webkit.org/show_bug.cgi?id=173022 Reviewed by Sam Weinig. Source/WebCore: Updated test: webaudio/_javascript_audionode.html The Web Audio spec (, 06 June 2017) defines a default behavior when clients pass in a value of 0 for bufferSize to the createScriptProcessor() method. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createScriptProcessor): * Modules/webaudio/AudioContext.idl: * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::create): * Modules/webaudio/ScriptProcessorNode.h: LayoutTests: * webaudio/_javascript_audionode-expected.txt: * webaudio/_javascript_audionode.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt trunk/LayoutTests/webaudio/_javascript_audionode.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp trunk/Source/WebCore/Modules/webaudio/AudioContext.idl trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.h Diff Modified: trunk/LayoutTests/ChangeLog (217918 => 217919) --- trunk/LayoutTests/ChangeLog 2017-06-08 04:05:43 UTC (rev 217918) +++ trunk/LayoutTests/ChangeLog 2017-06-08 04:31:31 UTC (rev 217919) @@ -1,3 +1,13 @@ +2017-06-07 Jer Noble + +[Web Audio] createScriptProcessor throws IndexSizeError for valid arguments +https://bugs.webkit.org/show_bug.cgi?id=173022 + +Reviewed by Sam Weinig. + +* webaudio/_javascript_audionode-expected.txt: +* webaudio/_javascript_audionode.html: + 2017-06-07 Chris Dumez CSSStyleRule.style / CSSPageRule.style / CSSKeyframeRule.style should be settable Modified: trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt (217918 => 217919) --- trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt 2017-06-08 04:05:43 UTC (rev 217918) +++ trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt 2017-06-08 04:31:31 UTC (rev 217919) @@ -8,6 +8,7 @@ PASS Successfully created ScriptProcessorNode with numberOfInputChannels = 0 and numberOfOutputChannels = 1. PASS Successfully created ScriptProcessorNode with numberOfInputChannels = 0 and numberOfOutputChannels = 2. PASS Exception was thrown for illegal bufferSize. +PASS Successfully created ScriptProcessorNode with bufferSize = 0. PASS Successfully created ScriptProcessorNode with bufferSize = 256. PASS Successfully created ScriptProcessorNode with bufferSize = 512. PASS Successfully created ScriptProcessorNode with bufferSize = 1024. Modified: trunk/LayoutTests/webaudio/_javascript_audionode.html (217918 => 217919) --- trunk/LayoutTests/webaudio/_javascript_audionode.html 2017-06-08 04:05:43 UTC (rev 217918) +++ trunk/LayoutTests/webaudio/_javascript_audionode.html 2017-06-08 04:31:31 UTC (rev 217919) @@ -123,6 +123,7 @@ testPassed("Exception was thrown for illegal bufferSize."); } +doBufferSizeTest(0); doBufferSizeTest(256); doBufferSizeTest(512); doBufferSizeTest(1024); Modified: trunk/Source/WebCore/ChangeLog (217918 => 217919) --- trunk/Source/WebCore/ChangeLog 2017-06-08 04:05:43 UTC (rev 217918) +++ trunk/Source/WebCore/ChangeLog 2017-06-08 04:31:31 UTC (rev 217919) @@ -1,3 +1,22 @@ +2017-06-07 Jer Noble + +[Web Audio] createScriptProcessor throws IndexSizeError for valid arguments +https://bugs.webkit.org/show_bug.cgi?id=173022 + +Reviewed by Sam Weinig. + +Updated test: webaudio/_javascript_audionode.html + +The Web Audio spec (, 06 June 2017) defines a default behavior when +clients pass in a value of 0 for bufferSize to the createScriptProcessor() method. + +* Modules/webaudio/AudioContext.cpp: +(WebCore::AudioContext::createScriptProcessor): +* Modules/webaudio/AudioContext.idl: +* Modules/webaudio/ScriptProcessorNode.cpp: +(WebCore::ScriptProcessorNode::create): +* Modules/webaudio/ScriptProcessorNode.h: + 2017-06-07 Chris Dumez CSSStyleRule.style / CSSPageRule.style / CSSKeyframeRule.style should be settable Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (217918 => 217919) --- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2017-06-08 04:05:43 UTC (rev 217918) +++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2017-06-08 04:31:31 UTC (rev 217919) @@ -37,6 +37,7 @@ #include "AudioListener.h" #include "AudioNodeInput.h" #include "AudioNodeOutput.h" +#include "AudioSession.h" #include "BiquadFilterNode.h" #include "ChannelMergerNode.h" #include "ChannelSplitterNode.h" @@ -488,13 +489,58 @@ {
[webkit-changes] [217933] trunk/Source/WebCore
Title: [217933] trunk/Source/WebCore Revision 217933 Author jer.no...@apple.com Date 2017-06-08 10:23:53 -0700 (Thu, 08 Jun 2017) Log Message Take the mediaContentTypesRequiringHardwareSupport Setting into account when answering HTMLMediaElement::canPlayType() https://bugs.webkit.org/show_bug.cgi?id=173092 Reviewed by Eric Carlson. Pass the value of mediaContentTypesRequiringHardwareSupport into the MediaPlayer when querying canPlayType(). Then, use the existing code in AVAssetTrackUtilities to know whether to bail out early from the codec check. Drive-by fix: FourCC was converting String -> FourCC in reverse. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlayType): * platform/graphics/FourCC.cpp: (WebCore::FourCC::fromString): * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.h: * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm: (WebCore::contentTypesToCodecs): (WebCore::codecsMeetHardwareDecodeRequirements): (WebCore::contentTypeMeetsHardwareDecodeRequirements): (WebCore::assetTrackMeetsHardwareDecodeRequirements): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/platform/graphics/FourCC.cpp trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (217932 => 217933) --- trunk/Source/WebCore/ChangeLog 2017-06-08 17:13:16 UTC (rev 217932) +++ trunk/Source/WebCore/ChangeLog 2017-06-08 17:23:53 UTC (rev 217933) @@ -1,3 +1,30 @@ +2017-06-08 Jer Noble + +Take the mediaContentTypesRequiringHardwareSupport Setting into account when answering HTMLMediaElement::canPlayType() +https://bugs.webkit.org/show_bug.cgi?id=173092 + +Reviewed by Eric Carlson. + +Pass the value of mediaContentTypesRequiringHardwareSupport into the MediaPlayer when querying canPlayType(). +Then, use the existing code in AVAssetTrackUtilities to know whether to bail out early from the codec check. + +Drive-by fix: FourCC was converting String -> FourCC in reverse. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::canPlayType): +* platform/graphics/FourCC.cpp: +(WebCore::FourCC::fromString): +* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.h: +* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm: +(WebCore::contentTypesToCodecs): +(WebCore::codecsMeetHardwareDecodeRequirements): +(WebCore::contentTypeMeetsHardwareDecodeRequirements): +(WebCore::assetTrackMeetsHardwareDecodeRequirements): +* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: +(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: +(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): + 2017-06-08 Chris Dumez ASSERTION FAILED: !m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction on webrtc/ephemeral-certificates-and-cnames.html Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (217932 => 217933) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-08 17:13:16 UTC (rev 217932) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-08 17:23:53 UTC (rev 217933) @@ -1109,6 +1109,7 @@ MediaEngineSupportParameters parameters; ContentType contentType(mimeType); parameters.type = contentType; +parameters.contentTypesRequiringHardwareSupport = mediaContentTypesRequiringHardwareSupport(); MediaPlayer::SupportsType support = MediaPlayer::supportsType(parameters, this); String canPlay; Modified: trunk/Source/WebCore/platform/graphics/FourCC.cpp (217932 => 217933) --- trunk/Source/WebCore/platform/graphics/FourCC.cpp 2017-06-08 17:13:16 UTC (rev 217932) +++ trunk/Source/WebCore/platform/graphics/FourCC.cpp 2017-06-08 17:23:53 UTC (rev 217933) @@ -36,7 +36,7 @@ const char* data = "" ASSERT(asciiValue.data()); -uint32_t value = data[3] << 24 | data[2] << 16 | data[1] << 8 | data[0]; +uint32_t value = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; return FourCC(value); } Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.h (217932 => 21
[webkit-changes] [217934] trunk/Source/WebKit2
Title: [217934] trunk/Source/WebKit2 Revision 217934 Author jer.no...@apple.com Date 2017-06-08 10:26:27 -0700 (Thu, 08 Jun 2017) Log Message [WK2] mediaContentTypesRequiringHardwareSupport setting not being propogated https://bugs.webkit.org/show_bug.cgi?id=173090 Reviewed by Eric Carlson. Passing a NSString* into the WebPreferencesStore::Value constructor would rather cast the NSString* into a bool than a const String&. So explicitly cast the NSString* into a String before passing. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (217933 => 217934) --- trunk/Source/WebKit2/ChangeLog 2017-06-08 17:23:53 UTC (rev 217933) +++ trunk/Source/WebKit2/ChangeLog 2017-06-08 17:26:27 UTC (rev 217934) @@ -1,3 +1,16 @@ +2017-06-08 Jer Noble + +[WK2] mediaContentTypesRequiringHardwareSupport setting not being propogated +https://bugs.webkit.org/show_bug.cgi?id=173090 + +Reviewed by Eric Carlson. + +Passing a NSString* into the WebPreferencesStore::Value constructor would rather cast the NSString* +into a bool than a const String&. So explicitly cast the NSString* into a String before passing. + +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView _initializeWithConfiguration:]): + 2017-06-08 Youenn Fablet getUserMedia request should not be allowed for background tabs unless the tab is already capturing Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (217933 => 217934) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-06-08 17:23:53 UTC (rev 217933) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-06-08 17:26:27 UTC (rev 217934) @@ -503,9 +503,8 @@ #endif pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::needsStorageAccessFromFileURLsQuirkKey(), WebKit::WebPreferencesStore::Value(!![_configuration _needsStorageAccessFromFileURLsQuirk])); +pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::mediaContentTypesRequiringHardwareSupportKey(), WebKit::WebPreferencesStore::Value(String([_configuration _mediaContentTypesRequiringHardwareSupport]))); -pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::mediaContentTypesRequiringHardwareSupportKey(), WebKit::WebPreferencesStore::Value([_configuration _mediaContentTypesRequiringHardwareSupport])); - #if PLATFORM(IOS) CGRect bounds = self.bounds; _scrollView = adoptNS([[WKScrollView alloc] initWithFrame:bounds]); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [217935] trunk/Source
Title: [217935] trunk/Source Revision 217935 Author jer.no...@apple.com Date 2017-06-08 10:51:47 -0700 (Thu, 08 Jun 2017) Log Message Clients of the WK2 C-API don't have their mediaContentTypesRequiringHardwareSupport setting initialized correctly. https://bugs.webkit.org/show_bug.cgi?id=173091 Reviewed by Eric Carlson. Source/WebCore: Add a new default setting value, defined separately in Settings and SettingsCocoa. * page/Settings.cpp: (WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport): * page/Settings.h: * page/cocoa/SettingsCocoa.mm: (WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport): Source/WebKit/mac: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Source/WebKit2: Rather than add yet a third way of setting this preference, centralize everything by moving the definition of the default value into WebCore. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/Settings.cpp trunk/Source/WebCore/page/Settings.h trunk/Source/WebCore/page/cocoa/SettingsCocoa.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebPreferences.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (217934 => 217935) --- trunk/Source/WebCore/ChangeLog 2017-06-08 17:26:27 UTC (rev 217934) +++ trunk/Source/WebCore/ChangeLog 2017-06-08 17:51:47 UTC (rev 217935) @@ -1,5 +1,20 @@ 2017-06-08 Jer Noble +Clients of the WK2 C-API don't have their mediaContentTypesRequiringHardwareSupport setting initialized correctly. +https://bugs.webkit.org/show_bug.cgi?id=173091 + +Reviewed by Eric Carlson. + +Add a new default setting value, defined separately in Settings and SettingsCocoa. + +* page/Settings.cpp: +(WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport): +* page/Settings.h: +* page/cocoa/SettingsCocoa.mm: +(WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport): + +2017-06-08 Jer Noble + Take the mediaContentTypesRequiringHardwareSupport Setting into account when answering HTMLMediaElement::canPlayType() https://bugs.webkit.org/show_bug.cgi?id=173092 Modified: trunk/Source/WebCore/page/Settings.cpp (217934 => 217935) --- trunk/Source/WebCore/page/Settings.cpp 2017-06-08 17:26:27 UTC (rev 217934) +++ trunk/Source/WebCore/page/Settings.cpp 2017-06-08 17:51:47 UTC (rev 217935) @@ -789,6 +789,13 @@ return gAllowsAnySSLCertificate; } +#if !PLATFORM(COCOA) +const String& Settings::defaultMediaContentTypesRequiringHardwareSupport() +{ +return emptyString(); +} +#endif + void Settings::setMediaContentTypesRequiringHardwareSupport(const String& contentTypes) { m_mediaContentTypesRequiringHardwareSupport = contentTypes.split(":").map(ContentType::create); Modified: trunk/Source/WebCore/page/Settings.h (217934 => 217935) --- trunk/Source/WebCore/page/Settings.h 2017-06-08 17:26:27 UTC (rev 217934) +++ trunk/Source/WebCore/page/Settings.h 2017-06-08 17:51:47 UTC (rev 217935) @@ -326,6 +326,7 @@ WEBCORE_EXPORT static void setAllowsAnySSLCertificate(bool); static bool allowsAnySSLCertificate(); +WEBCORE_EXPORT static const String& defaultMediaContentTypesRequiringHardwareSupport(); WEBCORE_EXPORT void setMediaContentTypesRequiringHardwareSupport(const Vector&); WEBCORE_EXPORT void setMediaContentTypesRequiringHardwareSupport(const String&); const Vector& mediaContentTypesRequiringHardwareSupport() const { return m_mediaContentTypesRequiringHardwareSupport; } Modified: trunk/Source/WebCore/page/cocoa/SettingsCocoa.mm (217934 => 217935) --- trunk/Source/WebCore/page/cocoa/SettingsCocoa.mm 2017-06-08 17:26:27 UTC (rev 217934) +++ trunk/Source/WebCore/page/cocoa/SettingsCocoa.mm 2017-06-08 17:51:47 UTC (rev 217935) @@ -26,6 +26,8 @@ #include "config.h" #include "Settings.h" +#include + #if PLATFORM(IOS) #include "Device.h" #include "SoftLinking.h" @@ -133,4 +135,10 @@ #endif +const String& Settings::defaultMediaContentTypesRequiringHardwareSupport() +{ +static NeverDestroyed defaultMediaContentTypes { "video/mp4;codecs=hvc1:video/mp4;codecs=hev1" }; +return defaultMediaContentTypes; +} + } // namespace WebCore Modified: trunk/Source/WebKit/mac/ChangeLog (217934 => 217935) --- trunk/Source/WebKit/mac/ChangeLog 2017-06-08 17:26:27 UTC (rev 217934) +++ trunk/Source/WebKit/mac/ChangeLog 2017-06-08 17:51:4
[webkit-changes] [217936] trunk/Source/WebCore
Title: [217936] trunk/Source/WebCore Revision 217936 Author jer.no...@apple.com Date 2017-06-08 10:57:08 -0700 (Thu, 08 Jun 2017) Log Message YouTube audio stutters when page changes visibility. https://bugs.webkit.org/show_bug.cgi?id=173102 Reviewed by Eric Carlson. Don't change renderers when the visibility changes; only use the decompression session when we were explicitly asked to paint into an accelerated surface. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (217935 => 217936) --- trunk/Source/WebCore/ChangeLog 2017-06-08 17:51:47 UTC (rev 217935) +++ trunk/Source/WebCore/ChangeLog 2017-06-08 17:57:08 UTC (rev 217936) @@ -1,5 +1,18 @@ 2017-06-08 Jer Noble +YouTube audio stutters when page changes visibility. +https://bugs.webkit.org/show_bug.cgi?id=173102 + +Reviewed by Eric Carlson. + +Don't change renderers when the visibility changes; only use the decompression session +when we were explicitly asked to paint into an accelerated surface. + +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: +(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged): + +2017-06-08 Jer Noble + Clients of the WK2 C-API don't have their mediaContentTypesRequiringHardwareSupport setting initialized correctly. https://bugs.webkit.org/show_bug.cgi?id=173091 Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (217935 => 217936) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2017-06-08 17:51:47 UTC (rev 217935) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2017-06-08 17:57:08 UTC (rev 217936) @@ -635,7 +635,7 @@ void MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged() { -if (!m_hasBeenAskedToPaintGL && m_player->visible() && m_player->client().mediaPlayerRenderingCanBeAccelerated(m_player)) { +if (!m_hasBeenAskedToPaintGL && m_player->client().mediaPlayerRenderingCanBeAccelerated(m_player)) { destroyDecompressionSession(); ensureLayer(); } else { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [217967] trunk/Source/WebKit2
Title: [217967] trunk/Source/WebKit2 Revision 217967 Author jer.no...@apple.com Date 2017-06-09 01:05:32 -0700 (Fri, 09 Jun 2017) Log Message Crash in -[WKWebView _initializeWithConfiguration:] https://bugs.webkit.org/show_bug.cgi?id=173126 Reviewed by Antti Koivisto. Crash occurs when passing an autoreleased NSString into _setMediaContentTypesRequiringHardwareSupport. The ivar should be a RetainPtr rather than a bare NSString *. * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration _mediaContentTypesRequiringHardwareSupport]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (217966 => 217967) --- trunk/Source/WebKit2/ChangeLog 2017-06-09 08:03:47 UTC (rev 217966) +++ trunk/Source/WebKit2/ChangeLog 2017-06-09 08:05:32 UTC (rev 217967) @@ -1,3 +1,16 @@ +2017-06-09 Jer Noble + +Crash in -[WKWebView _initializeWithConfiguration:] +https://bugs.webkit.org/show_bug.cgi?id=173126 + +Reviewed by Antti Koivisto. + +Crash occurs when passing an autoreleased NSString into _setMediaContentTypesRequiringHardwareSupport. +The ivar should be a RetainPtr rather than a bare NSString *. + +* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: +(-[WKWebViewConfiguration _mediaContentTypesRequiringHardwareSupport]): + 2017-06-08 Carlos Garcia Campos [GTK] Use API::FormClient instead of the C API in WebKitFormClient Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (217966 => 217967) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2017-06-09 08:03:47 UTC (rev 217966) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2017-06-09 08:05:32 UTC (rev 217967) @@ -138,7 +138,7 @@ BOOL _needsStorageAccessFromFileURLsQuirk; NSString *_overrideContentSecurityPolicy; -NSString *_mediaContentTypesRequiringHardwareSupport; +RetainPtr _mediaContentTypesRequiringHardwareSupport; } - (instancetype)init @@ -823,7 +823,7 @@ - (NSString *)_mediaContentTypesRequiringHardwareSupport { -return _mediaContentTypesRequiringHardwareSupport; +return _mediaContentTypesRequiringHardwareSupport.get(); } - (void)_setMediaContentTypesRequiringHardwareSupport:(NSString *)mediaContentTypesRequiringHardwareSupport ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [217999] trunk
Title: [217999] trunk Revision 217999 Author jer.no...@apple.com Date 2017-06-09 10:57:06 -0700 (Fri, 09 Jun 2017) Log Message [iOS] Video occasionally mixes with other system audio instead of interrupting https://bugs.webkit.org/show_bug.cgi?id=173127 Reviewed by Eric Carlson. Source/WebCore: Tests: platform/mac/audio-session-category-video-track-change.html When an HTMLMediaElement's tracks change their enabled state, make sure to update the PlatformMediaElement, for canProduceAudio() may have changed. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): * platform/audio/cocoa/MediaSessionManagerCocoa.cpp: (PlatformMediaSessionManager::updateSessionState): The rest of the changes in this revision are to allow the above to be testable. * page/Settings.cpp: * page/Settings.h: * platform/audio/AudioSession.h: * platform/audio/mac/AudioSessionMac.cpp: (WebCore::AudioSession::category): (WebCore::AudioSession::setCategory): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setShouldManageAudioSessionCategory): * testing/InternalSettings.h: * testing/InternalSettings.idl: * testing/Internals.cpp: (WebCore::Internals::audioSessionCategory): * testing/Internals.h: * testing/Internals.idl: LayoutTests: * platform/mac/media/audio-session-category-video-track-change-expected.txt: Added. * platform/mac/media/audio-session-category-video-track-change.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/page/Settings.cpp trunk/Source/WebCore/page/Settings.h trunk/Source/WebCore/platform/audio/AudioSession.h trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp trunk/Source/WebCore/platform/audio/mac/AudioSessionMac.cpp trunk/Source/WebCore/testing/InternalSettings.cpp trunk/Source/WebCore/testing/InternalSettings.h trunk/Source/WebCore/testing/InternalSettings.idl trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/Internals.h trunk/Source/WebCore/testing/Internals.idl Added Paths trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change-expected.txt trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change.html Diff Modified: trunk/LayoutTests/ChangeLog (217998 => 217999) --- trunk/LayoutTests/ChangeLog 2017-06-09 17:54:16 UTC (rev 217998) +++ trunk/LayoutTests/ChangeLog 2017-06-09 17:57:06 UTC (rev 217999) @@ -1,3 +1,13 @@ +2017-06-09 Jer Noble + +[iOS] Video occasionally mixes with other system audio instead of interrupting +https://bugs.webkit.org/show_bug.cgi?id=173127 + +Reviewed by Eric Carlson. + +* platform/mac/media/audio-session-category-video-track-change-expected.txt: Added. +* platform/mac/media/audio-session-category-video-track-change.html: Added. + 2017-06-09 Chris Dumez CSS transitions added while page is not visible do not start when the page becomes visible Added: trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change-expected.txt (0 => 217999) --- trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change-expected.txt (rev 0) +++ trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change-expected.txt 2017-06-09 17:57:06 UTC (rev 217999) @@ -0,0 +1,19 @@ + +RUN(internals.settings.setShouldManageAudioSessionCategory(true)) +RUN(video.src = "" "../../../media/content/test")) +EVENT(canplay) +EXPECTED (internals.audioSessionCategory() == 'None') OK +RUN(video.audioTracks[0].enabled = false) +EVENT(change) +EXPECTED (internals.audioSessionCategory() == 'None') OK +RUN(video.muted = false) +EVENT(volumechange) +EXPECTED (internals.audioSessionCategory() == 'None') OK +RUN(video.play()) +EVENT(playing) +EXPECTED (internals.audioSessionCategory() == 'None') OK +RUN(video.audioTracks[0].enabled = true) +EVENT(change) +EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK +END OF TEST + Added: trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change.html (0 => 217999) --- trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change.html (rev 0) +++ trunk/LayoutTests/platform/mac/media/audio-session-category-video-track-change.html 2017-06-09 17:57:06 UTC (rev 217999) @@ -0,0 +1,48 @@ + + + +audio-session-category-track-change + +function go() { +findMediaElement(); +run('internals.settings.setShouldManageAudioSessionCategory(true)'); +run('video.src = "" "../../../media/content/test")'); +waitForEvent('canplay', canplay); +} + +func
[webkit-changes] [218016] trunk/Source/WebCore
Title: [218016] trunk/Source/WebCore Revision 218016 Author jer.no...@apple.com Date 2017-06-09 13:55:11 -0700 (Fri, 09 Jun 2017) Log Message Media elements are allowed to continue to load media data after navigation https://bugs.webkit.org/show_bug.cgi?id=173179 Reviewed by Eric Carlson. Deny media sessions the ability to load media data when suspended. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::isSuspended): * Modules/webaudio/AudioContext.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::isSuspended): * html/HTMLMediaElement.h: * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::isSuspended): * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSessionClient::isSuspended): * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp trunk/Source/WebCore/Modules/webaudio/AudioContext.h trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.h trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp trunk/Source/WebCore/platform/audio/PlatformMediaSession.h trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (218015 => 218016) --- trunk/Source/WebCore/ChangeLog 2017-06-09 20:45:37 UTC (rev 218015) +++ trunk/Source/WebCore/ChangeLog 2017-06-09 20:55:11 UTC (rev 218016) @@ -1,3 +1,25 @@ +2017-06-09 Jer Noble + +Media elements are allowed to continue to load media data after navigation +https://bugs.webkit.org/show_bug.cgi?id=173179 + +Reviewed by Eric Carlson. + +Deny media sessions the ability to load media data when suspended. + +* Modules/webaudio/AudioContext.cpp: +(WebCore::AudioContext::isSuspended): +* Modules/webaudio/AudioContext.h: +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::isSuspended): +* html/HTMLMediaElement.h: +* platform/audio/PlatformMediaSession.cpp: +(WebCore::PlatformMediaSession::isSuspended): +* platform/audio/PlatformMediaSession.h: +(WebCore::PlatformMediaSessionClient::isSuspended): +* platform/audio/PlatformMediaSessionManager.cpp: +(WebCore::PlatformMediaSessionManager::sessionCanLoadMedia): + 2017-06-09 Daniel Bates CSP: Apply img-src directive to favicon loads Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (218015 => 218016) --- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2017-06-09 20:45:37 UTC (rev 218015) +++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2017-06-09 20:55:11 UTC (rev 218016) @@ -374,6 +374,11 @@ return document() ? document()->processingUserGestureForMedia() : false; } +bool AudioContext::isSuspended() const +{ +return !document() || document()->activeDOMObjectsAreSuspended() || document()->activeDOMObjectsAreStopped(); +} + void AudioContext::visibilityStateChanged() { // Do not suspend if audio is audible. Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.h (218015 => 218016) --- trunk/Source/WebCore/Modules/webaudio/AudioContext.h 2017-06-09 20:45:37 UTC (rev 218015) +++ trunk/Source/WebCore/Modules/webaudio/AudioContext.h 2017-06-09 20:55:11 UTC (rev 218016) @@ -319,6 +319,7 @@ bool shouldOverrideBackgroundPlaybackRestriction(PlatformMediaSession::InterruptionType) const override { return false; } String sourceApplicationIdentifier() const override; bool canProduceAudio() const final { return true; } +bool isSuspended() const final; bool processingUserGestureForMedia() const final; void visibilityStateChanged() final; Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (218015 => 218016) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-09 20:45:37 UTC (rev 218015) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-09 20:55:11 UTC (rev 218016) @@ -7025,6 +7025,11 @@ return m_player && m_readyState >= HAVE_METADATA && hasAudio(); } +bool HTMLMediaElement::isSuspended() const +{ +return document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped(); +} + #if ENABLE(MEDIA_SOURCE) size_t HTMLMediaElement::maximumSourceBufferSize(const SourceBuffer& buffer) const { Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (218015 => 218016) --- trunk/Source/WebCore/html/HTMLMediaElement.h 2017-06-09 20:45:37 UTC (rev 218015) +++ trunk/Source/WebCore/html/HTMLMediaElement.h 2017-06-09 20:55:11 UTC (rev 218016) @@ -825,6 +825,7 @@ bool shouldOverrideBackgroundLoadingRestriction() const override; bool canProduceAudio() const final; bool processingUserGestureForMedia() const final; +bool isSuspended() const final; void pageMutedStateD
[webkit-changes] [218021] trunk/Source/WebKit2
Title: [218021] trunk/Source/WebKit2 Revision 218021 Author jer.no...@apple.com Date 2017-06-09 15:09:01 -0700 (Fri, 09 Jun 2017) Log Message Crash in -[WKWebView _initializeWithConfiguration:] https://bugs.webkit.org/show_bug.cgi?id=173126 Reviewed by Darin Adler. Follow up to previous fix; when setting NSString properties, store a copy of the string rather than the NSString itself. * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _overrideContentSecurityPolicy]): (-[WKWebViewConfiguration _setOverrideContentSecurityPolicy:]): (-[WKWebViewConfiguration _setMediaContentTypesRequiringHardwareSupport:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (218020 => 218021) --- trunk/Source/WebKit2/ChangeLog 2017-06-09 21:59:03 UTC (rev 218020) +++ trunk/Source/WebKit2/ChangeLog 2017-06-09 22:09:01 UTC (rev 218021) @@ -1,3 +1,20 @@ +2017-06-09 Jer Noble + +Crash in -[WKWebView _initializeWithConfiguration:] +https://bugs.webkit.org/show_bug.cgi?id=173126 + + +Reviewed by Darin Adler. + +Follow up to previous fix; when setting NSString properties, store a copy of +the string rather than the NSString itself. + +* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: +(-[WKWebViewConfiguration copyWithZone:]): +(-[WKWebViewConfiguration _overrideContentSecurityPolicy]): +(-[WKWebViewConfiguration _setOverrideContentSecurityPolicy:]): +(-[WKWebViewConfiguration _setMediaContentTypesRequiringHardwareSupport:]): + 2017-06-09 Chris Dumez Use WTF::Function instead of std::function in StorageManager Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (218020 => 218021) --- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2017-06-09 21:59:03 UTC (rev 218020) +++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2017-06-09 22:09:01 UTC (rev 218021) @@ -137,7 +137,7 @@ #endif BOOL _needsStorageAccessFromFileURLsQuirk; -NSString *_overrideContentSecurityPolicy; +RetainPtr _overrideContentSecurityPolicy; RetainPtr _mediaContentTypesRequiringHardwareSupport; } @@ -331,10 +331,10 @@ configuration->_applePayEnabled = self->_applePayEnabled; #endif configuration->_needsStorageAccessFromFileURLsQuirk = self->_needsStorageAccessFromFileURLsQuirk; -configuration->_overrideContentSecurityPolicy = self->_overrideContentSecurityPolicy; +configuration->_overrideContentSecurityPolicy = adoptNS([self->_overrideContentSecurityPolicy copyWithZone:zone]); configuration->_urlSchemeHandlers.set(adoptNS([self._urlSchemeHandlers mutableCopyWithZone:zone])); -configuration->_mediaContentTypesRequiringHardwareSupport = self._mediaContentTypesRequiringHardwareSupport; +configuration->_mediaContentTypesRequiringHardwareSupport = adoptNS([self._mediaContentTypesRequiringHardwareSupport copyWithZone:zone]); return configuration; } @@ -813,12 +813,12 @@ - (NSString *)_overrideContentSecurityPolicy { -return _overrideContentSecurityPolicy; +return _overrideContentSecurityPolicy.get(); } - (void)_setOverrideContentSecurityPolicy:(NSString *)overrideContentSecurityPolicy { -_overrideContentSecurityPolicy = overrideContentSecurityPolicy; +_overrideContentSecurityPolicy = adoptNS([overrideContentSecurityPolicy copy]); } - (NSString *)_mediaContentTypesRequiringHardwareSupport @@ -828,7 +828,7 @@ - (void)_setMediaContentTypesRequiringHardwareSupport:(NSString *)mediaContentTypesRequiringHardwareSupport { -_mediaContentTypesRequiringHardwareSupport = mediaContentTypesRequiringHardwareSupport; +_mediaContentTypesRequiringHardwareSupport = adoptNS([mediaContentTypesRequiringHardwareSupport copy]); } @end ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [218150] trunk/Source/WebCore
Title: [218150] trunk/Source/WebCore Revision 218150 Author jer.no...@apple.com Date 2017-06-12 15:57:18 -0700 (Mon, 12 Jun 2017) Log Message Seeking an MSE video will begin playing audio long before rendering video https://bugs.webkit.org/show_bug.cgi?id=173269 Reviewed by Eric Carlson. Add a notification listener which will be messaged when a to-be-displayed sample is decoded to signal that the 'seeked' event should fire. Consolidate all the various flush methods to funnel into a single flushVideo(). * platform/cf/CoreMediaSoftLink.cpp: * platform/cf/CoreMediaSoftLink.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (-[WebBufferConsumedContext initWithParent:buffer:]): (-[WebBufferConsumedContext dealloc]): (-[WebBufferConsumedContext parent]): (-[WebBufferConsumedContext buffer]): (WebCore::bufferWasConsumedCallback): (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::flush): (WebCore::SourceBufferPrivateAVFObjC::flushVideo): (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): (WebCore::SourceBufferPrivateAVFObjC::bufferWasConsumed): (WebCore::SourceBufferPrivateAVFObjC::willSeek): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (218149 => 218150) --- trunk/Source/WebCore/ChangeLog 2017-06-12 22:48:11 UTC (rev 218149) +++ trunk/Source/WebCore/ChangeLog 2017-06-12 22:57:18 UTC (rev 218150) @@ -1,3 +1,32 @@ +2017-06-12 Jer Noble + +Seeking an MSE video will begin playing audio long before rendering video +https://bugs.webkit.org/show_bug.cgi?id=173269 + +Reviewed by Eric Carlson. + +Add a notification listener which will be messaged when a to-be-displayed sample +is decoded to signal that the 'seeked' event should fire. Consolidate all the various +flush methods to funnel into a single flushVideo(). + +* platform/cf/CoreMediaSoftLink.cpp: +* platform/cf/CoreMediaSoftLink.h: +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: +* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: +* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: +(-[WebBufferConsumedContext initWithParent:buffer:]): +(-[WebBufferConsumedContext dealloc]): +(-[WebBufferConsumedContext parent]): +(-[WebBufferConsumedContext buffer]): +(WebCore::bufferWasConsumedCallback): +(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): +(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): +(WebCore::SourceBufferPrivateAVFObjC::flush): +(WebCore::SourceBufferPrivateAVFObjC::flushVideo): +(WebCore::SourceBufferPrivateAVFObjC::enqueueSample): +(WebCore::SourceBufferPrivateAVFObjC::bufferWasConsumed): +(WebCore::SourceBufferPrivateAVFObjC::willSeek): + 2017-06-12 Eric Carlson [MediaStream iOS] Set audio session mode and options when capturing Modified: trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp (218149 => 218150) --- trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp 2017-06-12 22:48:11 UTC (rev 218149) +++ trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp 2017-06-12 22:57:18 UTC (rev 218150) @@ -128,8 +128,10 @@ SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_DrainAfterDecoding, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_EmptyMedia, CFStringRef) +SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_PostNotificantionWhenConsumed, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMSampleAttachmentKey_DisplayImmediately, CFStringRef) +SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMSampleBufferConsumerNotification_BufferConsumed, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMTimebaseNotification_EffectiveRateChanged, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreMedia, kCMTimebaseNotification_TimeJumpe
[webkit-changes] [218151] trunk/Source
Title: [218151] trunk/Source Revision 218151 Author jer.no...@apple.com Date 2017-06-12 16:01:55 -0700 (Mon, 12 Jun 2017) Log Message Screen sleeps while doing WebRTC video https://bugs.webkit.org/show_bug.cgi?id=173278 Reviewed by Eric Carlson. Source/WebCore: HTMLMediaElement triggers changing the sleep disabler token when the media engine says that its rate has changed; the MediaPlayerPrivateMediaStreamAVFObjC needs to notify its client (the HTMLMediaElement) that the rate has changed when the stream is played or paused. Drive-by fix: Don't set a sleep disabler token (i.e., allow the system and display to sleep) if the stream is strictly local-capture. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::shouldDisableSleep): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Source/WTF: Drive-by fix: add some generic methods for iterating over collections. * WTF.xcodeproj/project.pbxproj: * wtf/Algorithms.h: Added. (WTF::forEach): (WTF::anyOf): (WTF::allOf): Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/WTF.xcodeproj/project.pbxproj trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm Added Paths trunk/Source/WTF/wtf/Algorithms.h Diff Modified: trunk/Source/WTF/ChangeLog (218150 => 218151) --- trunk/Source/WTF/ChangeLog 2017-06-12 22:57:18 UTC (rev 218150) +++ trunk/Source/WTF/ChangeLog 2017-06-12 23:01:55 UTC (rev 218151) @@ -1,3 +1,18 @@ +2017-06-12 Jer Noble + +Screen sleeps while doing WebRTC video +https://bugs.webkit.org/show_bug.cgi?id=173278 + +Reviewed by Eric Carlson. + +Drive-by fix: add some generic methods for iterating over collections. + +* WTF.xcodeproj/project.pbxproj: +* wtf/Algorithms.h: Added. +(WTF::forEach): +(WTF::anyOf): +(WTF::allOf): + 2017-06-12 Carlos Garcia Campos [GTK] Move WebKit GType macros to WTF Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (218150 => 218151) --- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-06-12 22:57:18 UTC (rev 218150) +++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-06-12 23:01:55 UTC (rev 218151) @@ -526,6 +526,7 @@ C8F597CA2A57417FBAB92FD6 /* RandomDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RandomDevice.cpp; sourceTree = ""; }; CD5497AA15857D0300B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTime.cpp; sourceTree = ""; }; CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = ""; }; + CD6D9FCD1EEF3AD4008B0671 /* Algorithms.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Algorithms.h; sourceTree = ""; }; CE46516D19DB1FB4003ECA05 /* NSMapTableSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSMapTableSPI.h; sourceTree = ""; }; CE73E02419DCB7AB00580D5C /* XPCSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCSPI.h; sourceTree = ""; }; DCEE21FA1CEA7538000C2396 /* CFBundleSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFBundleSPI.h; path = cf/CFBundleSPI.h; sourceTree = ""; }; @@ -714,6 +715,7 @@ A8A47339151A825B004123FF /* threads */, A8A47348151A825B004123FF /* unicode */, A8A4725A151A825A004123FF /* ASCIICType.h */, +CD6D9FCD1EEF3AD4008B0671 /* Algorithms.h */, A8A4725B151A825A004123FF /* Assertions.cpp */, A8A4725C151A825A004123FF /* Assertions.h */, A8A4725D151A825A004123FF /* Atomics.h */, Added: trunk/Source/WTF/wtf/Algorithms.h (0 => 218151) --- trunk/Source/WTF/wtf/Algorithms.h (rev 0) +++ trunk/Source/WTF/wtf/Algorithms.h 2017-06-12 23:01:55 UTC (rev 218151) @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2017 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND A
[webkit-changes] [218190] trunk/Source/WebCore
Title: [218190] trunk/Source/WebCore Revision 218190 Author jer.no...@apple.com Date 2017-06-13 12:14:23 -0700 (Tue, 13 Jun 2017) Log Message Protect lifetime of media element during HTMLMediaElement::notifyAboutPlaying() https://bugs.webkit.org/show_bug.cgi?id=173320 Reviewed by Brent Fulgham. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::notifyAboutPlaying): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (218189 => 218190) --- trunk/Source/WebCore/ChangeLog 2017-06-13 19:12:34 UTC (rev 218189) +++ trunk/Source/WebCore/ChangeLog 2017-06-13 19:14:23 UTC (rev 218190) @@ -1,3 +1,14 @@ +2017-06-13 Jer Noble + +Protect lifetime of media element during HTMLMediaElement::notifyAboutPlaying() +https://bugs.webkit.org/show_bug.cgi?id=173320 + + +Reviewed by Brent Fulgham. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::notifyAboutPlaying): + 2017-06-13 Youenn Fablet getReceivers() should return transceivers that have only an active receiver Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (218189 => 218190) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-13 19:12:34 UTC (rev 218189) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-13 19:14:23 UTC (rev 218190) @@ -1020,6 +1020,7 @@ void HTMLMediaElement::notifyAboutPlaying() { +Ref protectedThis(*this); // The 'playing' event can make arbitrary DOM mutations. m_playbackStartedTime = currentMediaTime().toDouble(); dispatchEvent(Event::create(eventNames().playingEvent, false, true)); resolvePendingPlayPromises(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [218209] trunk/Source/WebCore
Title: [218209] trunk/Source/WebCore Revision 218209 Author jer.no...@apple.com Date 2017-06-13 15:07:50 -0700 (Tue, 13 Jun 2017) Log Message Crash when MSE backed media element changes src/srcObject during PiP https://bugs.webkit.org/show_bug.cgi?id=173288 Reviewed by Alex Christensen. Tear down the MediaPlayerPrivateMediaSourceAVFObjC's layers fully whe the player is destroyed, which includes removing the player's AVSampleBufferDisplayLayer from the HTMLMediaElement's fullscreen layer. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (218208 => 218209) --- trunk/Source/WebCore/ChangeLog 2017-06-13 22:06:58 UTC (rev 218208) +++ trunk/Source/WebCore/ChangeLog 2017-06-13 22:07:50 UTC (rev 218209) @@ -1,3 +1,17 @@ +2017-06-13 Jer Noble + +Crash when MSE backed media element changes src/srcObject during PiP +https://bugs.webkit.org/show_bug.cgi?id=173288 + +Reviewed by Alex Christensen. + +Tear down the MediaPlayerPrivateMediaSourceAVFObjC's layers fully whe the player +is destroyed, which includes removing the player's AVSampleBufferDisplayLayer from +the HTMLMediaElement's fullscreen layer. + +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: +(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): + 2017-06-13 Daniel Bates Implement W3C Secure Contexts Draft Specification Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (218208 => 218209) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2017-06-13 22:06:58 UTC (rev 218208) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2017-06-13 22:07:50 UTC (rev 218209) @@ -174,6 +174,9 @@ [m_synchronizer removeTimeObserver:m_durationObserver.get()]; flushPendingSizeChanges(); +destroyLayer(); +destroyDecompressionSession(); + m_seekTimer.stop(); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [218268] trunk/Source/WebCore
Title: [218268] trunk/Source/WebCore Revision 218268 Author jer.no...@apple.com Date 2017-06-14 10:32:48 -0700 (Wed, 14 Jun 2017) Log Message Flaky Test: media/media-source/media-source-unnecessary-seek-seeked.html https://bugs.webkit.org/show_bug.cgi?id=173344 Reviewed by Eric Carlson. Separate the concept of "the page has asked us to seek" from "we have asked the media player to seek". When the media engine tells us its ready state has changed after the page has requested a seek, but before the media element has asked its player to perform the seek, we were previously firing a seeked event. Now we'll check this new ivar and see that we aren't expecting a seek to finish yet. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::finishSeek): (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): * html/HTMLMediaElement.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.h Diff Modified: trunk/Source/WebCore/ChangeLog (218267 => 218268) --- trunk/Source/WebCore/ChangeLog 2017-06-14 17:22:42 UTC (rev 218267) +++ trunk/Source/WebCore/ChangeLog 2017-06-14 17:32:48 UTC (rev 218268) @@ -1,3 +1,23 @@ +2017-06-14 Jer Noble + +Flaky Test: media/media-source/media-source-unnecessary-seek-seeked.html +https://bugs.webkit.org/show_bug.cgi?id=173344 + +Reviewed by Eric Carlson. + +Separate the concept of "the page has asked us to seek" from "we have asked the +media player to seek". When the media engine tells us its ready state has changed +after the page has requested a seek, but before the media element has asked its +player to perform the seek, we were previously firing a seeked event. Now we'll +check this new ivar and see that we aren't expecting a seek to finish yet. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::HTMLMediaElement): +(WebCore::HTMLMediaElement::setReadyState): +(WebCore::HTMLMediaElement::finishSeek): +(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): +* html/HTMLMediaElement.h: + 2017-06-14 Matt Lewis Unreviewed, rolling out r218157. Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (218267 => 218268) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-14 17:22:42 UTC (rev 218267) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-14 17:32:48 UTC (rev 218268) @@ -415,6 +415,7 @@ , m_initiallyMuted(false) , m_paused(true) , m_seeking(false) +, m_seekRequested(false) , m_sentStalledEvent(false) , m_sentEndEvent(false) , m_pausedInternal(false) @@ -2363,7 +2364,7 @@ scheduleEvent(eventNames().waitingEvent); // 4.8.10.10 step 14 & 15. -if (!m_player->seeking() && m_readyState >= HAVE_CURRENT_DATA) +if (m_seekRequested && !m_player->seeking() && m_readyState >= HAVE_CURRENT_DATA) finishSeek(); } else { if (wasPotentiallyPlaying && m_readyState < HAVE_FUTURE_DATA) { @@ -2755,6 +2756,7 @@ scheduleEvent(eventNames().seekingEvent); // 11 - Set the current playback position to the given new playback position +m_seekRequested = true; m_player->seekWithTolerance(time, negativeTolerance, positiveTolerance); // 12 - Wait until the user agent has established whether or not the media data for the new playback @@ -2765,6 +2767,7 @@ void HTMLMediaElement::clearSeeking() { m_seeking = false; +m_seekRequested = false; m_pendingSeekType = NoSeek; invalidateCachedTime(); } @@ -4418,7 +4421,7 @@ bool wasSeeking = seeking(); // 4.8.10.9 step 14 & 15. Needed if no ReadyState change is associated with the seek. -if (m_seeking && m_readyState >= HAVE_CURRENT_DATA && !m_player->seeking()) +if (m_seekRequested && m_readyState >= HAVE_CURRENT_DATA && !m_player->seeking()) finishSeek(); // Always call scheduleTimeupdateEvent when the media engine reports a time discontinuity, Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (218267 => 218268) --- trunk/Source/WebCore/html/HTMLMediaElement.h 2017-06-14 17:22:42 UTC (rev 218267) +++ trunk/Source/WebCore/html/HTMLMediaElement.h 2017-06-14 17:32:48 UTC (rev 218268) @@ -995,6 +995,7 @@ bool m_initiallyMuted : 1; bool m_paused : 1; bool m_seeking : 1; +bool m_seekRequested : 1; // data has not been loaded since sending a "stalled" event bool m_sentStalledEvent : 1; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [218291] trunk/Source/WebCore
Title: [218291] trunk/Source/WebCore Revision 218291 Author jer.no...@apple.com Date 2017-06-14 13:47:01 -0700 (Wed, 14 Jun 2017) Log Message Video flashes black when switching back to a tab https://www.apple.com/homepod/ https://bugs.webkit.org/show_bug.cgi?id=173377 Reviewed by Eric Carlson. Previously, we had set the background color of the video layer to black in order to make the rect occupied by the HTMLMediaElement fully opaque. This worked around a graphics corruption bug. Since then, the code in RenderVideo::foregroundIsKnownToBeOpaqueInRect(...) has been fixed to fully account for whether the HTMLMediaElement has a valid frame to display, making the black layer background unnecessary. Remove all the instances where we were setting the background color of the video layer to black. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: (WebCore::VideoFullscreenLayerManager::setVideoLayer): (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm Diff Modified: trunk/Source/WebCore/ChangeLog (218290 => 218291) --- trunk/Source/WebCore/ChangeLog 2017-06-14 20:15:47 UTC (rev 218290) +++ trunk/Source/WebCore/ChangeLog 2017-06-14 20:47:01 UTC (rev 218291) @@ -1,3 +1,24 @@ +2017-06-14 Jer Noble + +Video flashes black when switching back to a tab https://www.apple.com/homepod/ +https://bugs.webkit.org/show_bug.cgi?id=173377 + +Reviewed by Eric Carlson. + +Previously, we had set the background color of the video layer to black in order to make the rect +occupied by the HTMLMediaElement fully opaque. This worked around a graphics corruption bug. Since +then, the code in RenderVideo::foregroundIsKnownToBeOpaqueInRect(...) has been fixed to fully account +for whether the HTMLMediaElement has a valid frame to display, making the black layer background +unnecessary. + +Remove all the instances where we were setting the background color of the video layer to black. + +* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: +(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): +* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: +(WebCore::VideoFullscreenLayerManager::setVideoLayer): +(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): + 2017-06-14 Matt Lewis Unreviewed, rolling out r218161. Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (218290 => 218291) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2017-06-14 20:15:47 UTC (rev 218290) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2017-06-14 20:47:01 UTC (rev 218291) @@ -746,7 +746,6 @@ m_videoLayer = adoptNS([[AVPlayerLayer alloc] init]); [m_videoLayer setPlayer:m_avPlayer.get()]; -[m_videoLayer setBackgroundColor:cachedCGColor(Color::black)]; #ifndef NDEBUG [m_videoLayer setName:@"MediaPlayerPrivate AVPlayerLayer"]; Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm (218290 => 218291) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm 2017-06-14 20:15:47 UTC (rev 218290) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm 2017-06-14 20:47:01 UTC (rev 218291) @@ -80,11 +80,9 @@ if (m_videoFullscreenLayer) { [m_videoLayer setFrame:CGRectMake(0, 0, m_videoFullscreenFrame.width(), m_videoFullscreenFrame.height())]; [m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0]; -[m_videoLayer setBackgroundColor:cachedCGColor(Color::transparent)]; } else { [m_videoInlineLayer insertSublayer:m_videoLayer.get() atIndex:0]; [m_videoLayer setFrame:m_videoInlineLayer.get().bounds]; -[m_videoLayer setBackgroundColor:cachedCGColor(Color::black)]; } } @@ -106,11 +104,9 @@ if (m_videoFullscreenLayer) { [m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0]; [m_videoLayer setFrame:CGRectMake(0, 0, m_videoFullscreenFrame.width(), m_videoFullscreenFrame.height())]; -[m_videoLayer setBackgroundColor:cachedCGColor(Color::transparent)]; } else if (m_videoInlineLayer) { [m_videoLayer setFrame:[m_videoInlineLayer bounds]]; [m_videoInlineLayer insertSublayer:m_videoLa
[webkit-changes] [218365] trunk
Title: [218365] trunk Revision 218365 Author jer.no...@apple.com Date 2017-06-15 15:48:46 -0700 (Thu, 15 Jun 2017) Log Message [WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients https://bugs.webkit.org/show_bug.cgi?id=173398 Reviewed by Eric Carlson. Source/WebCore: API Test: Tests/WebKit2/MediaStreamTrackDetached.mm Move the definition of a MediaStream as a MediaProducer from the stream itself to its constituent MediaStreamTracks. This ensures that, even if a MediaStreamTrack is removed from its stream, the document (and thus the clients) are notified that media capture is still occurring. Though MediaStream is no longer a MediaProducer, it still uses the MediaProducer's state concept to determine when to fire events. However it's mediaState() implementation will be moved into MediaStreamTrack, and will instead simply bitwise-or together each of it's track's mediaState(). The MediaStream notifies the document that its state has changed asynchronously, so do the same for MediaStreamTrack (which reduces the number of calls to the client when changes all occur during a single run loop). Because the MediaStreamTrackPrivate may be started externally (not by the MediaStreamTrack directly), add a new client method that notifies observers when the track has been started, and the MediaStreamTrack will use this notification to update the document with it's new mediaState(). * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): (WebCore::MediaStream::mediaState): (WebCore::MediaStream::statusDidChange): (WebCore::MediaStream::characteristicsChanged): (WebCore::MediaStream::pageMutedStateDidChange): Deleted. * Modules/mediastream/MediaStream.h: * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::MediaStreamTrack): (WebCore::MediaStreamTrack::~MediaStreamTrack): (WebCore::MediaStreamTrack::pageMutedStateDidChange): (WebCore::MediaStreamTrack::mediaState): (WebCore::MediaStreamTrack::trackStarted): (WebCore::MediaStreamTrack::configureTrackRendering): (WebCore::MediaStreamTrack::stop): (WebCore::MediaStreamTrack::document): * Modules/mediastream/MediaStreamTrack.h: (WebCore::MediaStreamTrack::source): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/mediastream/MediaStreamPrivate.cpp: (WebCore::MediaStreamPrivate::trackStarted): * platform/mediastream/MediaStreamPrivate.h: * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::sourceStarted): * platform/mediastream/MediaStreamTrackPrivate.h: * platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::start): * platform/mediastream/RealtimeMediaSource.h: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm: Added. (-[MediaStreamTrackDetachedUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]): (-[MediaStreamTrackDetachedUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]): (-[MediaStreamTrackDetachedUIDelegate _webView:mediaCaptureStateDidChange:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html: Added. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp trunk/Source/WebCore/Modules/mediastream/MediaStream.h trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm trunk/Tools/TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html Diff Modified: trunk/Source/WebCore/ChangeLog (218364 => 218365) --- trunk/Source/WebCore/ChangeLog 2017-06-15 22:26:42 UTC (rev 218364) +++ trunk/Source/WebCore/ChangeLog 2017-06-15 22:48:46 UTC (rev 218365) @@ -1,3 +1,59 @@ +2017-06-15 Jer Noble + +[WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients +https://bugs.webkit.org/show_bug.cgi?id=173398 + + +Reviewed by Eric Carlson. + +API Test: Tests/WebKit2/MediaStreamTrackDetached.mm + +Move the definition of a MediaStream as a MediaProducer from the stre
[webkit-changes] [218375] trunk
Title: [218375] trunk Revision 218375 Author jer.no...@apple.com Date 2017-06-15 19:49:38 -0700 (Thu, 15 Jun 2017) Log Message [WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients https://bugs.webkit.org/show_bug.cgi?id=173398 Reviewed by Eric Carlson. Source/WebCore: API Test: Tests/WebKit2/MediaStreamTrackDetached.mm Move the definition of a MediaStream as a MediaProducer from the stream itself to its constituent MediaStreamTracks. This ensures that, even if a MediaStreamTrack is removed from its stream, the document (and thus the clients) are notified that media capture is still occurring. Though MediaStream is no longer a MediaProducer, it still uses the MediaProducer's state concept to determine when to fire events. However it's mediaState() implementation will be moved into MediaStreamTrack, and will instead simply bitwise-or together each of it's track's mediaState(). The MediaStream notifies the document that its state has changed asynchronously, so do the same for MediaStreamTrack (which reduces the number of calls to the client when changes all occur during a single run loop). Because the MediaStreamTrackPrivate may be started externally (not by the MediaStreamTrack directly), add a new client method that notifies observers when the track has been started, and the MediaStreamTrack will use this notification to update the document with it's new mediaState(). * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): (WebCore::MediaStream::mediaState): (WebCore::MediaStream::statusDidChange): (WebCore::MediaStream::characteristicsChanged): (WebCore::MediaStream::pageMutedStateDidChange): Deleted. * Modules/mediastream/MediaStream.h: * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::MediaStreamTrack): (WebCore::MediaStreamTrack::~MediaStreamTrack): (WebCore::MediaStreamTrack::pageMutedStateDidChange): (WebCore::MediaStreamTrack::mediaState): (WebCore::MediaStreamTrack::trackStarted): (WebCore::MediaStreamTrack::configureTrackRendering): (WebCore::MediaStreamTrack::stop): (WebCore::MediaStreamTrack::document): * Modules/mediastream/MediaStreamTrack.h: (WebCore::MediaStreamTrack::source): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/mediastream/MediaStreamPrivate.cpp: (WebCore::MediaStreamPrivate::trackStarted): * platform/mediastream/MediaStreamPrivate.h: * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::sourceStarted): * platform/mediastream/MediaStreamTrackPrivate.h: * platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::start): * platform/mediastream/RealtimeMediaSource.h: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm: Added. (-[MediaStreamTrackDetachedUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]): (-[MediaStreamTrackDetachedUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]): (-[MediaStreamTrackDetachedUIDelegate _webView:mediaCaptureStateDidChange:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html: Added. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp trunk/Source/WebCore/Modules/mediastream/MediaStream.h trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm trunk/Tools/TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html Diff Modified: trunk/Source/WebCore/ChangeLog (218374 => 218375) --- trunk/Source/WebCore/ChangeLog 2017-06-16 01:43:27 UTC (rev 218374) +++ trunk/Source/WebCore/ChangeLog 2017-06-16 02:49:38 UTC (rev 218375) @@ -1,3 +1,59 @@ +2017-06-15 Jer Noble + +[WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients +https://bugs.webkit.org/show_bug.cgi?id=173398 + + +Reviewed by Eric Carlson. + +API Test: Tests/WebKit2/MediaStreamTrackDetached.mm + +Move the definition of a MediaStream as a MediaProducer from the stre
[webkit-changes] [218399] trunk
Title: [218399] trunk Revision 218399 Author jer.no...@apple.com Date 2017-06-16 11:46:29 -0700 (Fri, 16 Jun 2017) Log Message [WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients https://bugs.webkit.org/show_bug.cgi?id=173398 Reviewed by Eric Carlson. Source/WebCore: API Test: Tests/WebKit2/MediaStreamTrackDetached.mm Move the definition of a MediaStream as a MediaProducer from the stream itself to its constituent MediaStreamTracks. This ensures that, even if a MediaStreamTrack is removed from its stream, the document (and thus the clients) are notified that media capture is still occurring. Though MediaStream is no longer a MediaProducer, it still uses the MediaProducer's state concept to determine when to fire events. However it's mediaState() implementation will be moved into MediaStreamTrack, and will instead simply bitwise-or together each of it's track's mediaState(). The MediaStream notifies the document that its state has changed asynchronously, so do the same for MediaStreamTrack (which reduces the number of calls to the client when changes all occur during a single run loop). Because the MediaStreamTrackPrivate may be started externally (not by the MediaStreamTrack directly), add a new client method that notifies observers when the track has been started, and the MediaStreamTrack will use this notification to update the document with it's new mediaState(). * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): (WebCore::MediaStream::mediaState): (WebCore::MediaStream::statusDidChange): (WebCore::MediaStream::characteristicsChanged): (WebCore::MediaStream::pageMutedStateDidChange): Deleted. * Modules/mediastream/MediaStream.h: * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::MediaStreamTrack): (WebCore::MediaStreamTrack::~MediaStreamTrack): (WebCore::MediaStreamTrack::pageMutedStateDidChange): (WebCore::MediaStreamTrack::mediaState): (WebCore::MediaStreamTrack::trackStarted): (WebCore::MediaStreamTrack::configureTrackRendering): (WebCore::MediaStreamTrack::stop): (WebCore::MediaStreamTrack::document): * Modules/mediastream/MediaStreamTrack.h: (WebCore::MediaStreamTrack::source): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/mediastream/MediaStreamPrivate.cpp: (WebCore::MediaStreamPrivate::trackStarted): * platform/mediastream/MediaStreamPrivate.h: * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::sourceStarted): * platform/mediastream/MediaStreamTrackPrivate.h: * platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::start): * platform/mediastream/RealtimeMediaSource.h: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm: Added. (-[MediaStreamTrackDetachedUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]): (-[MediaStreamTrackDetachedUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]): (-[MediaStreamTrackDetachedUIDelegate _webView:mediaCaptureStateDidChange:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html: Added. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp trunk/Source/WebCore/Modules/mediastream/MediaStream.h trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj Added Paths trunk/Tools/TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm trunk/Tools/TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html Diff Modified: trunk/Source/WebCore/ChangeLog (218398 => 218399) --- trunk/Source/WebCore/ChangeLog 2017-06-16 17:42:27 UTC (rev 218398) +++ trunk/Source/WebCore/ChangeLog 2017-06-16 18:46:29 UTC (rev 218399) @@ -1,3 +1,59 @@ +2017-06-16 Jer Noble + +[WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients +https://bugs.webkit.org/show_bug.cgi?id=173398 + + +Reviewed by Eric Carlson. + +API Test: Tests/WebKit2/MediaStreamTrackDetached.mm + +Move the definition of a MediaStream as a MediaProducer from the stre
[webkit-changes] [218417] trunk
Title: [218417] trunk Revision 218417 Author jer.no...@apple.com Date 2017-06-16 14:59:23 -0700 (Fri, 16 Jun 2017) Log Message [iOS] Do not pause playing video when application resigns active state. https://bugs.webkit.org/show_bug.cgi?id=173474 Reviewed by Tim Horton. Source/WebCore: Test: media/video-inactive-playback.html Separate out the concept of "inactive" playback from "process background" playback. Move the implementation of applicationDidEnterBackground() from MediaSessionManagerIOS into it's superclass, PlatformMediaSessionManager, and add a new set of restrictions for "InactiveProcessPlaybackRestricted" and "SuspendedUnderLockPlaybackRestricted". Leave the default restriction set for iOS as "BackgroundProcessPlaybackRestricted" and "SuspendedUnderLockPlaybackRestricted", to preserve the existing behavior of suspending playback when switching apps or when locking the device. * platform/audio/PlatformMediaSession.cpp: (WebCore::interruptionName): * platform/audio/PlatformMediaSession.h: * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive): (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive): (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground): (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground): Deleted. (WebCore::PlatformMediaSessionManager::applicationDidEnterForeground): Deleted. * platform/audio/PlatformMediaSessionManager.h: * platform/audio/ios/MediaSessionManagerIOS.h: * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): (-[WebMediaSessionHelper applicationDidBecomeActive:]): (-[WebMediaSessionHelper applicationWillResignActive:]): (WebCore::MediaSessionManageriOS::applicationDidEnterBackground): Deleted. (WebCore::MediaSessionManageriOS::applicationWillEnterForeground): Deleted. * testing/Internals.cpp: (WebCore::Internals::applicationWillBecomeInactive): (WebCore::Internals::applicationDidBecomeActive): (WebCore::Internals::applicationWillEnterForeground): (WebCore::Internals::applicationDidEnterBackground): (WebCore::Internals::setMediaSessionRestrictions): (WebCore::Internals::applicationDidEnterForeground): Deleted. (WebCore::Internals::applicationWillEnterBackground): Deleted. * testing/Internals.h: * testing/Internals.idl: LayoutTests: * media/video-background-playback-expected.txt: * media/video-background-playback.html: * media/video-background-tab-playback-expected.txt: * media/video-background-tab-playback.html: * media/video-inactive-playback-expected.txt: Added. * media/video-inactive-playback.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/media/video-background-playback-expected.txt trunk/LayoutTests/media/video-background-playback.html trunk/LayoutTests/media/video-background-tab-playback-expected.txt trunk/LayoutTests/media/video-background-tab-playback.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp trunk/Source/WebCore/platform/audio/PlatformMediaSession.h trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/Internals.h trunk/Source/WebCore/testing/Internals.idl Added Paths trunk/LayoutTests/media/video-inactive-playback-expected.txt trunk/LayoutTests/media/video-inactive-playback.html Diff Modified: trunk/LayoutTests/ChangeLog (218416 => 218417) --- trunk/LayoutTests/ChangeLog 2017-06-16 21:43:00 UTC (rev 218416) +++ trunk/LayoutTests/ChangeLog 2017-06-16 21:59:23 UTC (rev 218417) @@ -1,3 +1,17 @@ +2017-06-16 Jer Noble + +[iOS] Do not pause playing video when application resigns active state. +https://bugs.webkit.org/show_bug.cgi?id=173474 + +Reviewed by Tim Horton. + +* media/video-background-playback-expected.txt: +* media/video-background-playback.html: +* media/video-background-tab-playback-expected.txt: +* media/video-background-tab-playback.html: +* media/video-inactive-playback-expected.txt: Added. +* media/video-inactive-playback.html: Added. + 2017-06-16 Alex Christensen REGRESSION (r213126): Sync XHR needs partition for cache and credentials Modified: trunk/LayoutTests/media/video-background-playback-expected.txt (218416 => 218417) --- trunk/LayoutTests/media/video-background-playback-expected.txt 2017-06-16 21:43:00 UTC (rev 218416) +++ trunk/LayoutTests/media/video-background-playback-expected.txt 2017-06-16 21:59:23 UTC (rev 218417) @@ -12,7 +12,7 @@ EVENT
[webkit-changes] [218438] trunk/Source/WebCore
Title: [218438] trunk/Source/WebCore Revision 218438 Author jer.no...@apple.com Date 2017-06-16 19:20:02 -0700 (Fri, 16 Jun 2017) Log Message [MSE] Seeking or entering fullscreen can cause extreme CPU usage https://bugs.webkit.org/show_bug.cgi?id=173505 Reviewed by Tim Horton. When support for painting MSE to WebGL was added in r217185, the implementation of SourceBufferPrivateAVFObjC::isReadyForMoreSamples() was modified to support asking the decompression session if it was ready. That change, however, caused an extreme performance regression in the normal playback path, where WebKit will effectively append samples endlessly to the AVSampleBufferDisplayLayer, which admirably enqueued each of them for decoding. Eventually, the cost of iterating over the CMBufferQueue overwhelmed the cost of decoding, and caused the extreme lag seen when seeking. Make sure to property query the AVSampleBufferDisplayLayer for isReadyForMoreMediaData before enqueuing. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (218437 => 218438) --- trunk/Source/WebCore/ChangeLog 2017-06-17 01:19:28 UTC (rev 218437) +++ trunk/Source/WebCore/ChangeLog 2017-06-17 02:20:02 UTC (rev 218438) @@ -1,3 +1,24 @@ +2017-06-16 Jer Noble + +[MSE] Seeking or entering fullscreen can cause extreme CPU usage +https://bugs.webkit.org/show_bug.cgi?id=173505 + +Reviewed by Tim Horton. + +When support for painting MSE to WebGL was added in r217185, the implementation of +SourceBufferPrivateAVFObjC::isReadyForMoreSamples() was modified to support asking +the decompression session if it was ready. That change, however, caused an extreme +performance regression in the normal playback path, where WebKit will effectively +append samples endlessly to the AVSampleBufferDisplayLayer, which admirably enqueued +each of them for decoding. Eventually, the cost of iterating over the CMBufferQueue +overwhelmed the cost of decoding, and caused the extreme lag seen when seeking. + +Make sure to property query the AVSampleBufferDisplayLayer for isReadyForMoreMediaData +before enqueuing. + +* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: +(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): + 2017-06-16 Sam Weinig [WebIDL] Remove custom bindings for HTMLDocument Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (218437 => 218438) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2017-06-17 01:19:28 UTC (rev 218437) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2017-06-17 02:20:02 UTC (rev 218438) @@ -1002,9 +1002,13 @@ bool SourceBufferPrivateAVFObjC::isReadyForMoreSamples(const AtomicString& trackIDString) { int trackID = trackIDString.toInt(); -if (trackID == m_enabledVideoTrackID) -return !m_decompressionSession || m_decompressionSession->isReadyForMoreMediaData(); +if (trackID == m_enabledVideoTrackID) { +if (m_decompressionSession) +return m_decompressionSession->isReadyForMoreMediaData(); +return [m_displayLayer isReadyForMoreMediaData]; +} + if (m_audioRenderers.contains(trackID)) return [m_audioRenderers.get(trackID) isReadyForMoreMediaData]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [218463] trunk/Source/WebCore
Title: [218463] trunk/Source/WebCore Revision 218463 Author jer.no...@apple.com Date 2017-06-18 08:55:55 -0700 (Sun, 18 Jun 2017) Log Message [MSE] Seeking or entering fullscreen can cause extreme CPU usage https://bugs.webkit.org/show_bug.cgi?id=173505 Reviewed by Tim Horton. When support for painting MSE to WebGL was added in r217185, the implementation of SourceBufferPrivateAVFObjC::isReadyForMoreSamples() was modified to support asking the decompression session if it was ready. That change, however, caused an extreme performance regression in the normal playback path, where WebKit will effectively append samples endlessly to the AVSampleBufferDisplayLayer, which admirably enqueued each of them for decoding. Eventually, the cost of iterating over the CMBufferQueue overwhelmed the cost of decoding, and caused the extreme lag seen when seeking. Make sure to property query the AVSampleBufferDisplayLayer for isReadyForMoreMediaData before enqueuing. A previous version of this patch exposed some errors which caused failing tests: In sourceBufferPrivateDidReceiveSample(), we were using local versions of presentationTimestamp and decodeTimestamp as keys to the decodeQueue; those local versions were floating point values (because MediaTime + float = float), but the sample itself uses non-floating point MediaTimes. This causes samples to be left in the queue when they should be removed. In didBecomeReadyForMoreSamples(), we were getting spurious assertions when a AVSampleBufferDisplayLayer or a AVSampleBufferAudioRenderer would fire a callback from -requestMediaDataWhenReadyOnQueue:usingBlock: even after it had been told to -stopRequestingMediaData. Apparently it's expected behavior and so an ASSERT_NOT_REACHED is inappropriate here. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (218462 => 218463) --- trunk/Source/WebCore/ChangeLog 2017-06-18 03:57:26 UTC (rev 218462) +++ trunk/Source/WebCore/ChangeLog 2017-06-18 15:55:55 UTC (rev 218463) @@ -1,3 +1,42 @@ +2017-06-18 Jer Noble + +[MSE] Seeking or entering fullscreen can cause extreme CPU usage +https://bugs.webkit.org/show_bug.cgi?id=173505 + +Reviewed by Tim Horton. + +When support for painting MSE to WebGL was added in r217185, the implementation of +SourceBufferPrivateAVFObjC::isReadyForMoreSamples() was modified to support asking +the decompression session if it was ready. That change, however, caused an extreme +performance regression in the normal playback path, where WebKit will effectively +append samples endlessly to the AVSampleBufferDisplayLayer, which admirably enqueued +each of them for decoding. Eventually, the cost of iterating over the CMBufferQueue +overwhelmed the cost of decoding, and caused the extreme lag seen when seeking. + +Make sure to property query the AVSampleBufferDisplayLayer for isReadyForMoreMediaData +before enqueuing. + +A previous version of this patch exposed some errors which caused failing tests: + +In sourceBufferPrivateDidReceiveSample(), we were using local versions of +presentationTimestamp and decodeTimestamp as keys to the decodeQueue; those local versions +were floating point values (because MediaTime + float = float), but the sample itself uses +non-floating point MediaTimes. This causes samples to be left in the queue when they should +be removed. + +In didBecomeReadyForMoreSamples(), we were getting spurious assertions when a +AVSampleBufferDisplayLayer or a AVSampleBufferAudioRenderer would fire a callback from +-requestMediaDataWhenReadyOnQueue:usingBlock: even after it had been told to +-stopRequestingMediaData. Apparently it's expected behavior and so an ASSERT_NOT_REACHED is +inappropriate here. + +* Modules/mediasource/SourceBuffer.cpp: +(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): +* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: +(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): +(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): + + 2017-06-17 Zalan Bujtas Addressing post-review comment after r218456. Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (218462 => 218463) --- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2017-06-18 03:57:26
[webkit-changes] [218710] trunk/Source/WebCore
Title: [218710] trunk/Source/WebCore Revision 218710 Author jer.no...@apple.com Date 2017-06-22 11:56:15 -0700 (Thu, 22 Jun 2017) Log Message REGRESSION (r217223): [iOS] Video keeps playing after application is backgrounded https://bugs.webkit.org/show_bug.cgi?id=173727 Reviewed by Eric Carlson. Only override media element visibility if it is in picture-in-picture mode (not fullscreen generally). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::visibilityStateChanged): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (218709 => 218710) --- trunk/Source/WebCore/ChangeLog 2017-06-22 18:39:53 UTC (rev 218709) +++ trunk/Source/WebCore/ChangeLog 2017-06-22 18:56:15 UTC (rev 218710) @@ -1,3 +1,15 @@ +2017-06-22 Jer Noble + +REGRESSION (r217223): [iOS] Video keeps playing after application is backgrounded +https://bugs.webkit.org/show_bug.cgi?id=173727 + +Reviewed by Eric Carlson. + +Only override media element visibility if it is in picture-in-picture mode (not fullscreen generally). + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::visibilityStateChanged): + 2017-06-22 Joseph Pecoraro Follow-up to r218662. Only log backtraces for DumpRenderTree. Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (218709 => 218710) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-22 18:39:53 UTC (rev 218709) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-22 18:56:15 UTC (rev 218710) @@ -5339,7 +5339,7 @@ void HTMLMediaElement::visibilityStateChanged() { -m_elementIsHidden = document().hidden() && m_videoFullscreenMode == VideoFullscreenModeNone; +m_elementIsHidden = document().hidden() && m_videoFullscreenMode != VideoFullscreenModePictureInPicture; LOG(Media, "HTMLMediaElement::visibilityStateChanged(%p) - visible = %s", this, boolString(!m_elementIsHidden)); updateSleepDisabling(); m_mediaSession->visibilityChanged(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [218757] trunk/Source
Kit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionIndex): Deleted. (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties): Deleted. (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled): Deleted. (WebKit::WebPlaybackSessionManagerProxy::setDuration): Deleted. (WebKit::WebPlaybackSessionManagerProxy::setPlaybackStartedTime): Deleted. (WebKit::WebPlaybackSessionManagerProxy::setRate): Deleted. * WebProcess/cocoa/WebPlaybackSessionManager.h: * WebProcess/cocoa/WebPlaybackSessionManager.messages.in: * WebProcess/cocoa/WebPlaybackSessionManager.mm: (WebKit::WebPlaybackSessionManager::durationChanged): (WebKit::WebPlaybackSessionManager::currentTimeChanged): (WebKit::WebPlaybackSessionManager::bufferedTimeChanged): (WebKit::WebPlaybackSessionManager::playbackStartedTimeChanged): (WebKit::WebPlaybackSessionManager::rateChanged): (WebKit::WebPlaybackSessionManager::seekableRangesChanged): (WebKit::WebPlaybackSessionManager::canPlayFastReverseChanged): (WebKit::WebPlaybackSessionManager::audioMediaSelectionOptionsChanged): (WebKit::WebPlaybackSessionManager::legibleMediaSelectionOptionsChanged): (WebKit::WebPlaybackSessionManager::externalPlaybackChanged): (WebKit::WebPlaybackSessionManager::audioMediaSelectionIndexChanged): (WebKit::WebPlaybackSessionManager::legibleMediaSelectionIndexChanged): (WebKit::WebPlaybackSessionManager::wirelessVideoPlaybackDisabledChanged): (WebKit::WebPlaybackSessionManager::mutedChanged): (WebKit::WebPlaybackSessionManager::setMuted): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm trunk/Source/WebCore/platform/ios/WebAVPlayerController.h trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.messages.in trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm Diff Modified: trunk/Source/WebCore/ChangeLog (218756 => 218757) --- trunk/Source/WebCore/ChangeLog 2017-06-23 19:13:41 UTC (rev 218756) +++ trunk/Source/WebCore/ChangeLog 2017-06-23 19:32:18 UTC (rev 218757) @@ -1,3 +1,25 @@ +2017-06-23 Jer Noble + +[WK2] Support -[WebAVPlayerController setMuted:] +https://bugs.webkit.org/show_bug.cgi?id=173777 + +Reviewed by Eric Carlson. + +Have -[WebAVPlayerController setMuted:] pass the request to its delegate (the model) +rather than just storing the value. + +* platform/cocoa/WebPlaybackSessionModel.h: +* platform/cocoa/WebPlaybackSessionModelMediaElement.h: +* platform/cocoa/WebPlaybackSessionModelMediaElement.mm: +(WebCore::WebPlaybackSessionModelMediaElement::toggleMuted): +(WebCore::WebPlaybackSessionModelMediaElement::setMuted): +* platform/ios/WebAVPlayerController.h: +* platform/ios/WebAVPlayerController.mm: +(-[WebAVPlayerController isMuted]): +(-[WebAVPlayerController setMuted:]): +* platform/ios/WebVideoFullscreenControllerAVKit.mm: +(WebVideoFullscreenControllerContext::setMuted): + 2017-06-23 Frederic Wang Make RenderLayer::handleTouchEvent use usesAcceleratedScrolling() Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h (218756 => 218757) --- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h 2017-06-23 19:13:41 UTC (rev 218756) +++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h 2017-06-23 19:32:18 UTC (rev 218757) @@ -57,6 +57,7 @@ virtual void selectLegibleMediaOption(uint64_t index) = 0; virtual void togglePictureInPicture() = 0; virtual void toggleMuted() = 0; +virtual void setMuted(bool) = 0; enum ExternalPlaybackTargetType { TargetTypeNone, TargetTypeAirPlay, TargetTypeTVOut }; Modified: trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h (218756 => 218757) --- trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h 2017-06-23 19:13:41 UTC (rev 218756) +++ trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h 2017-06-23 19:32:18 UTC (rev 218757) @@ -71,6 +71,7 @@ WEBCORE_EXPORT void selectLegibleMediaOption(uint64_t index) final; WEBCORE_EXPORT void togglePictureInPicture() final; WEBCORE_EXPORT void toggleMuted() final; +WEBCORE_EXPORT void setMuted(bool) final; double duration() const final; double currentTime() const final; Modified: trunk/Source/WebC
[webkit-changes] [219011] trunk/Source/WebKit2
Title: [219011] trunk/Source/WebKit2 Revision 219011 Author jer.no...@apple.com Date 2017-06-30 14:00:10 -0700 (Fri, 30 Jun 2017) Log Message REGRESSION (r218757): Touch Bar's media scrubber timeline runs from 00:00 to 00:00 and has no playhead https://bugs.webkit.org/show_bug.cgi?id=174032 Reviewed by Eric Carlson. Fix a copypasta error where durationChange notifications were changing the value of muted. * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: (WebKit::WebPlaybackSessionManagerProxy::durationChanged): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (219010 => 219011) --- trunk/Source/WebKit2/ChangeLog 2017-06-30 20:54:26 UTC (rev 219010) +++ trunk/Source/WebKit2/ChangeLog 2017-06-30 21:00:10 UTC (rev 219011) @@ -1,3 +1,15 @@ +2017-06-30 Jer Noble + +REGRESSION (r218757): Touch Bar's media scrubber timeline runs from 00:00 to 00:00 and has no playhead +https://bugs.webkit.org/show_bug.cgi?id=174032 + +Reviewed by Eric Carlson. + +Fix a copypasta error where durationChange notifications were changing the value of muted. + +* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: +(WebKit::WebPlaybackSessionManagerProxy::durationChanged): + 2017-06-30 Chris Dumez Move ResourceLoadStatisticsStore to WebKit2/UIProcess Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm (219010 => 219011) --- trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm 2017-06-30 20:54:26 UTC (rev 219010) +++ trunk/Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm 2017-06-30 21:00:10 UTC (rev 219011) @@ -442,7 +442,7 @@ void WebPlaybackSessionManagerProxy::durationChanged(uint64_t contextId, double duration) { -ensureModel(contextId).mutedChanged(duration); +ensureModel(contextId).durationChanged(duration); } void WebPlaybackSessionManagerProxy::playbackStartedTimeChanged(uint64_t contextId, double playbackStartedTime) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [219012] trunk
Title: [219012] trunk Revision 219012 Author jer.no...@apple.com Date 2017-06-30 14:04:11 -0700 (Fri, 30 Jun 2017) Log Message Make Legacy EME API controlled by RuntimeEnabled setting. https://bugs.webkit.org/show_bug.cgi?id=173994 Reviewed by Sam Weinig. Source/_javascript_Core: * Configurations/FeatureDefines.xcconfig: * runtime/CommonIdentifiers.h: Source/WebCore: Add a new RuntimeEnabledFeatures setting to control the availability of the WebKit prefixed EME APIs. * Configurations/FeatureDefines.xcconfig: * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: * dom/Element.idl: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): (WebCore::HTMLMediaElement::webkitSetMediaKeys): (WebCore::HTMLMediaElement::keyAdded): * html/HTMLMediaElement.idl: * html/WebKitMediaKeyError.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setLegacyEncryptedMediaAPIEnabled): (WebCore::RuntimeEnabledFeatures::legacyEncryptedMediaAPIEnabled): Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit/mac: Add a new preference used to control WebCore's new RuntimeEnabledFeature setting. * Configurations/FeatureDefines.xcconfig: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences legacyEncryptedMediaAPIEnabled]): (-[WebPreferences setLegacyEncryptedMediaAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: Add a new WKWebViewConfiguration property, as well as a new WKPreferences function, both able to control WebCore's new RuntimeEnabledFeature setting for the Legacy EME API. * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesGetLegacyEncryptedMediaAPIEnabled): (WKPreferencesSetLegacyEncryptedMediaAPIEnabled): * UIProcess/API/C/WKPreferencesRef.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _setLegacyEncryptedMediaAPIEnabled:]): (-[WKWebViewConfiguration _legacyEncryptedMediaAPIEnabled]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Source/WTF: * wtf/FeatureDefines.h: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/FeatureDefines.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.idl trunk/Source/WebCore/PAL/ChangeLog trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig trunk/Source/WebCore/dom/Element.idl trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.idl trunk/Source/WebCore/html/WebKitMediaKeyError.idl trunk/Source/WebCore/page/RuntimeEnabledFeatures.h trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h trunk/Source/WebKit/mac/WebView/WebPreferences.mm trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig Diff Modified: trunk/Source/_javascript_Core/ChangeLog (219011 => 219012) --- trunk/Source/_javascript_Core/ChangeLog 2017-06-30 21:00:10 UTC (rev 219011) +++ trunk/Source/_javascript_Core/ChangeLog 2017-06-30 21:04:11 UTC (rev 219012) @@ -1,3 +1,13 @@ +2017-06-29 Jer Noble + +Make Legacy EME API controlled by RuntimeEnabled setting. +https://bugs.webkit.org/show_bug.
[webkit-changes] [222995] trunk/Source/WebCore
Title: [222995] trunk/Source/WebCore Revision 222995 Author jer.no...@apple.com Date 2017-10-06 14:02:11 -0700 (Fri, 06 Oct 2017) Log Message Netflix playback fails with S7353 error https://bugs.webkit.org/show_bug.cgi?id=178023 Reviewed by Dean Jackson. On certain platforms, WebCoreDecompressionSession will fail to produce CVImageBuffers when presented with encrypted content. On those platforms, the seek() command will fail, because frames at the destination time cannot be decoded. This occurs for Netflix because the element is not in the DOM at decode time. Only create a WebCoreDecompressionSession in MediaPlayerPrivateMediaSourceAVFObjC when we have explicitly been asked to paint into a WebGL canvas. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (222994 => 222995) --- trunk/Source/WebCore/ChangeLog 2017-10-06 20:14:40 UTC (rev 222994) +++ trunk/Source/WebCore/ChangeLog 2017-10-06 21:02:11 UTC (rev 222995) @@ -1,3 +1,20 @@ +2017-10-06 Jer Noble + +Netflix playback fails with S7353 error +https://bugs.webkit.org/show_bug.cgi?id=178023 + +Reviewed by Dean Jackson. + +On certain platforms, WebCoreDecompressionSession will fail to produce CVImageBuffers when presented with +encrypted content. On those platforms, the seek() command will fail, because frames at the destination time +cannot be decoded. This occurs for Netflix because the element is not in the DOM at decode time. + +Only create a WebCoreDecompressionSession in MediaPlayerPrivateMediaSourceAVFObjC when we have explicitly +been asked to paint into a WebGL canvas. + +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: +(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged): + 2017-10-06 Jiewen Tan Replace some stack raw pointers with RefPtrs within WebCore/dom Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (222994 => 222995) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2017-10-06 20:14:40 UTC (rev 222994) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2017-10-06 21:02:11 UTC (rev 222995) @@ -639,7 +639,7 @@ void MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged() { -if (!m_hasBeenAskedToPaintGL && m_player->client().mediaPlayerRenderingCanBeAccelerated(m_player)) { +if (!m_hasBeenAskedToPaintGL) { destroyDecompressionSession(); ensureLayer(); } else { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223029] trunk
Title: [223029] trunk Revision 223029 Author jer.no...@apple.com Date 2017-10-08 00:52:14 -0700 (Sun, 08 Oct 2017) Log Message SourceBuffer remove throws out way more content than requested https://bugs.webkit.org/show_bug.cgi?id=177884 Reviewed by Darin Adler. Source/WebCore: Test: media/media-source/media-source-remove-too-much.html The end parameter is exclusive, not inclusive, of the range to be removed. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::removeCodedFrames): LayoutTests: * media/media-source/media-source-remove-decodeorder-crash-expected.txt: * media/media-source/media-source-remove-decodeorder-crash.html: * media/media-source/media-source-remove-too-much-expected.txt: Added. * media/media-source/media-source-remove-too-much.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash-expected.txt trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp Added Paths trunk/LayoutTests/media/media-source/media-source-remove-too-much-expected.txt trunk/LayoutTests/media/media-source/media-source-remove-too-much.html Diff Modified: trunk/LayoutTests/ChangeLog (223028 => 223029) --- trunk/LayoutTests/ChangeLog 2017-10-08 07:47:43 UTC (rev 223028) +++ trunk/LayoutTests/ChangeLog 2017-10-08 07:52:14 UTC (rev 223029) @@ -1,3 +1,16 @@ +2017-10-08 Jer Noble + +SourceBuffer remove throws out way more content than requested +https://bugs.webkit.org/show_bug.cgi?id=177884 + + +Reviewed by Darin Adler. + +* media/media-source/media-source-remove-decodeorder-crash-expected.txt: +* media/media-source/media-source-remove-decodeorder-crash.html: +* media/media-source/media-source-remove-too-much-expected.txt: Added. +* media/media-source/media-source-remove-too-much.html: Added. + 2017-10-08 Brent Fulgham Nullptr deref in WebCore::Node::computeEditability Modified: trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash-expected.txt (223028 => 223029) --- trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash-expected.txt 2017-10-08 07:47:43 UTC (rev 223028) +++ trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash-expected.txt 2017-10-08 07:52:14 UTC (rev 223029) @@ -9,7 +9,7 @@ EVENT(updateend) RUN(sourceBuffer.remove(1.9, 2)) EVENT(updateend) -EXPECTED (sourceBuffer.buffered.length == '1') OK +EXPECTED (sourceBuffer.buffered.length == '2') OK EXPECTED (sourceBuffer.buffered.start(0) == '0') OK EXPECTED (sourceBuffer.buffered.end(0) == '1') OK END OF TEST Modified: trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html (223028 => 223029) --- trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html 2017-10-08 07:47:43 UTC (rev 223028) +++ trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html 2017-10-08 07:52:14 UTC (rev 223029) @@ -43,7 +43,7 @@ } function checkRemoved() { -testExpected('sourceBuffer.buffered.length', 1); +testExpected('sourceBuffer.buffered.length', 2); testExpected('sourceBuffer.buffered.start(0)', 0); testExpected('sourceBuffer.buffered.end(0)', 1); endTest(); Added: trunk/LayoutTests/media/media-source/media-source-remove-too-much-expected.txt (0 => 223029) --- trunk/LayoutTests/media/media-source/media-source-remove-too-much-expected.txt (rev 0) +++ trunk/LayoutTests/media/media-source/media-source-remove-too-much-expected.txt 2017-10-08 07:52:14 UTC (rev 223029) @@ -0,0 +1,14 @@ +This tests the SourceBuffer.remove() API. The test will remove samples from the given startTime (0) up to but not including the presentation start time of the sync sample (4) after endTime (4). + +RUN(video.src = "" +EVENT(sourceopen) +RUN(sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock")) +RUN(sourceBuffer.appendBuffer(initSegment)) +EVENT(updateend) +RUN(sourceBuffer.appendBuffer(samples)) +EVENT(updateend) +RUN(sourceBuffer.remove(0, 4)) +EVENT(updateend) +EXPECTED (sourceBuffer.buffered.start(0) == '4') OK +END OF TEST + Copied: trunk/LayoutTests/media/media-source/media-source-remove-too-much.html (from rev 223028, trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html) (0 => 223029) --- trunk/LayoutTests/media/media-source/media-source-remove-too-much.html (rev 0) +++ trunk/LayoutTests/media/media-source/media-source-remove-too-much.html 2017-10-08 07:52:14 UTC (rev 223029) @@ -0,0 +1,62 @@ + + + +mock-media-source + +var source; +var sourceBuffe
[webkit-changes] [223280] trunk/Source/WebCore
Title: [223280] trunk/Source/WebCore Revision 223280 Author jer.no...@apple.com Date 2017-10-13 09:32:38 -0700 (Fri, 13 Oct 2017) Log Message Performance: do pixel conformance and texturing in a single step. https://bugs.webkit.org/show_bug.cgi?id=178219 Reviewed by Dean Jackson. No new tests; performance improvements should have no behavior change. Rather than asking the VTDecompressionSession to conform the output CVPixelBuffer into a pixel format compatible with OpenGL (& ES), don't constrain the output at all, and only do a conformance step if the output is not already compatible with OpenGL. This eliminates one copy (in hardware) operation. Move the TextureCacheCV object into VideoTextureCopierCV; it will be conditionally used to create the texture if the pixel buffer is compatible. Refactor copyVideoTextureToPlatformTexture(CVOpenGLTextureRef) in VideoTextureCopierCV. The new entry point, copyImageToPlatformTexture(), will attempt to use the texture cache first, and call a new common copyVideoTextureToPlatformTexture(Platform3DObject) with the result. The new copyImageToPlatformTexture() will pull planar YUV frames into two textures, and combine the two with a color transfer function when drawing to the output texture. * platform/graphics/GraphicsContext3D.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: (WebCore::GraphicsContext3D::texImageIOSurface2D): * platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample): * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/TextureCacheCV.mm: (WebCore::TextureCacheCV::textureFromImage): * platform/graphics/cv/VideoTextureCopierCV.cpp: (WebCore::pixelRangeFromPixelFormat): (WebCore::transferFunctionFromString): (WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction): (WebCore::VideoTextureCopierCV::~VideoTextureCopierCV): (WebCore::VideoTextureCopierCV::initializeUVContextObjects): (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture): (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture): * platform/graphics/cv/VideoTextureCopierCV.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm trunk/Source/WebCore/platform/graphics/cv/TextureCacheCV.h trunk/Source/WebCore/platform/graphics/cv/TextureCacheCV.mm trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.h Diff Modified: trunk/Source/WebCore/ChangeLog (223279 => 223280) --- trunk/Source/WebCore/ChangeLog 2017-10-13 09:22:48 UTC (rev 223279) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 16:32:38 UTC (rev 223280) @@ -1,3 +1,48 @@ +2017-10-13 Jer Noble + +Performance: do pixel conformance and texturing in a single step. +https://bugs.webkit.org/show_bug.cgi?id=178219 + + +Reviewed by Dean Jackson. + +No new tests; performance improvements should have no behavior change. + +Rather than asking the VTDecompressionSession to conform the output CVPixelBuffer into a +pixel format compatible with OpenGL (& ES), don't constrain the output at all, and only do a +conformance step if the output is not already compatible with OpenGL. This eliminates one +copy (in hardware) operation. + +Move the TextureCacheCV object into VideoTextureCopierCV; it will be conditionally used to +create the texture if the pixel buffer is compatible. + +Refactor copyVideoTextureToPlatformTexture(CVOpenGLTextureRef) in VideoTextureCopierCV. The +new entry point, copyImageToPlatformTexture(), will attempt to use the texture cache first, +and call a new common copyVideoTextureToPlatformTexture(Platform3DObject) with the result. + +The new copyImageToPlatformTexture() will pull planar YUV frames into two textures, and combine +the two with a color transfer function when drawing to the output texture. + +* platform/graphics/GraphicsContext3D.h: +* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: +(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): +* platform/graphics/cocoa/GraphicsContext3DCocoa.mm: +(WebCore::GraphicsContext3D::texImageIOSurface2D): +* platform/graphics/cocoa/WebCoreDecompressionSession.
[webkit-changes] [223285] trunk/Source/WebCore
Title: [223285] trunk/Source/WebCore Revision 223285 Author jer.no...@apple.com Date 2017-10-13 10:30:36 -0700 (Fri, 13 Oct 2017) Log Message Unreviewed build fix; add UNUSED_PARAM macros. * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: (WebCore::GraphicsContext3D::texImageIOSurface2D): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm Diff Modified: trunk/Source/WebCore/ChangeLog (223284 => 223285) --- trunk/Source/WebCore/ChangeLog 2017-10-13 17:19:06 UTC (rev 223284) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 17:30:36 UTC (rev 223285) @@ -1,5 +1,12 @@ 2017-10-13 Jer Noble +Unreviewed build fix; add UNUSED_PARAM macros. + +* platform/graphics/cocoa/GraphicsContext3DCocoa.mm: +(WebCore::GraphicsContext3D::texImageIOSurface2D): + +2017-10-13 Jer Noble + Performance: do pixel conformance and texturing in a single step. https://bugs.webkit.org/show_bug.cgi?id=178219 Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm (223284 => 223285) --- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm 2017-10-13 17:19:06 UTC (rev 223284) +++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm 2017-10-13 17:30:36 UTC (rev 223285) @@ -680,6 +680,14 @@ #elif PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR) return [platformGraphicsContext3D() texImageIOSurface:surface target:target internalFormat:internalFormat width:width height:height format:format type:type plane:plane]; #else +UNUSED_PARAM(target); +UNUSED_PARAM(internalFormat); +UNUSED_PARAM(width); +UNUSED_PARAM(height); +UNUSED_PARAM(format); +UNUSED_PARAM(type); +UNUSED_PARAM(surface); +UNUSED_PARAM(plane); return false; #endif } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223287] trunk/Source/WebCore
Title: [223287] trunk/Source/WebCore Revision 223287 Author jer.no...@apple.com Date 2017-10-13 10:41:21 -0700 (Fri, 13 Oct 2017) Log Message Unreviewed build fix; add soft link macros for newly called CoreVideo methods. * platform/cocoa/CoreVideoSoftLink.cpp: * platform/cocoa/CoreVideoSoftLink.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h Diff Modified: trunk/Source/WebCore/ChangeLog (223286 => 223287) --- trunk/Source/WebCore/ChangeLog 2017-10-13 17:30:50 UTC (rev 223286) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 17:41:21 UTC (rev 223287) @@ -1,5 +1,12 @@ 2017-10-13 Jer Noble +Unreviewed build fix; add soft link macros for newly called CoreVideo methods. + +* platform/cocoa/CoreVideoSoftLink.cpp: +* platform/cocoa/CoreVideoSoftLink.h: + +2017-10-13 Jer Noble + Unreviewed build fix; add UNUSED_PARAM macros. * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: Modified: trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp (223286 => 223287) --- trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp 2017-10-13 17:30:50 UTC (rev 223286) +++ trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp 2017-10-13 17:41:21 UTC (rev 223287) @@ -30,6 +30,7 @@ SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, CoreVideo) +SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetTypeID, CFTypeID, (), ()) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetWidth, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetHeight, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer)) @@ -42,6 +43,7 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferUnlockBaseAddress, CVReturn, (CVPixelBufferRef pixelBuffer, CVOptionFlags lockFlags), (pixelBuffer, lockFlags)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferPoolCreate, CVReturn,(CFAllocatorRef allocator, CFDictionaryRef poolAttributes, CFDictionaryRef pixelBufferAttributes, CVPixelBufferPoolRef* poolOut), (allocator, poolAttributes, pixelBufferAttributes, poolOut)) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferPoolCreatePixelBuffer, CVReturn, (CFAllocatorRef allocator, CVPixelBufferPoolRef pixelBufferPool, CVPixelBufferRef* pixelBufferOut), (allocator, pixelBufferPool, pixelBufferOut)) +SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferGetIOSurface, IOSurfaceRef, (CVPixelBufferRef pixelBuffer), (pixelBuffer)) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVPixelBufferPixelFormatTypeKey, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVPixelBufferCGBitmapContextCompatibilityKey, CFStringRef) SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVPixelBufferCGImageCompatibilityKey, CFStringRef) Modified: trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h (223286 => 223287) --- trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h 2017-10-13 17:30:50 UTC (rev 223286) +++ trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h 2017-10-13 17:41:21 UTC (rev 223287) @@ -31,6 +31,8 @@ SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, CoreVideo) +SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode)) +#define CVBufferGetAttachment softLink_CoreVideo_CVBufferGetAttachment SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetTypeID, CFTypeID, (), ()) #define CVPixelBufferGetTypeID softLink_CoreVideo_CVPixelBufferGetTypeID SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetWidth, size_t, (CVPixelBufferRef pixelBuffer), (pixelBuffer)) @@ -55,6 +57,8 @@ #define CVPixelBufferPoolCreate softLink_CoreVideo_CVPixelBufferPoolCreate SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferPoolCreatePixelBuffer, CVReturn, (CFAllocatorRef allocator, CVPixelBufferPoolRef pixelBufferPool, CVPixelBufferRef* pixelBufferOut), (allocator, pixelBufferPool, pixelBufferOut)) #define CVPixelBufferPoolCreatePixelBuffer softLink_CoreVideo_CVPixelBufferPoolCreatePixelBuffer +SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferGetIOSurface, IOSurfaceRef, (CVPixelBufferRef pixelBuffer), (pixelBuffer)) +#define CVPixelBufferGetIOSurface softLink_CoreVideo_CVPixelBufferGetIOSurface SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVPixelBufferPixelFormatTypeKey, CFStringRef) #define kCVPixelBufferPixelFormatTypeKey get_CoreVideo_kCVPixelBufferPixelFormatTypeKey() ___ webkit-changes mailing list webki
[webkit-changes] [223289] trunk/Source/WebCore
Title: [223289] trunk/Source/WebCore Revision 223289 Author jer.no...@apple.com Date 2017-10-13 11:16:20 -0700 (Fri, 13 Oct 2017) Log Message Unreviewed build fix; forward declare the type of IOSurfaceRef. * platform/cocoa/CoreVideoSoftLink.cpp: * platform/cocoa/CoreVideoSoftLink.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h Diff Modified: trunk/Source/WebCore/ChangeLog (223288 => 223289) --- trunk/Source/WebCore/ChangeLog 2017-10-13 18:03:48 UTC (rev 223288) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 18:16:20 UTC (rev 223289) @@ -1,5 +1,12 @@ 2017-10-13 Jer Noble +Unreviewed build fix; forward declare the type of IOSurfaceRef. + +* platform/cocoa/CoreVideoSoftLink.cpp: +* platform/cocoa/CoreVideoSoftLink.h: + +2017-10-13 Jer Noble + Unreviewed build fix; add soft link macros for newly called CoreVideo methods. * platform/cocoa/CoreVideoSoftLink.cpp: Modified: trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp (223288 => 223289) --- trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp 2017-10-13 18:03:48 UTC (rev 223288) +++ trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp 2017-10-13 18:16:20 UTC (rev 223289) @@ -28,6 +28,8 @@ #include #include +typedef struct __IOSurface* IOSurfaceRef; + SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, CoreVideo) SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode)) Modified: trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h (223288 => 223289) --- trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h 2017-10-13 18:03:48 UTC (rev 223288) +++ trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h 2017-10-13 18:16:20 UTC (rev 223289) @@ -29,6 +29,8 @@ #include #include +typedef struct __IOSurface* IOSurfaceRef; + SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, CoreVideo) SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVBufferGetAttachment, CFTypeRef, (CVBufferRef buffer, CFStringRef key, CVAttachmentMode* attachmentMode), (buffer, key, attachmentMode)) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223294] trunk/Source/WebCore
Title: [223294] trunk/Source/WebCore Revision 223294 Author jer.no...@apple.com Date 2017-10-13 11:48:36 -0700 (Fri, 13 Oct 2017) Log Message Unreviewed build fix; add definitions for IOSurface methods missing on some platforms. Source/WebCore: * platform/graphics/cv/VideoTextureCopierCV.cpp: Source/WebCore/PAL: * pal/spi/cocoa/IOSurfaceSPI.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/PAL/ChangeLog trunk/Source/WebCore/PAL/pal/spi/cocoa/IOSurfaceSPI.h trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (223293 => 223294) --- trunk/Source/WebCore/ChangeLog 2017-10-13 18:43:55 UTC (rev 223293) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 18:48:36 UTC (rev 223294) @@ -1,3 +1,9 @@ +2017-10-13 Jer Noble + +Unreviewed build fix; add definitions for IOSurface methods missing on some platforms. + +* platform/graphics/cv/VideoTextureCopierCV.cpp: + 2017-10-13 Alex Christensen Remove Editor::simplifyMarkup Modified: trunk/Source/WebCore/PAL/ChangeLog (223293 => 223294) --- trunk/Source/WebCore/PAL/ChangeLog 2017-10-13 18:43:55 UTC (rev 223293) +++ trunk/Source/WebCore/PAL/ChangeLog 2017-10-13 18:48:36 UTC (rev 223294) @@ -1,3 +1,9 @@ +2017-10-13 Jer Noble + +Unreviewed build fix; add definitions for IOSurface methods missing on some platforms. + +* pal/spi/cocoa/IOSurfaceSPI.h: + 2017-10-12 Myles C. Maxfield [Win] Build fix after r223206 Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/IOSurfaceSPI.h (223293 => 223294) --- trunk/Source/WebCore/PAL/pal/spi/cocoa/IOSurfaceSPI.h 2017-10-13 18:43:55 UTC (rev 223293) +++ trunk/Source/WebCore/PAL/pal/spi/cocoa/IOSurfaceSPI.h 2017-10-13 18:48:36 UTC (rev 223294) @@ -80,6 +80,8 @@ IOReturn IOSurfaceLock(IOSurfaceRef buffer, uint32_t options, uint32_t *seed); IOSurfaceRef IOSurfaceLookupFromMachPort(mach_port_t); IOReturn IOSurfaceUnlock(IOSurfaceRef buffer, uint32_t options, uint32_t *seed); +size_t IOSurfaceGetWidthOfPlane(IOSurfaceRef buffer, size_t planeIndex); +size_t IOSurfaceGetHeightOfPlane(IOSurfaceRef buffer, size_t planeIndex); WTF_EXTERN_C_END Modified: trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp (223293 => 223294) --- trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 18:43:55 UTC (rev 223293) +++ trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 18:48:36 UTC (rev 223294) @@ -27,6 +27,7 @@ #include "VideoTextureCopierCV.h" #include "FourCC.h" +#include "IOSurfaceSPI.h" #include "Logging.h" #include "TextureCacheCV.h" #include ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223295] trunk/Source/WebCore
Title: [223295] trunk/Source/WebCore Revision 223295 Author jer.no...@apple.com Date 2017-10-13 11:55:39 -0700 (Fri, 13 Oct 2017) Log Message Unreviewed build fix for the previous build fix; use the right PAL path for IOSurfaceSPI.h. * platform/graphics/cv/VideoTextureCopierCV.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (223294 => 223295) --- trunk/Source/WebCore/ChangeLog 2017-10-13 18:48:36 UTC (rev 223294) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 18:55:39 UTC (rev 223295) @@ -1,5 +1,11 @@ 2017-10-13 Jer Noble +Unreviewed build fix for the previous build fix; use the right PAL path for IOSurfaceSPI.h. + +* platform/graphics/cv/VideoTextureCopierCV.cpp: + +2017-10-13 Jer Noble + Unreviewed build fix; add definitions for IOSurface methods missing on some platforms. * platform/graphics/cv/VideoTextureCopierCV.cpp: Modified: trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp (223294 => 223295) --- trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 18:48:36 UTC (rev 223294) +++ trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 18:55:39 UTC (rev 223295) @@ -27,9 +27,9 @@ #include "VideoTextureCopierCV.h" #include "FourCC.h" -#include "IOSurfaceSPI.h" #include "Logging.h" #include "TextureCacheCV.h" +#include #include #include ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223297] trunk/Source/WebCore
Title: [223297] trunk/Source/WebCore Revision 223297 Author jer.no...@apple.com Date 2017-10-13 12:55:47 -0700 (Fri, 13 Oct 2017) Log Message One last unreviewed build fix; since the IOSurface APIs don't exist at all on the simulator, just wrap the entirety of the implementation of copyImageToPlatformTexture() in a #if USE(IOSURFACE) check. * platform/graphics/cv/VideoTextureCopierCV.cpp: (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (223296 => 223297) --- trunk/Source/WebCore/ChangeLog 2017-10-13 19:04:24 UTC (rev 223296) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 19:55:47 UTC (rev 223297) @@ -1,5 +1,14 @@ 2017-10-13 Jer Noble +One last unreviewed build fix; since the IOSurface APIs don't exist at +all on the simulator, just wrap the entirety of the implementation of +copyImageToPlatformTexture() in a #if USE(IOSURFACE) check. + +* platform/graphics/cv/VideoTextureCopierCV.cpp: +(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture): + +2017-10-13 Jer Noble + Unreviewed build fix for the previous build fix; use the right PAL path for IOSurfaceSPI.h. * platform/graphics/cv/VideoTextureCopierCV.cpp: Modified: trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp (223296 => 223297) --- trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 19:04:24 UTC (rev 223296) +++ trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 19:55:47 UTC (rev 223297) @@ -502,6 +502,7 @@ if (auto texture = m_textureCache->textureFromImage(image, outputTarget, level, internalFormat, format, type)) return copyVideoTextureToPlatformTexture(texture.get(), width, height, outputTexture, outputTarget, level, internalFormat, format, type, premultiplyAlpha, flipY); +#if USE(IOSURFACE) // FIXME: This currently only supports '420v' and '420f' pixel formats. Investigate supporting more pixel formats. OSType pixelFormat = CVPixelBufferGetPixelFormatType(image); if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) { @@ -604,6 +605,9 @@ m_context->bindTexture(videoTextureTarget, 0); return true; +#else +return false; +#endif // USE(IOSURFACE) } bool VideoTextureCopierCV::copyVideoTextureToPlatformTexture(TextureType inputVideoTexture, size_t width, size_t height, Platform3DObject outputTexture, GC3Denum outputTarget, GC3Dint level, GC3Denum internalFormat, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool flipY) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223298] trunk/Source/WebCore
Title: [223298] trunk/Source/WebCore Revision 223298 Author jer.no...@apple.com Date 2017-10-13 13:24:28 -0700 (Fri, 13 Oct 2017) Log Message Unreviewed build fix; wrap more functions in USE(IOSURFACE) so that they do not generate "unused function" errors. * platform/graphics/cv/VideoTextureCopierCV.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (223297 => 223298) --- trunk/Source/WebCore/ChangeLog 2017-10-13 19:55:47 UTC (rev 223297) +++ trunk/Source/WebCore/ChangeLog 2017-10-13 20:24:28 UTC (rev 223298) @@ -1,5 +1,12 @@ 2017-10-13 Jer Noble +Unreviewed build fix; wrap more functions in USE(IOSURFACE) so that +they do not generate "unused function" errors. + +* platform/graphics/cv/VideoTextureCopierCV.cpp: + +2017-10-13 Jer Noble + One last unreviewed build fix; since the IOSurface APIs don't exist at all on the simulator, just wrap the entirety of the implementation of copyImageToPlatformTexture() in a #if USE(IOSURFACE) check. Modified: trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp (223297 => 223298) --- trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 19:55:47 UTC (rev 223297) +++ trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-13 20:24:28 UTC (rev 223298) @@ -41,6 +41,7 @@ namespace WebCore { +#if USE(IOSURFACE) enum class PixelRange { Unknown, Video, @@ -158,6 +159,7 @@ ASSERT(iterator != matrices.get().end()); return iterator->second; } +#endif // USE(IOSURFACE) VideoTextureCopierCV::VideoTextureCopierCV(GraphicsContext3D& context) : m_context(context) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223315] trunk/Source
Title: [223315] trunk/Source Revision 223315 Author jer.no...@apple.com Date 2017-10-13 19:38:09 -0700 (Fri, 13 Oct 2017) Log Message Performance: Skip texture upload if source image and destination texture haven't changed https://bugs.webkit.org/show_bug.cgi?id=178254 Reviewed by Dean Jackson. Source/WebCore: Update GraphicsContext3D to track which texture is bound to which texture unit, and also to track when those bound textures have their backing stores modified. This new "seed" value will be used to determine whether a given texture which has previously had image data uploaded to it needs to be re-updated. In VideoTextureCopierCV, track whether the texture's seed changed, whether the IOSurface is the same, whether the IOSurface's seed has changed, and whether the "flipY" parameter changed since the last time the copier was asked to upload to the texture. * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::textureSeed): (WebCore::GraphicsContext3D::GraphicsContext3DState::currentBoundTexture): (WebCore::GraphicsContext3D::GraphicsContext3DState::boundTexture): (WebCore::GraphicsContext3D::GraphicsContext3DState::setBoundTexture): * platform/graphics/cv/VideoTextureCopierCV.cpp: (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture): * platform/graphics/cv/VideoTextureCopierCV.h: (WebCore::VideoTextureCopierCV::lastTextureSeed): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::prepareTexture): (WebCore::GraphicsContext3D::bindTexture): (WebCore::GraphicsContext3D::texStorage2D): (WebCore::GraphicsContext3D::texStorage3D): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::compressedTexImage2D): (WebCore::GraphicsContext3D::compressedTexSubImage2D): (WebCore::GraphicsContext3D::createTexture): (WebCore::GraphicsContext3D::deleteTexture): (WebCore::GraphicsContext3D::texImage2DDirect): Source/WTF: Add a new class, UnsafePointer, for safely holding pointers to objects with uncontrolled lifetimes. * WTF.xcodeproj/project.pbxproj: * wtf/UnsafePointer.h: Added. (WTF::UnsafePointer::UnsafePointer): (WTF::UnsafePointer::operator== const): (WTF::UnsafePointer::operator!= const): (WTF::UnsafePointer::operator bool const): (WTF::operator==): (WTF::operator!=): Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/WTF.xcodeproj/project.pbxproj trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.h trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp Added Paths trunk/Source/WTF/wtf/UnsafePointer.h Diff Modified: trunk/Source/WTF/ChangeLog (223314 => 223315) --- trunk/Source/WTF/ChangeLog 2017-10-14 00:50:39 UTC (rev 223314) +++ trunk/Source/WTF/ChangeLog 2017-10-14 02:38:09 UTC (rev 223315) @@ -1,3 +1,22 @@ +2017-10-13 Jer Noble + +Performance: Skip texture upload if source image and destination texture haven't changed +https://bugs.webkit.org/show_bug.cgi?id=178254 + + +Reviewed by Dean Jackson. + +Add a new class, UnsafePointer, for safely holding pointers to objects with uncontrolled lifetimes. + +* WTF.xcodeproj/project.pbxproj: +* wtf/UnsafePointer.h: Added. +(WTF::UnsafePointer::UnsafePointer): +(WTF::UnsafePointer::operator== const): +(WTF::UnsafePointer::operator!= const): +(WTF::UnsafePointer::operator bool const): +(WTF::operator==): +(WTF::operator!=): + 2017-10-13 Per Arne Vollan [Win] When built with VS2017, MiniBrowser crashes on startup. Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (223314 => 223315) --- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-10-14 00:50:39 UTC (rev 223314) +++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2017-10-14 02:38:09 UTC (rev 223315) @@ -562,6 +562,7 @@ CD5497AA15857D0300B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTime.cpp; sourceTree = ""; }; CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = ""; }; CD6D9FCD1EEF3AD4008B0671 /* Algorithms.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Algorithms.h; sourceTree = ""; }; + CD7600FF1F90A3CA00026E26 /* UnsafePointer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UnsafePointer.h; sourceTree = ""; }; CE46516D19DB1FB4003ECA05 /* NSMapTableSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSMapTableSPI.h; sourceTree = "&
[webkit-changes] [223452] trunk/Source/WebCore
Title: [223452] trunk/Source/WebCore Revision 223452 Author jer.no...@apple.com Date 2017-10-16 17:35:12 -0700 (Mon, 16 Oct 2017) Log Message ImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB worth. https://bugs.webkit.org/show_bug.cgi?id=178360 Reviewed by Eric Carlson. AVSampleBufferGenerator has a constrained memory pool of about 32MB in size. Once CMSampleBuffers representing about 32MB of memory are allocated, no more can be created until previously created ones are released. So rather than (only) creating the sample buffers up front in readSampleMetadata(), also create them dynamically, if missing, in createFrameImageAtIndex(...) and release them in storeSampleBuffer(...) after they have been decoded. Drive-by fix: the expected content length was never actually set by the owner of ImageDecoderAVFObjC. Now that the expected content length is available, we don't have to wait until the data is complete to respond to requests. * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::ensureDecoderAvailable): * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h: * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (SOFT_LINK_POINTER_OPTIONAL): (-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]): (-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]): (-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): (WebCore::imageDecoderAssetOptions): (WebCore::ImageDecoderAVFObjC::firstEnabledTrack): (WebCore::ImageDecoderAVFObjC::storeSampleBuffer): (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): (WebCore::ImageDecoderAVFObjC::setExpectedContentSize): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/ImageSource.cpp trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (223451 => 223452) --- trunk/Source/WebCore/ChangeLog 2017-10-17 00:30:24 UTC (rev 223451) +++ trunk/Source/WebCore/ChangeLog 2017-10-17 00:35:12 UTC (rev 223452) @@ -1,3 +1,35 @@ +2017-10-16 Jer Noble + +ImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB worth. +https://bugs.webkit.org/show_bug.cgi?id=178360 + +Reviewed by Eric Carlson. + +AVSampleBufferGenerator has a constrained memory pool of about 32MB in size. Once +CMSampleBuffers representing about 32MB of memory are allocated, no more can be created +until previously created ones are released. So rather than (only) creating the sample +buffers up front in readSampleMetadata(), also create them dynamically, if missing, in +createFrameImageAtIndex(...) and release them in storeSampleBuffer(...) after they have been +decoded. + +Drive-by fix: the expected content length was never actually set by the owner of ImageDecoderAVFObjC. +Now that the expected content length is available, we don't have to wait until the data is complete +to respond to requests. + +* platform/graphics/ImageSource.cpp: +(WebCore::ImageSource::ensureDecoderAvailable): +* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h: +* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: +(SOFT_LINK_POINTER_OPTIONAL): +(-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]): +(-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]): +(-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): +(WebCore::imageDecoderAssetOptions): +(WebCore::ImageDecoderAVFObjC::firstEnabledTrack): +(WebCore::ImageDecoderAVFObjC::storeSampleBuffer): +(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): +(WebCore::ImageDecoderAVFObjC::setExpectedContentSize): + 2017-10-12 Matt Rajca Add API support for quirk that lets an arbitrary click allow auto-play. Modified: trunk/Source/WebCore/platform/graphics/ImageSource.cpp (223451 => 223452) --- trunk/Source/WebCore/platform/graphics/ImageSource.cpp 2017-10-17 00:30:24 UTC (rev 223451) +++ trunk/Source/WebCore/platform/graphics/ImageSource.cpp 2017-10-17 00:35:12 UTC (rev 223452) @@ -79,6 +79,9 @@ if (!isDecoderAvailable()) return false; +if (auto expectedContentLength = m_frameCache->expectedContentLength()) +m_decoder->setExpectedContentSize(expectedContentLength); + m_frameCache->setDecoder(m_decoder.get()); return true; } Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h (223451 => 223452) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h 2017-10-17 00:30:24 UTC (rev 223451) +++ trunk/Source/WebCore/pl
[webkit-changes] [223560] trunk/Source/WebCore
Title: [223560] trunk/Source/WebCore Revision 223560 Author jer.no...@apple.com Date 2017-10-17 11:33:21 -0700 (Tue, 17 Oct 2017) Log Message Leak of one AVSampleCursor inside ImageDecoderAVFObjC::createFrameImageAtIndex() https://bugs.webkit.org/show_bug.cgi?id=178397 Reviewed by Eric Carlson. Explicitly wrap the return value of -copy in a RetainPtr. * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (223559 => 223560) --- trunk/Source/WebCore/ChangeLog 2017-10-17 18:30:31 UTC (rev 223559) +++ trunk/Source/WebCore/ChangeLog 2017-10-17 18:33:21 UTC (rev 223560) @@ -1,3 +1,15 @@ +2017-10-17 Jer Noble + +Leak of one AVSampleCursor inside ImageDecoderAVFObjC::createFrameImageAtIndex() +https://bugs.webkit.org/show_bug.cgi?id=178397 + +Reviewed by Eric Carlson. + +Explicitly wrap the return value of -copy in a RetainPtr. + +* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: +(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): + 2017-10-17 Youenn Fablet Cache API implementation should be able to compute storage size for WebKit client applications. Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm (223559 => 223560) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm 2017-10-17 18:30:31 UTC (rev 223559) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm 2017-10-17 18:33:21 UTC (rev 223560) @@ -571,7 +571,7 @@ auto frameCursor = [m_track makeSampleCursorWithPresentationTimeStamp:PAL::toCMTime(sampleData.presentationTime)]; if ([frameCursor comparePositionInDecodeOrderWithPositionOfCursor:m_cursor.get()] == NSOrderedAscending) { // Rewind cursor to the last sync sample to begin decoding -m_cursor = [frameCursor copy]; +m_cursor = adoptNS([frameCursor copy]); do { if ([m_cursor currentSampleSyncInfo].sampleIsFullSync) break; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223564] trunk/Source/WebCore
Title: [223564] trunk/Source/WebCore Revision 223564 Author jer.no...@apple.com Date 2017-10-17 11:53:52 -0700 (Tue, 17 Oct 2017) Log Message Corrupted image after looping movie-backed . https://bugs.webkit.org/show_bug.cgi?id=178398 Reviewed by Eric Carlson. Use the decode-order sample cursor rather than the destination sample cursor when generating the CMSampleBuffer to decode. * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (223563 => 223564) --- trunk/Source/WebCore/ChangeLog 2017-10-17 18:49:11 UTC (rev 223563) +++ trunk/Source/WebCore/ChangeLog 2017-10-17 18:53:52 UTC (rev 223564) @@ -1,3 +1,16 @@ +2017-10-17 Jer Noble + +Corrupted image after looping movie-backed . +https://bugs.webkit.org/show_bug.cgi?id=178398 + +Reviewed by Eric Carlson. + +Use the decode-order sample cursor rather than the destination sample cursor when generating +the CMSampleBuffer to decode. + +* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: +(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): + 2017-10-17 Ryan Haddad Unreviewed, rolling out r223459. Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm (223563 => 223564) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm 2017-10-17 18:49:11 UTC (rev 223563) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm 2017-10-17 18:53:52 UTC (rev 223564) @@ -589,29 +589,29 @@ auto presentationTime = PAL::toMediaTime(m_cursor.get().presentationTimeStamp); auto indexIter = m_presentationTimeToIndex.find(presentationTime); -advanceCursor(); if (indexIter == m_presentationTimeToIndex.end()) -return nullptr; +break; auto& cursorSampleData = m_sampleData[indexIter->second]; if (!cursorSampleData.sample) { -auto request = adoptNS([allocAVSampleBufferRequestInstance() initWithStartCursor:frameCursor]); +auto request = adoptNS([allocAVSampleBufferRequestInstance() initWithStartCursor:m_cursor.get()]); cursorSampleData.sample = adoptCF([m_generator createSampleBufferForRequest:request.get()]); } if (!cursorSampleData.sample) -return nullptr; +break; if (!storeSampleBuffer(cursorSampleData.sample.get())) -return nullptr; +break; +advanceCursor(); if (sampleData.image) return sampleData.image; } -ASSERT_NOT_REACHED(); +advanceCursor(); return nullptr; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [223960] trunk/Source/WebCore
Title: [223960] trunk/Source/WebCore Revision 223960 Author jer.no...@apple.com Date 2017-10-25 10:39:47 -0700 (Wed, 25 Oct 2017) Log Message Autoplay muted videos still stop playback of other streaming apps in the background https://bugs.webkit.org/show_bug.cgi?id=177920 Reviewed by Eric Carlson. When creating a new or element, the global AudioSession can sometimes have its sessionCategory() set to "MediaPlayback", even if the element does not yet have a source. This is because the constructor for the MediaElementSession is called before m_isPlayingToWirelessTarget is initialized, and so in the MediaElementSession constructor, the media element's m_isPlayingToWirelessTarget ivar is sometimes (uninitialized) true. We could move the MediaElementSession ivar to the very end of the header, so it's initialized last, but that still leaves the possibility of the MediaElementSession et. all calling into the HTMLMediaElement before it's subclass's constructors have a chance to initialize their own ivars (much less their vtables). So instead, we'll create and set the MediaElementSession in a finishInitialization() method called from the HTMLVideoElement and HTMLAudioElement's create() factory methods. * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::create): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::finishInitialization): * html/HTMLMediaElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::create): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLAudioElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.h trunk/Source/WebCore/html/HTMLVideoElement.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (223959 => 223960) --- trunk/Source/WebCore/ChangeLog 2017-10-25 17:27:24 UTC (rev 223959) +++ trunk/Source/WebCore/ChangeLog 2017-10-25 17:39:47 UTC (rev 223960) @@ -1,3 +1,32 @@ +2017-10-25 Jer Noble + +Autoplay muted videos still stop playback of other streaming apps in the background +https://bugs.webkit.org/show_bug.cgi?id=177920 + +Reviewed by Eric Carlson. + +When creating a new or element, the global AudioSession can sometimes have +its sessionCategory() set to "MediaPlayback", even if the element does not yet have a +source. This is because the constructor for the MediaElementSession is called before +m_isPlayingToWirelessTarget is initialized, and so in the MediaElementSession constructor, +the media element's m_isPlayingToWirelessTarget ivar is sometimes (uninitialized) true. + +We could move the MediaElementSession ivar to the very end of the header, so it's +initialized last, but that still leaves the possibility of the MediaElementSession et. all +calling into the HTMLMediaElement before it's subclass's constructors have a chance to +initialize their own ivars (much less their vtables). So instead, we'll create and set the +MediaElementSession in a finishInitialization() method called from the HTMLVideoElement and +HTMLAudioElement's create() factory methods. + +* html/HTMLAudioElement.cpp: +(WebCore::HTMLAudioElement::create): +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::HTMLMediaElement): +(WebCore::HTMLMediaElement::finishInitialization): +* html/HTMLMediaElement.h: +* html/HTMLVideoElement.cpp: +(WebCore::HTMLVideoElement::create): + 2017-10-25 Javier Fernandez [css-grid] Avoid clearing the overrideContainingBlockWidth if possible Modified: trunk/Source/WebCore/html/HTMLAudioElement.cpp (223959 => 223960) --- trunk/Source/WebCore/html/HTMLAudioElement.cpp 2017-10-25 17:27:24 UTC (rev 223959) +++ trunk/Source/WebCore/html/HTMLAudioElement.cpp 2017-10-25 17:39:47 UTC (rev 223960) @@ -44,6 +44,7 @@ Ref HTMLAudioElement::create(const QualifiedName& tagName, Document& document, bool createdByParser) { auto element = adoptRef(*new HTMLAudioElement(tagName, document, createdByParser)); +element->finishInitialization(); element->suspendIfNeeded(); return element; } Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (223959 => 223960) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-10-25 17:27:24 UTC (rev 223959) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-10-25 17:39:47 UTC (rev 223960) @@ -457,7 +457,6 @@ , m_haveVisibleTextTrack(false) , m_processingPreferenceChange(false) #endif -, m_mediaSession(std::make_unique(*this)) #if !RELEASE_LOG_DISABLED , m_logger(&document.logger()) , m_logIdentifier(nextLogIdentifier()) @@ -468,7 +467,12 @@ ALWAYS_LOG(LOGIDENTIFIER); setHasCustomStyleResolveCallbacks(); +} +void HTMLM
[webkit-changes] [209394] trunk/Source/WebCore
Title: [209394] trunk/Source/WebCore Revision 209394 Author jer.no...@apple.com Date 2016-12-06 08:40:56 -0800 (Tue, 06 Dec 2016) Log Message [pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key. https://bugs.webkit.org/show_bug.cgi?id=165377 Reviewed by Darin Adler. Introduce the concept of "force cursor to become visible" when requesting the pointer be unlocked. ESC events will cause the pointer to become visible, while normal key events will not. * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerUnlock): (WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible): (WebCore::PointerLockController::documentDetached): (WebCore::PointerLockController::didLosePointerLock): * page/PointerLockController.h: Drive-by fix: apply Darin's feedback to existing functions: * dom/Document.cpp: (WebCore::Document::prepareForDestruction): * dom/Element.cpp: (WebCore::Element::removedFrom): * page/PointerLockController.cpp: (WebCore::PointerLockController::elementRemoved): (WebCore::PointerLockController::documentDetached): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Document.cpp trunk/Source/WebCore/dom/Element.cpp trunk/Source/WebCore/page/EventHandler.cpp trunk/Source/WebCore/page/PointerLockController.cpp trunk/Source/WebCore/page/PointerLockController.h Diff Modified: trunk/Source/WebCore/ChangeLog (209393 => 209394) --- trunk/Source/WebCore/ChangeLog 2016-12-06 15:55:07 UTC (rev 209393) +++ trunk/Source/WebCore/ChangeLog 2016-12-06 16:40:56 UTC (rev 209394) @@ -1,3 +1,34 @@ +2016-12-05 Jer Noble + +[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key. +https://bugs.webkit.org/show_bug.cgi?id=165377 + +Reviewed by Darin Adler. + +Introduce the concept of "force cursor to become visible" when requesting the pointer be +unlocked. ESC events will cause the pointer to become visible, while normal key events +will not. + +* page/EventHandler.cpp: +(WebCore::EventHandler::keyEvent): +* page/PointerLockController.cpp: +(WebCore::PointerLockController::requestPointerUnlock): +(WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible): +(WebCore::PointerLockController::documentDetached): +(WebCore::PointerLockController::didLosePointerLock): +* page/PointerLockController.h: + +Drive-by fix: apply Darin's feedback to existing functions: + +* dom/Document.cpp: +(WebCore::Document::prepareForDestruction): +* dom/Element.cpp: +(WebCore::Element::removedFrom): +* page/PointerLockController.cpp: +(WebCore::PointerLockController::elementRemoved): +(WebCore::PointerLockController::documentDetached): + + 2016-12-06 Sam Weinig [WebIDL] Add support for converting dictionaries to JS Modified: trunk/Source/WebCore/dom/Document.cpp (209393 => 209394) --- trunk/Source/WebCore/dom/Document.cpp 2016-12-06 15:55:07 UTC (rev 209393) +++ trunk/Source/WebCore/dom/Document.cpp 2016-12-06 16:40:56 UTC (rev 209394) @@ -2284,7 +2284,7 @@ #if ENABLE(POINTER_LOCK) if (page()) -page()->pointerLockController().documentDetached(this); +page()->pointerLockController().documentDetached(*this); #endif InspectorInstrumentation::documentDetached(*this); Modified: trunk/Source/WebCore/dom/Element.cpp (209393 => 209394) --- trunk/Source/WebCore/dom/Element.cpp 2016-12-06 15:55:07 UTC (rev 209393) +++ trunk/Source/WebCore/dom/Element.cpp 2016-12-06 16:40:56 UTC (rev 209394) @@ -1670,7 +1670,7 @@ #endif #if ENABLE(POINTER_LOCK) if (document().page()) -document().page()->pointerLockController().elementRemoved(this); +document().page()->pointerLockController().elementRemoved(*this); #endif setSavedLayerScrollPosition(ScrollPosition()); Modified: trunk/Source/WebCore/page/EventHandler.cpp (209393 => 209394) --- trunk/Source/WebCore/page/EventHandler.cpp 2016-12-06 15:55:07 UTC (rev 209393) +++ trunk/Source/WebCore/page/EventHandler.cpp 2016-12-06 16:40:56 UTC (rev 209394) @@ -3064,7 +3064,7 @@ #if ENABLE(POINTER_LOCK) if (initialKeyEvent.type() == PlatformEvent::KeyDown && initialKeyEvent.windowsVirtualKeyCode() == VK_ESCAPE && m_frame.page()->pointerLockController().element()) { -m_frame.page()->pointerLockController().requestPointerUnlock(); +m_frame.page()->pointerLockController().requestPointerUnlockAndForceCursorVisible(); return true; } #endif Modified: trunk/Source/WebCore/page/PointerLockController.cpp (209393 => 209394) --- trunk/Source/WebCore/page/PointerLockController.cpp 2016-12-06 15:55:07 UTC (rev 209393) +++ trunk/Source/WebCore/p
[webkit-changes] [209425] trunk
Title: [209425] trunk Revision 209425 Author jer.no...@apple.com Date 2016-12-06 14:48:17 -0800 (Tue, 06 Dec 2016) Log Message YouTube sometimes pauses when switching tabs https://bugs.webkit.org/show_bug.cgi?id=165468 Reviewed by Eric Carlson. Source/WebCore: Test: media/media-session-restrictions.html The bitfield which represents the restrictions for "VideoAudio" media type was unititialized, leading to what was effectively a random set of restrictions at runtime. * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::resetRestrictions): * testing/Internals.cpp: (WebCore::mediaTypeFromString): (WebCore::Internals::setMediaSessionRestrictions): (WebCore::Internals::mediaSessionRestrictions): * testing/Internals.h: * testing/Internals.idl: LayoutTests: * media/media-session-restrictions.html: Added. * platform/ios-simulator/media/media-session-restrictions-expected.txt: Added. * platform/mac/media/media-session-restrictions-expected.txt: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/Internals.h trunk/Source/WebCore/testing/Internals.idl Added Paths trunk/LayoutTests/media/media-session-restrictions.html trunk/LayoutTests/platform/ios-simulator/media/media-session-restrictions-expected.txt trunk/LayoutTests/platform/mac/media/media-session-restrictions-expected.txt Diff Modified: trunk/LayoutTests/ChangeLog (209424 => 209425) --- trunk/LayoutTests/ChangeLog 2016-12-06 22:43:16 UTC (rev 209424) +++ trunk/LayoutTests/ChangeLog 2016-12-06 22:48:17 UTC (rev 209425) @@ -1,3 +1,14 @@ +2016-12-06 Jer Noble + +YouTube sometimes pauses when switching tabs +https://bugs.webkit.org/show_bug.cgi?id=165468 + +Reviewed by Eric Carlson. + +* media/media-session-restrictions.html: Added. +* platform/ios-simulator/media/media-session-restrictions-expected.txt: Added. +* platform/mac/media/media-session-restrictions-expected.txt: Added. + 2016-12-06 Mark Lam Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec. Added: trunk/LayoutTests/media/media-session-restrictions.html (0 => 209425) --- trunk/LayoutTests/media/media-session-restrictions.html (rev 0) +++ trunk/LayoutTests/media/media-session-restrictions.html 2016-12-06 22:48:17 UTC (rev 209425) @@ -0,0 +1,20 @@ + + + +<script> + +if (!window.internals) { +failTest('This test requires window.internals and must be run in DumpRenderTree or WebKitTestRunner.'); +throw ''; +} + +['video','audio','videoaudio','webaudio'].forEach(type => { +consoleWrite(`mediaSessionRestrictions["${type}"] = "${ internals.mediaSessionRestrictions(type) }"`); +}); + +endTest(); + + + + \ No newline at end of file Added: trunk/LayoutTests/platform/ios-simulator/media/media-session-restrictions-expected.txt (0 => 209425) --- trunk/LayoutTests/platform/ios-simulator/media/media-session-restrictions-expected.txt (rev 0) +++ trunk/LayoutTests/platform/ios-simulator/media/media-session-restrictions-expected.txt 2016-12-06 22:48:17 UTC (rev 209425) @@ -0,0 +1,6 @@ +mediaSessionRestrictions["video"] = "backgroundprocessplaybackrestricted,backgroundtabplaybackrestricted" +mediaSessionRestrictions["audio"] = "" +mediaSessionRestrictions["videoaudio"] = "concurrentplaybacknotpermitted,backgroundprocessplaybackrestricted" +mediaSessionRestrictions["webaudio"] = "" +END OF TEST + Added: trunk/LayoutTests/platform/mac/media/media-session-restrictions-expected.txt (0 => 209425) --- trunk/LayoutTests/platform/mac/media/media-session-restrictions-expected.txt (rev 0) +++ trunk/LayoutTests/platform/mac/media/media-session-restrictions-expected.txt 2016-12-06 22:48:17 UTC (rev 209425) @@ -0,0 +1,6 @@ +mediaSessionRestrictions["video"] = "" +mediaSessionRestrictions["audio"] = "" +mediaSessionRestrictions["videoaudio"] = "" +mediaSessionRestrictions["webaudio"] = "" +END OF TEST + Modified: trunk/Source/WebCore/ChangeLog (209424 => 209425) --- trunk/Source/WebCore/ChangeLog 2016-12-06 22:43:16 UTC (rev 209424) +++ trunk/Source/WebCore/ChangeLog 2016-12-06 22:48:17 UTC (rev 209425) @@ -1,3 +1,24 @@ +2016-12-06 Jer Noble + +YouTube sometimes pauses when switching tabs +https://bugs.webkit.org/show_bug.cgi?id=165468 + +Reviewed by Eric Carlson. + +Test: media/media-session-restrictions.html + +The bitfield which represent
[webkit-changes] [209464] trunk/Source/WebCore
Title: [209464] trunk/Source/WebCore Revision 209464 Author jer.no...@apple.com Date 2016-12-07 11:30:45 -0800 (Wed, 07 Dec 2016) Log Message [pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key. https://bugs.webkit.org/show_bug.cgi?id=165377 Reviewed by Eric Carlson. Follow up to previous patch; clear the m_forceCursorVisibleUponUnlock flag upon losing pointer lock, so that subsequent unlocks don't erroneously cause the cursor to become visible. * page/PointerLockController.cpp: (WebCore::PointerLockController::didLosePointerLock): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/PointerLockController.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (209463 => 209464) --- trunk/Source/WebCore/ChangeLog 2016-12-07 19:21:11 UTC (rev 209463) +++ trunk/Source/WebCore/ChangeLog 2016-12-07 19:30:45 UTC (rev 209464) @@ -1,3 +1,17 @@ +2016-12-07 Jer Noble + +[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key. +https://bugs.webkit.org/show_bug.cgi?id=165377 + +Reviewed by Eric Carlson. + +Follow up to previous patch; clear the m_forceCursorVisibleUponUnlock flag upon losing +pointer lock, so that subsequent unlocks don't erroneously cause the cursor to become +visible. + +* page/PointerLockController.cpp: +(WebCore::PointerLockController::didLosePointerLock): + 2016-12-06 Geoffrey Garen performance.now() should truncate to 100us Modified: trunk/Source/WebCore/page/PointerLockController.cpp (209463 => 209464) --- trunk/Source/WebCore/page/PointerLockController.cpp 2016-12-07 19:21:11 UTC (rev 209463) +++ trunk/Source/WebCore/page/PointerLockController.cpp 2016-12-07 19:30:45 UTC (rev 209464) @@ -154,8 +154,10 @@ enqueueEvent(eventNames().pointerlockchangeEvent, m_element ? &m_element->document() : m_documentOfRemovedElementWhileWaitingForUnlock.get()); clearElement(); m_documentOfRemovedElementWhileWaitingForUnlock = nullptr; -if (m_forceCursorVisibleUponUnlock) +if (m_forceCursorVisibleUponUnlock) { +m_forceCursorVisibleUponUnlock = false; m_page.chrome().client().setCursorHiddenUntilMouseMoves(false); +} } void PointerLockController::dispatchLockedMouseEvent(const PlatformMouseEvent& event, const AtomicString& eventType) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [209468] trunk/Source/WebKit2
Title: [209468] trunk/Source/WebKit2 Revision 209468 Author jer.no...@apple.com Date 2016-12-07 12:29:55 -0800 (Wed, 07 Dec 2016) Log Message Exiting Element Fullscreen mode loses focus on WKWebView. https://bugs.webkit.org/show_bug.cgi?id=165512 Reviewed by Eric Carlson. Setting 'window.contentView.hidden = YES' will reset the first-responder (whereas previously setting 'window.contentView.layer.hidden = YES' did not). Grab the first- responder before doing so, so that it can be reset correctly when moving the WKWebView back to it's original window. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (209467 => 209468) --- trunk/Source/WebKit2/ChangeLog 2016-12-07 20:25:22 UTC (rev 209467) +++ trunk/Source/WebKit2/ChangeLog 2016-12-07 20:29:55 UTC (rev 209468) @@ -1,3 +1,18 @@ +2016-12-07 Jer Noble + +Exiting Element Fullscreen mode loses focus on WKWebView. +https://bugs.webkit.org/show_bug.cgi?id=165512 + +Reviewed by Eric Carlson. + +Setting 'window.contentView.hidden = YES' will reset the first-responder (whereas +previously setting 'window.contentView.layer.hidden = YES' did not). Grab the first- +responder before doing so, so that it can be reset correctly when moving the WKWebView +back to it's original window. + +* UIProcess/mac/WKFullScreenWindowController.mm: +(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): + 2016-12-07 Alex Christensen Fix CMake build after r209418. Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (209467 => 209468) --- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2016-12-07 20:25:22 UTC (rev 209467) +++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2016-12-07 20:29:55 UTC (rev 209468) @@ -393,6 +393,8 @@ return; _fullScreenState = NotInFullScreen; +NSResponder *firstResponder = [[self window] firstResponder]; + // Screen updates to be re-enabled in completeFinishExitFullScreenAnimationAfterRepaint. NSDisableScreenUpdates(); _page->setSuppressVisibilityUpdates(true); @@ -402,7 +404,6 @@ [_backgroundView.get().layer removeAllAnimations]; [[_webViewPlaceholder window] setAutodisplay:NO]; -NSResponder *firstResponder = [[self window] firstResponder]; [self _replaceView:_webViewPlaceholder.get() with:_webView]; BEGIN_BLOCK_OBJC_EXCEPTIONS [NSLayoutConstraint activateConstraints:self.savedConstraints]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [209469] trunk/Source/WebCore
Title: [209469] trunk/Source/WebCore Revision 209469 Author jer.no...@apple.com Date 2016-12-07 12:32:39 -0800 (Wed, 07 Dec 2016) Log Message ASSERT crash while running media-source/mediasource-activesourcebuffers.html under Stress GC bot. https://bugs.webkit.org/show_bug.cgi?id=165514 Reviewed by Eric Carlson. If a track associated with MSE is disabled after a SourceBuffer begins parsing a queued append operation, SourceBuffer can get into a state where it asks SourceBufferPrivateAVFObjC if it is ready to accept data for that disabled track. This causes an ASSERT_NOT_REACHED in isReadyForMoreData(). However, this seems to be a valid condition; we can safely just return "false" from isReadyForMoreSamples() (and also bail from notifyClientWhenReadyForMoreSamples()) when asked about a disabled track. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm Diff Modified: trunk/Source/WebCore/ChangeLog (209468 => 209469) --- trunk/Source/WebCore/ChangeLog 2016-12-07 20:29:55 UTC (rev 209468) +++ trunk/Source/WebCore/ChangeLog 2016-12-07 20:32:39 UTC (rev 209469) @@ -1,3 +1,23 @@ +2016-12-07 Jer Noble + +ASSERT crash while running media-source/mediasource-activesourcebuffers.html under Stress GC bot. +https://bugs.webkit.org/show_bug.cgi?id=165514 + +Reviewed by Eric Carlson. + +If a track associated with MSE is disabled after a SourceBuffer begins parsing a queued +append operation, SourceBuffer can get into a state where it asks SourceBufferPrivateAVFObjC +if it is ready to accept data for that disabled track. This causes an ASSERT_NOT_REACHED in +isReadyForMoreData(). + +However, this seems to be a valid condition; we can safely just return "false" from +isReadyForMoreSamples() (and also bail from notifyClientWhenReadyForMoreSamples()) when asked +about a disabled track. + +* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: +(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): +(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): + 2016-12-07 Dave Hyatt [CSS Parser] Eliminate the Scope class and fold it into CSSTokenizer Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (209468 => 209469) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2016-12-07 20:29:55 UTC (rev 209468) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2016-12-07 20:32:39 UTC (rev 209469) @@ -965,8 +965,6 @@ return [m_displayLayer isReadyForMoreMediaData]; else if (m_audioRenderers.contains(trackID)) return [m_audioRenderers.get(trackID) isReadyForMoreMediaData]; -else -ASSERT_NOT_REACHED(); return false; } @@ -1030,8 +1028,7 @@ [m_audioRenderers.get(trackID) requestMediaDataWhenReadyOnQueue:dispatch_get_main_queue() usingBlock:^{ didBecomeReadyForMoreSamples(trackID); }]; -} else -ASSERT_NOT_REACHED(); +} } } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [209730] trunk
Title: [209730] trunk Revision 209730 Author jer.no...@apple.com Date 2016-12-12 15:12:12 -0800 (Mon, 12 Dec 2016) Log Message Remove implementation of legacy Mozilla-based Fullscreen API. https://bugs.webkit.org/show_bug.cgi?id=165689 Source/WebCore: Reviewed by Eric Carlson. Alias the legacy webkitRequestFull_S_creen() function on Element to webkitRequestFull_s_creen(). Remove the custom behavior in Document::requestFullScreenForElement() to handle the legacy path. * dom/Document.cpp: (WebCore::Document::requestFullScreenForElement): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::webkitRequestFullscreen): (WebCore::Element::webkitRequestFullScreen): Deleted. * dom/Element.h: * dom/Element.idl: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreen): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Source/WebKit/mac: Reviewed by Eric Carlson. * DOM/DOMElement.mm: (-[DOMElement webkitRequestFullScreen:]): LayoutTests: Reviewed by Eric Carlson. * fullscreen/full-screen-css-expected.txt: * fullscreen/full-screen-css.html: * fullscreen/full-screen-keyboard-disabled-expected.txt: Removed. * fullscreen/full-screen-keyboard-disabled.html: Removed. * fullscreen/full-screen-twice-expected.txt: * fullscreen/full-screen-twice.html: * js/dom/dom-static-property-for-in-iteration-expected.txt: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fullscreen/full-screen-css-expected.txt trunk/LayoutTests/fullscreen/full-screen-css.html trunk/LayoutTests/fullscreen/full-screen-twice-expected.txt trunk/LayoutTests/fullscreen/full-screen-twice.html trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Document.cpp trunk/Source/WebCore/dom/Document.h trunk/Source/WebCore/dom/Element.cpp trunk/Source/WebCore/dom/Element.h trunk/Source/WebCore/dom/Element.idl trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/shadow/MediaControlElements.cpp trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/DOM/DOMElement.mm Removed Paths trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled-expected.txt trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled.html Diff Modified: trunk/LayoutTests/ChangeLog (209729 => 209730) --- trunk/LayoutTests/ChangeLog 2016-12-12 23:11:29 UTC (rev 209729) +++ trunk/LayoutTests/ChangeLog 2016-12-12 23:12:12 UTC (rev 209730) @@ -1,3 +1,18 @@ +2016-12-12 Jer Noble + +Remove implementation of legacy Mozilla-based Fullscreen API. +https://bugs.webkit.org/show_bug.cgi?id=165689 + +Reviewed by Eric Carlson. + +* fullscreen/full-screen-css-expected.txt: +* fullscreen/full-screen-css.html: +* fullscreen/full-screen-keyboard-disabled-expected.txt: Removed. +* fullscreen/full-screen-keyboard-disabled.html: Removed. +* fullscreen/full-screen-twice-expected.txt: +* fullscreen/full-screen-twice.html: +* js/dom/dom-static-property-for-in-iteration-expected.txt: + 2016-12-12 Manuel Rego Casasnovas [css-grid] Add some test cases that were removed in r209562 Modified: trunk/LayoutTests/fullscreen/full-screen-css-expected.txt (209729 => 209730) --- trunk/LayoutTests/fullscreen/full-screen-css-expected.txt 2016-12-12 23:11:29 UTC (rev 209729) +++ trunk/LayoutTests/fullscreen/full-screen-css-expected.txt 2016-12-12 23:12:12 UTC (rev 209730) @@ -2,14 +2,14 @@ EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color') == 'rgba(0, 0, 0, 0)') OK EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color') == 'rgb(0, 0, 0)') OK EVENT(webkitfullscreenchange) +EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLHtmlElement]') OK +EXPECTED (document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color') == 'rgba(0, 0, 0, 0)') OK +EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color') == 'rgb(0, 255, 0)') OK +EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color') == 'rgb(0, 0, 255)') OK +EVENT(webkitfullscreenchange) EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLSpanElement]') OK EXPECTED (document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color') == 'rgb(0, 255, 0)') OK EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color') == 'rgb(255, 0, 0)') OK EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getProper
[webkit-changes] [209782] trunk
Title: [209782] trunk Revision 209782 Author jer.no...@apple.com Date 2016-12-13 15:37:15 -0800 (Tue, 13 Dec 2016) Log Message Fullscreen in WebKit2 does not restore topContentInset upon exiting; leaves top of page not visible https://bugs.webkit.org/show_bug.cgi?id=165697 Source/WebKit2: Delegate the values of topContentInset() from WebViewImpl (used by WKWebView and WKView) to the WebPageProxy, so that setting the topContentInset() on WebPageProxy is reflected in the getters for the two view classes. Reviewed by Tim Horton. * UIProcess/Cocoa/WebViewImpl.h: (WebKit::WebViewImpl::topContentInset): Deleted. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::updateContentInsetsIfAutomatic): (WebKit::WebViewImpl::topContentInset): (WebKit::WebViewImpl::setTopContentInset): (WebKit::WebViewImpl::dispatchSetTopContentInset): * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController _saveTopContentInset]): Deleted. (-[WKFullScreenWindowController _restoreTopContentInset]): Deleted. Tools: Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKit2Cocoa/FullscreenTopContentInset.mm: (TestWebKitAPI::TEST): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/FullscreenTopContentInset.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (209781 => 209782) --- trunk/Source/WebKit2/ChangeLog 2016-12-13 23:24:47 UTC (rev 209781) +++ trunk/Source/WebKit2/ChangeLog 2016-12-13 23:37:15 UTC (rev 209782) @@ -1,3 +1,28 @@ +2016-12-13 Jer Noble + +Fullscreen in WebKit2 does not restore topContentInset upon exiting; leaves top of page not visible +https://bugs.webkit.org/show_bug.cgi?id=165697 + +Delegate the values of topContentInset() from WebViewImpl (used by WKWebView and WKView) to the +WebPageProxy, so that setting the topContentInset() on WebPageProxy is reflected in the getters +for the two view classes. + +Reviewed by Tim Horton. + +* UIProcess/Cocoa/WebViewImpl.h: +(WebKit::WebViewImpl::topContentInset): Deleted. +* UIProcess/Cocoa/WebViewImpl.mm: +(WebKit::WebViewImpl::updateContentInsetsIfAutomatic): +(WebKit::WebViewImpl::topContentInset): +(WebKit::WebViewImpl::setTopContentInset): +(WebKit::WebViewImpl::dispatchSetTopContentInset): +* UIProcess/mac/WKFullScreenWindowController.mm: +(-[WKFullScreenWindowController enterFullScreen:]): +(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): +(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): +(-[WKFullScreenWindowController _saveTopContentInset]): Deleted. +(-[WKFullScreenWindowController _restoreTopContentInset]): Deleted. + 2016-12-13 Brent Fulgham [Mac][WK2] Tighten Keychain directory access Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (209781 => 209782) --- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h 2016-12-13 23:24:47 UTC (rev 209781) +++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h 2016-12-13 23:37:15 UTC (rev 209782) @@ -170,7 +170,7 @@ bool automaticallyAdjustsContentInsets() const { return m_automaticallyAdjustsContentInsets; } void updateContentInsetsIfAutomatic(); void setTopContentInset(CGFloat); -CGFloat topContentInset() const { return m_topContentInset; } +CGFloat topContentInset() const; void prepareContentInRect(CGRect); void updateViewExposedRect(); @@ -606,7 +606,7 @@ bool m_windowOcclusionDetectionEnabled { true }; bool m_automaticallyAdjustsContentInsets { false }; -CGFloat m_topContentInset { 0 }; +CGFloat m_pendingTopContentInset { 0 }; bool m_didScheduleSetTopContentInset { false }; CGSize m_resizeScrollOffset { 0, 0 }; Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (209781 => 209782) --- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm 2016-12-13 23:24:47 UTC (rev 209781) +++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm 2016-12-13 23:37:15 UTC (rev 209782) @@ -1615,15 +1615,22 @@ if ((window.styleMask & NSWindowStyleMaskFullSizeContentView) && !window.titlebarAppearsTransparent && ![m_view enclosingScrollView]) { NSRect contentLayoutRect = [m_view convertRect:window.contentLayoutRect fromView:nil]; CGFloat newTopContentInset = NSMaxY(contentLayoutRect) - NSHeight(contentLayoutRect); -if (m_topContentInset != newTopContentInset) +if (m_page->topContentInset() != newTopContentInset)
[webkit-changes] [197898] trunk
Title: [197898] trunk Revision 197898 Author jer.no...@apple.com Date 2016-03-09 16:22:12 -0800 (Wed, 09 Mar 2016) Log Message Add heuristic for "main content" videos which override user gesture requirements https://bugs.webkit.org/show_bug.cgi?id=155224 Reviewed by Eric Carlson. Source/WebCore: Tests: media/video-main-content-allow-then-deny.html media/video-main-content-allow.html media/video-main-content-deny-display-none.html media/video-main-content-deny-not-in-dom.html media/video-main-content-deny-not-visible.html media/video-main-content-deny-obscured.html media/video-main-content-deny-too-small.html Add a new behavior "restriction" to MediaElementSession that allows media elements to optionally overriding their own user gesture requirements if the session determines that the media element is the page's "main content". * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didAttachRenderers): (WebCore::HTMLMediaElement::updateShouldPlay): * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::restrictionName): (WebCore::MediaElementSession::MediaElementSession): (WebCore::MediaElementSession::addBehaviorRestriction): (WebCore::MediaElementSession::playbackPermitted): (WebCore::MediaElementSession::dataLoadingPermitted): (WebCore::isMainContent): (WebCore::MediaElementSession::mainContentCheckTimerFired): (WebCore::MediaElementSession::updateIsMainContent): * html/MediaElementSession.h: * testing/Internals.cpp: (WebCore::Internals::setMediaElementRestrictions): LayoutTests: * media/video-main-content-allow-expected.txt: Added. * media/video-main-content-allow-then-deny-expected.txt: Added. * media/video-main-content-allow-then-deny.html: Added. * media/video-main-content-allow.html: Added. * media/video-main-content-deny-display-none-expected.txt: Added. * media/video-main-content-deny-display-none.html: Added. * media/video-main-content-deny-not-in-dom-expected.txt: Added. * media/video-main-content-deny-not-in-dom.html: Added. * media/video-main-content-deny-not-visible-expected.txt: Added. * media/video-main-content-deny-not-visible.html: Added. * media/video-main-content-deny-obscured-expected.txt: Added. * media/video-main-content-deny-obscured.html: Added. * media/video-main-content-deny-too-small-expected.txt: Added. * media/video-main-content-deny-too-small.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.h trunk/Source/WebCore/html/MediaElementSession.cpp trunk/Source/WebCore/html/MediaElementSession.h trunk/Source/WebCore/testing/Internals.cpp Added Paths trunk/LayoutTests/media/video-main-content-allow-expected.txt trunk/LayoutTests/media/video-main-content-allow-then-deny-expected.txt trunk/LayoutTests/media/video-main-content-allow-then-deny.html trunk/LayoutTests/media/video-main-content-allow.html trunk/LayoutTests/media/video-main-content-deny-display-none-expected.txt trunk/LayoutTests/media/video-main-content-deny-display-none.html trunk/LayoutTests/media/video-main-content-deny-not-in-dom-expected.txt trunk/LayoutTests/media/video-main-content-deny-not-in-dom.html trunk/LayoutTests/media/video-main-content-deny-not-visible-expected.txt trunk/LayoutTests/media/video-main-content-deny-not-visible.html trunk/LayoutTests/media/video-main-content-deny-obscured-expected.txt trunk/LayoutTests/media/video-main-content-deny-obscured.html trunk/LayoutTests/media/video-main-content-deny-too-small-expected.txt trunk/LayoutTests/media/video-main-content-deny-too-small.html Diff Modified: trunk/LayoutTests/ChangeLog (197897 => 197898) --- trunk/LayoutTests/ChangeLog 2016-03-10 00:14:07 UTC (rev 197897) +++ trunk/LayoutTests/ChangeLog 2016-03-10 00:22:12 UTC (rev 197898) @@ -1,3 +1,25 @@ +2016-03-09 Jer Noble + +Add heuristic for "main content" videos which override user gesture requirements +https://bugs.webkit.org/show_bug.cgi?id=155224 + +Reviewed by Eric Carlson. + +* media/video-main-content-allow-expected.txt: Added. +* media/video-main-content-allow-then-deny-expected.txt: Added. +* media/video-main-content-allow-then-deny.html: Added. +* media/video-main-content-allow.html: Added. +* media/video-main-content-deny-display-none-expected.txt: Added. +* media/video-main-content-deny-display-none.html: Added. +* media/video-main-content-deny-not-in-dom-expected.txt: Added. +* media/video-main-content-deny-not-in-dom.html: Added. +* media/video-main-content-deny-not-visible-expected.txt: Added. +* media/video-main-content-deny-not-visible.html: Added. +* media/video-main-content-deny-obscured-expected.txt: Added. +* media/video-main-content-deny-obscured.html: Added. +* media/video-main-content-deny-too-s
[webkit-changes] [197938] trunk/Source
Title: [197938] trunk/Source Revision 197938 Author jer.no...@apple.com Date 2016-03-10 08:28:52 -0800 (Thu, 10 Mar 2016) Log Message Enable AVFoundationNSURLSessionEnabled by default https://bugs.webkit.org/show_bug.cgi?id=154469 Reviewed by Sam Weinig. Source/WebCore: * page/Settings.cpp: Source/WebKit/mac: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Source/WebKit2: * Shared/WebPreferencesDefinitions.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/Settings.cpp trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebPreferences.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h Diff Modified: trunk/Source/WebCore/ChangeLog (197937 => 197938) --- trunk/Source/WebCore/ChangeLog 2016-03-10 16:24:14 UTC (rev 197937) +++ trunk/Source/WebCore/ChangeLog 2016-03-10 16:28:52 UTC (rev 197938) @@ -1,3 +1,12 @@ +2016-02-22 Jer Noble + +Enable AVFoundationNSURLSessionEnabled by default +https://bugs.webkit.org/show_bug.cgi?id=154469 + +Reviewed by Sam Weinig. + +* page/Settings.cpp: + 2016-03-10 Frederic Wang [GTK] Add support for WOFF2 Modified: trunk/Source/WebCore/page/Settings.cpp (197937 => 197938) --- trunk/Source/WebCore/page/Settings.cpp 2016-03-10 16:24:14 UTC (rev 197937) +++ trunk/Source/WebCore/page/Settings.cpp 2016-03-10 16:28:52 UTC (rev 197938) @@ -77,7 +77,7 @@ #if USE(AVFOUNDATION) bool Settings::gAVFoundationEnabled = true; -bool Settings::gAVFoundationNSURLSessionEnabled = false; +bool Settings::gAVFoundationNSURLSessionEnabled = true; #endif #if PLATFORM(COCOA) Modified: trunk/Source/WebKit/mac/ChangeLog (197937 => 197938) --- trunk/Source/WebKit/mac/ChangeLog 2016-03-10 16:24:14 UTC (rev 197937) +++ trunk/Source/WebKit/mac/ChangeLog 2016-03-10 16:28:52 UTC (rev 197938) @@ -1,3 +1,13 @@ +2016-02-22 Jer Noble + +Enable AVFoundationNSURLSessionEnabled by default +https://bugs.webkit.org/show_bug.cgi?id=154469 + +Reviewed by Sam Weinig. + +* WebView/WebPreferences.mm: +(+[WebPreferences initialize]): + 2016-03-09 Ryosuke Niwa Add runtime flags for shadow DOM and custom elements Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (197937 => 197938) --- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-03-10 16:24:14 UTC (rev 197937) +++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-03-10 16:28:52 UTC (rev 197938) @@ -517,7 +517,7 @@ [NSNumber numberWithBool:YES], WebKitHyperlinkAuditingEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitUsePreHTML5ParserQuirksKey, [NSNumber numberWithBool:YES], WebKitAVFoundationEnabledKey, -[NSNumber numberWithBool:NO], WebKitAVFoundationNSURLSessionEnabledKey, +[NSNumber numberWithBool:YES], WebKitAVFoundationNSURLSessionEnabledKey, [NSNumber numberWithBool:NO], WebKitSuppressesIncrementalRenderingKey, #if !PLATFORM(IOS) [NSNumber numberWithBool:NO], WebKitRequiresUserGestureForMediaPlaybackPreferenceKey, Modified: trunk/Source/WebKit2/ChangeLog (197937 => 197938) --- trunk/Source/WebKit2/ChangeLog 2016-03-10 16:24:14 UTC (rev 197937) +++ trunk/Source/WebKit2/ChangeLog 2016-03-10 16:28:52 UTC (rev 197938) @@ -1,3 +1,12 @@ +2016-02-22 Jer Noble + +Enable AVFoundationNSURLSessionEnabled by default +https://bugs.webkit.org/show_bug.cgi?id=154469 + +Reviewed by Sam Weinig. + +* Shared/WebPreferencesDefinitions.h: + 2016-03-10 Eric Carlson Unreviewed, revert changes accidentally committed with previous patch. Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (197937 => 197938) --- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-03-10 16:24:14 UTC (rev 197937) +++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-03-10 16:28:52 UTC (rev 197938) @@ -149,7 +149,7 @@ macro(AllowUniversalAccessFromFileURLs, allowUniversalAccessFromFileURLs, Bool, bool, false) \ macro(AllowFileAccessFromFileURLs, allowFileAccessFromFileURLs, Bool, bool, false) \ macro(AVFoundationEnabled, isAVFoundationEnabled, Bool, bool, true) \ -macro(AVFoundationNSURLSessionEnabled, isAVFoundationNSURLSessionEnabled, Bool, bool, false) \ +macro(AVFoundationNSURLSessionEnabled, isAVFoundationNSURLSessionEnabled, Bool, bool, true) \ macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_MEDIA_PLAYBACK) \ macro(RequiresUserGestureForAudioPlayback, requiresUserGestureForAudioPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK) \ macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK) \ ___ webkit-changes mailing l
[webkit-changes] [197953] trunk
rash-invisible-autoplay-display-none-expected.txt: Added. * media/video-crash-invisible-autoplay-display-none.html: Added. * media/video-main-content-allow-expected.txt: * media/video-main-content-allow-then-deny-expected.txt: * media/video-main-content-allow-then-deny.html: * media/video-main-content-allow.html: * media/video-main-content-deny-display-none-expected.txt: * media/video-main-content-deny-display-none.html: * media/video-main-content-deny-not-in-dom-expected.txt: * media/video-main-content-deny-not-in-dom.html: * media/video-main-content-deny-not-visible-expected.txt: * media/video-main-content-deny-not-visible.html: * media/video-main-content-deny-obscured-expected.txt: * media/video-main-content-deny-obscured.html: * media/video-main-content-deny-too-small-expected.txt: * media/video-main-content-deny-too-small.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/media/audio-playback-restriction-play-expected.txt trunk/LayoutTests/media/audio-playback-restriction-play.html trunk/LayoutTests/media/no-autoplay-with-user-gesture-requirement.html trunk/LayoutTests/media/video-load-require-user-gesture.html trunk/LayoutTests/media/video-main-content-allow-expected.txt trunk/LayoutTests/media/video-main-content-allow-then-deny-expected.txt trunk/LayoutTests/media/video-main-content-allow-then-deny.html trunk/LayoutTests/media/video-main-content-allow.html trunk/LayoutTests/media/video-main-content-deny-display-none-expected.txt trunk/LayoutTests/media/video-main-content-deny-display-none.html trunk/LayoutTests/media/video-main-content-deny-not-in-dom-expected.txt trunk/LayoutTests/media/video-main-content-deny-not-in-dom.html trunk/LayoutTests/media/video-main-content-deny-not-visible-expected.txt trunk/LayoutTests/media/video-main-content-deny-not-visible.html trunk/LayoutTests/media/video-main-content-deny-obscured-expected.txt trunk/LayoutTests/media/video-main-content-deny-obscured.html trunk/LayoutTests/media/video-main-content-deny-too-small-expected.txt trunk/LayoutTests/media/video-main-content-deny-too-small.html trunk/LayoutTests/media/video-play-require-user-gesture.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/MediaElementSession.cpp trunk/Source/WebCore/html/MediaElementSession.h trunk/Source/WebCore/page/Settings.cpp trunk/Source/WebCore/page/Settings.in trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h trunk/Source/WebKit/mac/WebView/WebPreferences.mm trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit/win/ChangeLog trunk/Source/WebKit/win/WebView.cpp trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj trunk/Tools/TestWebKitAPI/Tests/WebKit/ios/video-with-audio.html trunk/Tools/TestWebKitAPI/Tests/WebKit/ios/video-without-audio.html trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm Added Paths trunk/LayoutTests/media/video-crash-invisible-autoplay-display-none-expected.txt trunk/LayoutTests/media/video-crash-invisible-autoplay-display-none.html trunk/Tools/TestWebKitAPI/Tests/WebKit/ios/audio-only.html trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm Diff Modified: trunk/LayoutTests/ChangeLog (197952 => 197953) --- trunk/LayoutTests/ChangeLog 2016-03-10 21:11:33 UTC (rev 197952) +++ trunk/LayoutTests/ChangeLog 2016-03-10 21:35:10 UTC (rev 197953) @@ -1,3 +1,34 @@ +2016-03-07 Jer Noble + +Add separate WK and WK2 preferences for requiring user gestures for video media, distinct from user gestures for media generally +https://bugs.webkit.org/show_bug.cgi?id=155141 + +Reviewed by Beth Dakin. + +Update layout tests to reflect new restriction name. + +* media/audio-playback-restriction-play-expected.txt: +* media/audio-playback-restriction-play.html: +* media/no-autoplay-with-user-gesture-requirement.html: +* media/video-load-require-user-gesture.html: +* media/video-play-require-user-gesture.html: +* media/video-crash-invisible-autoplay-display-none-expected.txt: Added. +* media/video-crash-invisible-autoplay-display-none.html: Added. +* media/video-main-content-allow-expected.txt: +* media/video-main-content-allow-then-deny-expected.t
[webkit-changes] [197964] trunk/Tools
Title: [197964] trunk/Tools Revision 197964 Author jer.no...@apple.com Date 2016-03-10 15:50:20 -0800 (Thu, 10 Mar 2016) Log Message Partial roll-out of r197953; test fails because encode/decode support of those properties were never added. * TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm: (TEST): Deleted. Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm Diff Modified: trunk/Tools/ChangeLog (197963 => 197964) --- trunk/Tools/ChangeLog 2016-03-10 23:48:58 UTC (rev 197963) +++ trunk/Tools/ChangeLog 2016-03-10 23:50:20 UTC (rev 197964) @@ -1,3 +1,10 @@ +2016-03-10 Jer Noble + +Partial roll-out of r197953; test fails because encode/decode support of those properties were never added. + +* TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm: +(TEST): Deleted. + 2016-03-10 Myles C. Maxfield [OS X] Main frame scrollbars should appear on the left on RTL systems Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm (197963 => 197964) --- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm 2016-03-10 23:48:58 UTC (rev 197963) +++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm 2016-03-10 23:50:20 UTC (rev 197964) @@ -28,7 +28,6 @@ #if WK_API_ENABLED #import -#import #import template @@ -99,8 +98,6 @@ [a setApplicationNameForUserAgent:@"Application Name"]; [a setAllowsAirPlayForMediaPlayback:NO]; [a setDataDetectorTypes:WKDataDetectorTypeAll]; -[a _setRequiresUserActionForVideoPlayback:YES]; -[a _setRequiresUserActionForAudioPlayback:YES]; #if PLATFORM(IOS) [a setAllowsInlineMediaPlayback:YES]; @@ -115,8 +112,6 @@ EXPECT_TRUE([[a applicationNameForUserAgent] isEqualToString:[b applicationNameForUserAgent]]); EXPECT_EQ([a allowsAirPlayForMediaPlayback], [b allowsAirPlayForMediaPlayback]); EXPECT_EQ([a dataDetectorTypes], [b dataDetectorTypes]); -EXPECT_EQ([a _requiresUserActionForVideoPlayback], [b _requiresUserActionForVideoPlayback]); -EXPECT_EQ([a _requiresUserActionForVideoPlayback], [b _requiresUserActionForVideoPlayback]); #if PLATFORM(IOS) EXPECT_EQ([a allowsInlineMediaPlayback], [b allowsInlineMediaPlayback]); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [197968] trunk/Source
Title: [197968] trunk/Source Revision 197968 Author jer.no...@apple.com Date 2016-03-10 16:34:57 -0800 (Thu, 10 Mar 2016) Log Message Add WebCore, WebKit, & WebKit2 preference/setting to enable Main Content heuristic. https://bugs.webkit.org/show_bug.cgi?id=155326 Reviewed by Beth Dakin. Source/WebCore: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Set the OverrideUserGestureRequirementForMainContent if the new setting is enabled. * page/Settings.in: Source/WebKit/mac: Add SPI to get and set the new preference. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences overrideUserGestureRequirementForMainContent]): (-[WebPreferences setOverrideUserGestureRequirementForMainContent:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: Add SPI to get and set the new preference. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetMainContentUserGestureOverrideEnabled): (WKPreferencesGetMainContentUserGestureOverrideEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _mainContentUserGestureOverrideEnabled]): (-[WKWebViewConfiguration _setMainContentUserGestureOverrideEnabled:]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/page/Settings.in trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h trunk/Source/WebKit/mac/WebView/WebPreferences.mm trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h trunk/Source/WebKit/mac/WebView/WebView.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (197967 => 197968) --- trunk/Source/WebCore/ChangeLog 2016-03-11 00:32:51 UTC (rev 197967) +++ trunk/Source/WebCore/ChangeLog 2016-03-11 00:34:57 UTC (rev 197968) @@ -1,3 +1,15 @@ +2016-03-10 Jer Noble + +Add WebCore, WebKit, & WebKit2 preference/setting to enable Main Content heuristic. +https://bugs.webkit.org/show_bug.cgi?id=155326 + + +Reviewed by Beth Dakin. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::HTMLMediaElement): Set the OverrideUserGestureRequirementForMainContent if the new setting is enabled. +* page/Settings.in: + 2016-03-10 Said Abou-Hallawa REGRESSION: GuardMallloc crash in SVGListPropertyTearOff::processIncomingListItemWrapper Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (197967 => 197968) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-03-11 00:32:51 UTC (rev 197967) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-03-11 00:34:57 UTC (rev 197968) @@ -450,6 +450,9 @@ m_captionDisplayMode = document.page()->group().captionPreferences().captionDisplayMode(); #endif +if (settings && settings->mainContentUserGestureOverrideEnabled()) +m_mediaSession->addBehaviorRestriction(MediaElementSession::OverrideUserGestureRequirementForMainContent); + #if ENABLE(MEDIA_SESSION) m_elementID = nextElementID(); elementIDsToElements().add(m_elementID, this); Modified: trunk/Source/WebCore/page/Settings.in (197967 => 197968) --- trunk/Source/WebCore/page/Settings.in 2016-03-11 00:32:51 UTC (rev 197967) +++ trunk/Source/WebCore/page/Settings.in 2016-03-11 00:34:57 UTC (rev 197968) @@ -127,6 +127,7 @@ allowRunningOfInsecureContent initial=false videoPlaybackRequiresUserGesture initial=defaultVideoPlaybackRequiresUserGesture audioPlaybackRequiresUserGesture initial=defaultAudioPlaybackRequiresUserGesture +mainContentUserGestureOverrideEnabled initial=false allowsInlineMediaPlayback initial=defaultAllowsInlineMediaPlayback inlineMediaPlaybackRequiresPlaysInlineAttribute initial=defaultInlineMediaPlaybackRequiresPlaysInlineAttribute allowsPictureInPictureMediaPlayback initial=defaultAllowsPictureInPictureMediaPlayback Modified: trunk/Source/WebKit/mac/ChangeLog (197967 => 197968) --- trunk/Source/WebKit/mac/ChangeLog 2016-03-11 00:32:51 UTC (rev 197967) +++ trunk/Source/WebKit/mac/ChangeLog 2016-03-11 00:34:57 UTC (rev 197968) @@ -1,3 +1,21 @@ +2
[webkit-changes] [197988] trunk/Source/WebKit/win
Title: [197988] trunk/Source/WebKit/win Revision 197988 Author jer.no...@apple.com Date 2016-03-10 20:16:55 -0800 (Thu, 10 Mar 2016) Log Message Unreviewed build fix after r197953; correct the settings added in r197953. * WebView.cpp: (WebView::notifyPreferencesChanged): Modified Paths trunk/Source/WebKit/win/ChangeLog trunk/Source/WebKit/win/WebView.cpp Diff Modified: trunk/Source/WebKit/win/ChangeLog (197987 => 197988) --- trunk/Source/WebKit/win/ChangeLog 2016-03-11 04:03:32 UTC (rev 197987) +++ trunk/Source/WebKit/win/ChangeLog 2016-03-11 04:16:55 UTC (rev 197988) @@ -1,5 +1,12 @@ 2016-03-10 Jer Noble +Unreviewed build fix after r197953; correct the settings added in r197953. + +* WebView.cpp: +(WebView::notifyPreferencesChanged): + +2016-03-10 Jer Noble + Add separate WK and WK2 preferences for requiring user gestures for video media, distinct from user gestures for media generally https://bugs.webkit.org/show_bug.cgi?id=155141 Modified: trunk/Source/WebKit/win/WebView.cpp (197987 => 197988) --- trunk/Source/WebKit/win/WebView.cpp 2016-03-11 04:03:32 UTC (rev 197987) +++ trunk/Source/WebKit/win/WebView.cpp 2016-03-11 04:16:55 UTC (rev 197988) @@ -5305,8 +5305,8 @@ hr = prefsPrivate->mediaPlaybackRequiresUserGesture(&enabled); if (FAILED(hr)) return hr; -settings.setRequiresUserGestureForVideoPlayback(enabled); -settings.setRequiresUserGestureForAudioPlayback(enabled); +settings.setVideoPlaybackRequiresUserGesture(enabled); +settings.setAudioPlaybackRequiresUserGesture(enabled); hr = prefsPrivate->mediaPlaybackAllowsInline(&enabled); if (FAILED(hr)) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [197989] trunk
Title: [197989] trunk Revision 197989 Author jer.no...@apple.com Date 2016-03-10 20:25:51 -0800 (Thu, 10 Mar 2016) Log Message CRASH at WebCore::RenderView::updateVisibleViewportRect https://bugs.webkit.org/show_bug.cgi?id=155209 Reviewed by Simon Fraser. Source/WebCore: Test: media/video-crash-invisible-autoplay-display-none.html Between the time when the video element's renderer is created and destroyed, we may have unset the InvisibleAutoplayNotPermitted restriction. So rather than check for that restriction before unregistering for the "visible in viewport" notification, unregister only if the renderer was previously registered. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::willDetachRenderers): LayoutTests: (These files were mistakenly landed in a previous commit:) * media/video-crash-invisible-autoplay-display-none-expected.txt: Added. * media/video-crash-invisible-autoplay-display-none.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp Diff Modified: trunk/LayoutTests/ChangeLog (197988 => 197989) --- trunk/LayoutTests/ChangeLog 2016-03-11 04:16:55 UTC (rev 197988) +++ trunk/LayoutTests/ChangeLog 2016-03-11 04:25:51 UTC (rev 197989) @@ -1,3 +1,15 @@ +2016-03-10 Jer Noble + +CRASH at WebCore::RenderView::updateVisibleViewportRect +https://bugs.webkit.org/show_bug.cgi?id=155209 + + +Reviewed by Simon Fraser. + +(These files were mistakenly landed in a previous commit:) +* media/video-crash-invisible-autoplay-display-none-expected.txt: Added. +* media/video-crash-invisible-autoplay-display-none.html: Added. + 2016-03-10 Zalan Bujtas Simple line layout: Add text-align: justify support. Modified: trunk/Source/WebCore/ChangeLog (197988 => 197989) --- trunk/Source/WebCore/ChangeLog 2016-03-11 04:16:55 UTC (rev 197988) +++ trunk/Source/WebCore/ChangeLog 2016-03-11 04:25:51 UTC (rev 197989) @@ -1,3 +1,21 @@ +2016-03-10 Jer Noble + +CRASH at WebCore::RenderView::updateVisibleViewportRect +https://bugs.webkit.org/show_bug.cgi?id=155209 + + +Reviewed by Simon Fraser. + +Test: media/video-crash-invisible-autoplay-display-none.html + +Between the time when the video element's renderer is created and destroyed, we may have unset the +InvisibleAutoplayNotPermitted restriction. So rather than check for that restriction before +unregistering for the "visible in viewport" notification, unregister only if the renderer +was previously registered. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::willDetachRenderers): + 2016-03-10 Zalan Bujtas Simple line layout: Add text-align: justify support. Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (197988 => 197989) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-03-11 04:16:55 UTC (rev 197988) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-03-11 04:25:51 UTC (rev 197989) @@ -805,7 +805,7 @@ void HTMLMediaElement::willDetachRenderers() { -if (renderer() && m_mediaSession->hasBehaviorRestriction(MediaElementSession::InvisibleAutoplayNotPermitted)) +if (renderer()) renderer()->unregisterForVisibleInViewportCallback(); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [197990] trunk/Source
Title: [197990] trunk/Source Revision 197990 Author jer.no...@apple.com Date 2016-03-10 20:50:10 -0800 (Thu, 10 Mar 2016) Log Message Set AVURLAssetUsesNoPersistentCacheKey on AVAsset to match caching policy. https://bugs.webkit.org/show_bug.cgi?id=155117 rdar://problem/6802240 Patch by Jeremy Jones on 2016-03-10 Reviewed by Simon Fraser. Source/WebCore: No new tests because no new functionality was added. This will prevent persistent media caches when webkit is using in memory caching. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache): Added. * html/HTMLMediaElement.h: Declare mediaPlayerShouldUsePersistentCache(). * page/ChromeClient.h: Declare mediaPlayerShouldUsePersistentCache(). * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerShouldUsePersistentCache): Added. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Set property on AVAssetOptions. Source/WebKit/mac: Implement mediaShouldUsePersistentCache to disable media caching when NSURLCache is disabled. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::mediaShouldUsePersistentCache): Added. Source/WebKit2: Make AVAsset AVURLAssetUsesNoPersistentCacheKey match !m_websiteDataStore->isPersistent() This will prevent persistent media caches when webkit is using in-memory caching. * Shared/WebPageCreationParameters.cpp: Add mediaShouldUsePersistentCache. (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): Add mediaShouldUsePersistentCache. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::mediaShouldUsePersistentCache): Added. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_mediaUsesPersistentCache): Added. * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::mediaShouldUsePersistentCache): Added. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.h trunk/Source/WebCore/page/ChromeClient.h trunk/Source/WebCore/platform/graphics/MediaPlayer.h trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp trunk/Source/WebKit2/Shared/WebPageCreationParameters.h trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h Diff Modified: trunk/Source/WebCore/ChangeLog (197989 => 197990) --- trunk/Source/WebCore/ChangeLog 2016-03-11 04:25:51 UTC (rev 197989) +++ trunk/Source/WebCore/ChangeLog 2016-03-11 04:50:10 UTC (rev 197990) @@ -1,3 +1,24 @@ +2016-03-10 Jeremy Jones + +Set AVURLAssetUsesNoPersistentCacheKey on AVAsset to match caching policy. +https://bugs.webkit.org/show_bug.cgi?id=155117 +rdar://problem/6802240 + +Reviewed by Simon Fraser. + +No new tests because no new functionality was added. + +This will prevent persistent media caches when webkit is using in memory caching. + +* html/HTMLMediaElement.cpp: +(WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache): Added. +* html/HTMLMediaElement.h: Declare mediaPlayerShouldUsePersistentCache(). +* page/ChromeClient.h: Declare mediaPlayerShouldUsePersistentCache(). +* platform/graphics/MediaPlayer.h: +(WebCore::MediaPlayerClient::mediaPlayerShouldUsePersistentCache): Added. +* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: +(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Set property on AVAssetOptions. + 2016-03-10 Jer Noble CRASH at WebCore::RenderView::updateVisibleViewportRect Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (197989 => 197990) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-03-11 04:25:51 UTC (rev 197989) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-03-11 04:50:10 UTC (rev 197990) @@ -6144,6 +6144,14 @@ return adoptRef(*new MediaResourceLoader(document(), fastGetAttribute(HTMLNames::crossoriginAttr))); } +bool HTMLMediaElement::mediaPlayerShouldUsePersistentCache() const +{ +if (!document().page()) +return false; + +return document().page()->chrome().client().mediaShouldUsePersistentCache(); +} + bool HTML
[webkit-changes] [198035] trunk/Source/WebCore
Title: [198035] trunk/Source/WebCore Revision 198035 Author jer.no...@apple.com Date 2016-03-11 11:35:15 -0800 (Fri, 11 Mar 2016) Log Message Web Audio becomes distorted after sample rate changes https://bugs.webkit.org/show_bug.cgi?id=154538 Reviewed by Darin Adler. When the underlying audio hardware sample rate changes, the AudioUnit render callback will begin asking for fewer or more frames. For example, when the sample rate goes from 44.1kHz to 48kHz, it will ask for 118 samples instead of 128. (And vice-versa, 140 samples instead of 128.) But the Web Audio engine can only really handle requests in multiples of 128 samples. In the case where there are requests for < 128 samples, actually render 128, but save off the unrequested samples in a separate bus. Then fill that bus during the next request. * platform/audio/AudioBus.cpp: (WebCore::AudioBus::copyFromRange): Added utility method. * platform/audio/AudioBus.h: * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestinationIOS::AudioDestinationIOS): Create a "spare" bus. (WebCore::assignAudioBuffersToBus): Moved from inside render. (WebCore::AudioDestinationIOS::render): Save off extra samples to the "spare" bus. * platform/audio/ios/AudioDestinationIOS.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/audio/AudioBus.cpp trunk/Source/WebCore/platform/audio/AudioBus.h trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.h Diff Modified: trunk/Source/WebCore/ChangeLog (198034 => 198035) --- trunk/Source/WebCore/ChangeLog 2016-03-11 19:30:55 UTC (rev 198034) +++ trunk/Source/WebCore/ChangeLog 2016-03-11 19:35:15 UTC (rev 198035) @@ -1,3 +1,27 @@ +2016-03-10 Jer Noble + +Web Audio becomes distorted after sample rate changes +https://bugs.webkit.org/show_bug.cgi?id=154538 + + +Reviewed by Darin Adler. + +When the underlying audio hardware sample rate changes, the AudioUnit render callback will begin asking +for fewer or more frames. For example, when the sample rate goes from 44.1kHz to 48kHz, it will ask for +118 samples instead of 128. (And vice-versa, 140 samples instead of 128.) But the Web Audio engine can only +really handle requests in multiples of 128 samples. In the case where there are requests for < 128 samples, +actually render 128, but save off the unrequested samples in a separate bus. Then fill that bus during the +next request. + +* platform/audio/AudioBus.cpp: +(WebCore::AudioBus::copyFromRange): Added utility method. +* platform/audio/AudioBus.h: +* platform/audio/ios/AudioDestinationIOS.cpp: +(WebCore::AudioDestinationIOS::AudioDestinationIOS): Create a "spare" bus. +(WebCore::assignAudioBuffersToBus): Moved from inside render. +(WebCore::AudioDestinationIOS::render): Save off extra samples to the "spare" bus. +* platform/audio/ios/AudioDestinationIOS.h: + 2016-03-11 Yusuke Suzuki Unreviewed build fix after r198023. Modified: trunk/Source/WebCore/platform/audio/AudioBus.cpp (198034 => 198035) --- trunk/Source/WebCore/platform/audio/AudioBus.cpp 2016-03-11 19:30:55 UTC (rev 198034) +++ trunk/Source/WebCore/platform/audio/AudioBus.cpp 2016-03-11 19:35:15 UTC (rev 198035) @@ -213,6 +213,33 @@ channel(i)->scale(scale); } +void AudioBus::copyFromRange(const AudioBus& sourceBus, unsigned startFrame, unsigned endFrame) +{ +if (!topologyMatches(sourceBus)) { +ASSERT_NOT_REACHED(); +zero(); +return; +} + +size_t numberOfSourceFrames = sourceBus.length(); +bool isRangeSafe = startFrame < endFrame && endFrame <= numberOfSourceFrames; +ASSERT(isRangeSafe); +if (!isRangeSafe) { +zero(); +return; +} + +unsigned numberOfChannels = this->numberOfChannels(); +ASSERT(numberOfChannels <= MaxBusChannels); +if (numberOfChannels > MaxBusChannels) { +zero(); +return; +} + +for (unsigned i = 0; i < numberOfChannels; ++i) +channel(i)->copyFromRange(sourceBus.channel(i), startFrame, endFrame); +} + void AudioBus::copyFrom(const AudioBus& sourceBus, ChannelInterpretation channelInterpretation) { if (&sourceBus == this) Modified: trunk/Source/WebCore/platform/audio/AudioBus.h (198034 => 198035) --- trunk/Source/WebCore/platform/audio/AudioBus.h 2016-03-11 19:30:55 UTC (rev 198034) +++ trunk/Source/WebCore/platform/audio/AudioBus.h 2016-03-11 19:35:15 UTC (rev 198035) @@ -122,6 +122,9 @@ void reset() { m_isFirstTime = true; } // for de-zippering // Copies the samples from the source bus to this one. +void copyFromRange(const AudioBus& sourceBus, unsigned startFrame, unsigned endFrame); + +// Copies the samples from the
[webkit-changes] [198048] trunk/Tools
Title: [198048] trunk/Tools Revision 198048 Author jer.no...@apple.com Date 2016-03-11 14:49:00 -0800 (Fri, 11 Mar 2016) Log Message [ios-sim debug] API tests RequiresUserActionForPlaybackTest.DoesNotRequireUserActionForMediaPlayback and RequiresUserActionForAudioButNotVideoPlayback asserting https://bugs.webkit.org/show_bug.cgi?id=155365 Reviewed by Darin Adler. Allow tests running on iOS simulator to play video inline, avoiding this assert. * TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm: (RequiresUserActionForPlaybackTest::SetUp): Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm Diff Modified: trunk/Tools/ChangeLog (198047 => 198048) --- trunk/Tools/ChangeLog 2016-03-11 22:25:21 UTC (rev 198047) +++ trunk/Tools/ChangeLog 2016-03-11 22:49:00 UTC (rev 198048) @@ -1,3 +1,15 @@ +2016-03-11 Jer Noble + +[ios-sim debug] API tests RequiresUserActionForPlaybackTest.DoesNotRequireUserActionForMediaPlayback and RequiresUserActionForAudioButNotVideoPlayback asserting +https://bugs.webkit.org/show_bug.cgi?id=155365 + +Reviewed by Darin Adler. + +Allow tests running on iOS simulator to play video inline, avoiding this assert. + +* TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm: +(RequiresUserActionForPlaybackTest::SetUp): + 2016-03-11 Frederic Wang [jhbuild] Disable LLVM OCaml bindings. Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm (198047 => 198048) --- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm 2016-03-11 22:25:21 UTC (rev 198047) +++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm 2016-03-11 22:49:00 UTC (rev 198048) @@ -75,6 +75,7 @@ [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"playingHandler"]; configuration.get()._mediaDataLoadsAutomatically = YES; #if TARGET_OS_IPHONE +configuration.get().allowsInlineMediaPlayback = YES; configuration.get().requiresUserActionForMediaPlayback = NO; #endif } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198211] trunk
Title: [198211] trunk Revision 198211 Author jer.no...@apple.com Date 2016-03-15 08:20:40 -0700 (Tue, 15 Mar 2016) Log Message Video elements with autoplay do not begin playing when scrolling into view if InvisibleAutoplayNotPermitted is set. https://bugs.webkit.org/show_bug.cgi?id=155468 Reviewed by Eric Carlson. Source/WebCore: Test: media/video-restricted-invisible-autoplay-allowed-when-visible.html A few bugs came together to cause this behavior. We were not telling the media session that we were going to begin the autoplaying state, we were not restoring the correct state when the interruption ended, and we were not checking to see if we could actually play correctly when the interruption ended. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::resumeAutoplaying): (WebCore::HTMLMediaElement::updateShouldPlay): (WebCore::elementCanTransitionFromAutoplayToPlay): Deleted. * html/HTMLMediaElement.h: * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::endInterruption): LayoutTests: * media/video-restricted-invisible-autoplay-allowed-when-visible-expected.txt: Added. * media/video-restricted-invisible-autoplay-allowed-when-visible.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLMediaElement.cpp trunk/Source/WebCore/html/HTMLMediaElement.h trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp Added Paths trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible-expected.txt trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible.html Diff Modified: trunk/LayoutTests/ChangeLog (198210 => 198211) --- trunk/LayoutTests/ChangeLog 2016-03-15 15:10:07 UTC (rev 198210) +++ trunk/LayoutTests/ChangeLog 2016-03-15 15:20:40 UTC (rev 198211) @@ -1,3 +1,13 @@ +2016-03-14 Jer Noble + +Video elements with autoplay do not begin playing when scrolling into view if InvisibleAutoplayNotPermitted is set. +https://bugs.webkit.org/show_bug.cgi?id=155468 + +Reviewed by Eric Carlson. + +* media/video-restricted-invisible-autoplay-allowed-when-visible-expected.txt: Added. +* media/video-restricted-invisible-autoplay-allowed-when-visible.html: Added. + 2016-03-15 Jiewen Tan URL Parsing should signal failure for illegal IDN Added: trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible-expected.txt (0 => 198211) --- trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible-expected.txt (rev 0) +++ trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible-expected.txt 2016-03-15 15:20:40 UTC (rev 198211) @@ -0,0 +1,8 @@ +Test that "invisible autoplay not allowed restriction" plays media when scrolled into view. + +RUN(internals.setMediaElementRestrictions(video, "InvisibleAutoplayNotPermitted")) +** setting video.src +RUN(document.body.appendChild(video)) +EVENT(play) +END OF TEST + Added: trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible.html (0 => 198211) --- trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible.html (rev 0) +++ trunk/LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible.html 2016-03-15 15:20:40 UTC (rev 198211) @@ -0,0 +1,36 @@ + + + +function start() +{ +video = document.createElement('video'); +run('internals.setMediaElementRestrictions(video, "InvisibleAutoplayNotPermitted")'); +video.autoplay = true; +consoleWrite('** setting video.src'); +video.src = "" 'content/test'); + +waitForEvent('play', play) +setTimeout(putInDOM, 250); +} + +function putInDOM() +{ +run('document.body.appendChild(video)'); +failTestIn(250); +} + +function play() +{ +if (!video.parentNode) +failTest('play event fired before element was put in DOM'); +endTest(); +} + + + + +Test that "invisible autoplay not allowed restriction" plays media when scrolled into view. + + Modified: trunk/Source/WebCore/ChangeLog (198210 => 198211) --- trunk/Source/WebCore/ChangeLog 2016-03-15 15:10:07 UTC (rev 198210) +++ trunk/Source/WebCore/ChangeLog 2016-03-15 15:20:40 UTC (rev 198211) @@ -1,3 +1,27 @@ +2016-03-14 Jer Noble + +Video elements with autoplay do not begin playing when scrolli
[webkit-changes] [198251] trunk/Source/WebKit/mac
Title: [198251] trunk/Source/WebKit/mac Revision 198251 Author jer.no...@apple.com Date 2016-03-15 17:45:32 -0700 (Tue, 15 Mar 2016) Log Message [ios-sim debug] API test WebKit1.AudioSessionCategoryIOS timing out https://bugs.webkit.org/show_bug.cgi?id=155275 Reviewed by Alexey Proskuryakov. The videoPlaybackRequiresUserGesture and audioPlaybackRequiresUserGesture should both defalut to NO, so that legacy clients of -[UIWebView setMediaPlaybackRequiresUserAction:] continue to work as expected. * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Modified Paths trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebPreferences.mm Diff Modified: trunk/Source/WebKit/mac/ChangeLog (198250 => 198251) --- trunk/Source/WebKit/mac/ChangeLog 2016-03-16 00:22:14 UTC (rev 198250) +++ trunk/Source/WebKit/mac/ChangeLog 2016-03-16 00:45:32 UTC (rev 198251) @@ -1,3 +1,17 @@ +2016-03-15 Jer Noble + +[ios-sim debug] API test WebKit1.AudioSessionCategoryIOS timing out +https://bugs.webkit.org/show_bug.cgi?id=155275 + +Reviewed by Alexey Proskuryakov. + +The videoPlaybackRequiresUserGesture and audioPlaybackRequiresUserGesture should both defalut to +NO, so that legacy clients of -[UIWebView setMediaPlaybackRequiresUserAction:] continue to work +as expected. + +* WebView/WebPreferences.mm: +(+[WebPreferences initialize]): + 2016-03-15 Oliver Hunt Remove compile time define for SEPARATED_HEAP Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (198250 => 198251) --- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-03-16 00:22:14 UTC (rev 198250) +++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-03-16 00:45:32 UTC (rev 198251) @@ -524,8 +524,6 @@ [NSNumber numberWithBool:NO], WebKitSuppressesIncrementalRenderingKey, [NSNumber numberWithBool:attachmentElementEnabled], WebKitAttachmentElementEnabledPreferenceKey, #if !PLATFORM(IOS) -[NSNumber numberWithBool:NO], WebKitRequiresUserGestureForVideoPlaybackPreferenceKey, -[NSNumber numberWithBool:NO], WebKitRequiresUserGestureForAudioPlaybackPreferenceKey, [NSNumber numberWithBool:YES], WebKitAllowsInlineMediaPlaybackPreferenceKey, [NSNumber numberWithBool:NO], WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey, [NSNumber numberWithBool:YES], WebKitMediaControlsScaleWithPageZoomPreferenceKey, @@ -538,8 +536,6 @@ [NSNumber numberWithBool:NO], WebKitShouldRespectImageOrientationKey, [NSNumber numberWithBool:YES], WebKitMediaDataLoadsAutomaticallyPreferenceKey, #else -[NSNumber numberWithBool:YES], WebKitRequiresUserGestureForVideoPlaybackPreferenceKey, -[NSNumber numberWithBool:YES], WebKitRequiresUserGestureForAudioPlaybackPreferenceKey, [NSNumber numberWithBool:allowsInlineMediaPlayback], WebKitAllowsInlineMediaPlaybackPreferenceKey, [NSNumber numberWithBool:requiresPlaysInlineAttribute], WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey, [NSNumber numberWithBool:NO], WebKitMediaControlsScaleWithPageZoomPreferenceKey, @@ -548,6 +544,8 @@ #if HAVE(AVKIT) [NSNumber numberWithBool:YES], WebKitAVKitEnabled, #endif +[NSNumber numberWithBool:NO], WebKitRequiresUserGestureForVideoPlaybackPreferenceKey, +[NSNumber numberWithBool:NO], WebKitRequiresUserGestureForAudioPlaybackPreferenceKey, [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota, // Per-Origin Quota on iOS is 25MB. When the quota is reached for a particular origin ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198436] trunk/Source/WebCore
Title: [198436] trunk/Source/WebCore Revision 198436 Author jer.no...@apple.com Date 2016-03-18 12:04:58 -0700 (Fri, 18 Mar 2016) Log Message CachedResource::MediaResource types shouldn't be blocked due to mixed-content. https://bugs.webkit.org/show_bug.cgi?id=155588 Reviewed by Daniel Bates. The Mixed Content spec specifically allows (with certain restrictions) loads of , , and resources from mixed-content origins, albeit with warnings. No new tests, fixes existing test: http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html * loader/cache/CachedResourceLoader.cpp: (WebCore::contentTypeFromResourceType): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (198435 => 198436) --- trunk/Source/WebCore/ChangeLog 2016-03-18 18:42:53 UTC (rev 198435) +++ trunk/Source/WebCore/ChangeLog 2016-03-18 19:04:58 UTC (rev 198436) @@ -1,3 +1,19 @@ +2016-03-18 Jer Noble + +CachedResource::MediaResource types shouldn't be blocked due to mixed-content. +https://bugs.webkit.org/show_bug.cgi?id=155588 + + +Reviewed by Daniel Bates. + +The Mixed Content spec specifically allows (with certain restrictions) loads of , +, and resources from mixed-content origins, albeit with warnings. + +No new tests, fixes existing test: http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html + +* loader/cache/CachedResourceLoader.cpp: +(WebCore::contentTypeFromResourceType): + 2016-03-18 Nan Wang AX: AXARIACurrent exposed but not displayed in Accessibility Inspector Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (198435 => 198436) --- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-03-18 18:42:53 UTC (rev 198435) +++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-03-18 19:04:58 UTC (rev 198436) @@ -288,7 +288,11 @@ static MixedContentChecker::ContentType contentTypeFromResourceType(CachedResource::Type type) { switch (type) { +// https://w3c.github.io/webappsec-mixed-content/#category-optionally-blockable +// Editor's Draft, 11 February 2016 +// 3.1. Optionally-blockable Content case CachedResource::ImageResource: +case CachedResource::MediaResource: return MixedContentChecker::ContentType::ActiveCanWarn; case CachedResource::CSSStyleSheet: @@ -301,7 +305,6 @@ return MixedContentChecker::ContentType::Active; #endif -case CachedResource::MediaResource: case CachedResource::RawResource: case CachedResource::SVGDocumentResource: return MixedContentChecker::ContentType::Active; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198538] trunk
Title: [198538] trunk Revision 198538 Author jer.no...@apple.com Date 2016-03-22 11:03:59 -0700 (Tue, 22 Mar 2016) Log Message Media elements allowed to play without a user gesture, but requiring fullscreen playback, should not be allowed to autoplay. https://bugs.webkit.org/show_bug.cgi?id=155599 Reviewed by Darin Adler. Test: media/video-autoplay-allowed-but-fullscreen-required.html Entering fullscreen should always require a user gesture. * html/MediaElementSession.cpp: (WebCore::MediaElementSession::playbackPermitted): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/MediaElementSession.cpp Added Paths trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html Diff Added: trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt (0 => 198538) --- trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt (rev 0) +++ trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt 2016-03-22 18:03:59 UTC (rev 198538) @@ -0,0 +1,5 @@ +RUN(internals.settings.setAllowsInlineMediaPlayback(false)) +EVENT(canplaythrough) +Video did not begin playing OK +END OF TEST + Added: trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html (0 => 198538) --- trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html (rev 0) +++ trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html 2016-03-22 18:03:59 UTC (rev 198538) @@ -0,0 +1,31 @@ + + + +video-main-content-allow + +function go() { +run('internals.settings.setAllowsInlineMediaPlayback(false)'); +video = document.createElement('video'); +document.body.appendChild(video); + +video.src = "" 'content/test'); +waitForEvent('canplaythrough', canPlayThrough); +} + +function canPlayThrough() { +video.play(); +waitForEventAndFail('playing'); +setTimeout(didNotPlay, 100); +} + +function didNotPlay() { +logResult(true, "Video did not begin playing"); +endTest(); +} + + + + + \ No newline at end of file Modified: trunk/Source/WebCore/ChangeLog (198537 => 198538) --- trunk/Source/WebCore/ChangeLog 2016-03-22 17:59:51 UTC (rev 198537) +++ trunk/Source/WebCore/ChangeLog 2016-03-22 18:03:59 UTC (rev 198538) @@ -1,3 +1,17 @@ +2016-03-22 Jer Noble + +Media elements allowed to play without a user gesture, but requiring fullscreen playback, should not be allowed to autoplay. +https://bugs.webkit.org/show_bug.cgi?id=155599 + +Reviewed by Darin Adler. + +Test: media/video-autoplay-allowed-but-fullscreen-required.html + +Entering fullscreen should always require a user gesture. + +* html/MediaElementSession.cpp: +(WebCore::MediaElementSession::playbackPermitted): + 2016-03-22 Carlos Garcia Campos [GTK] WebInspector broken after r197620 Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (198537 => 198538) --- trunk/Source/WebCore/html/MediaElementSession.cpp 2016-03-22 17:59:51 UTC (rev 198537) +++ trunk/Source/WebCore/html/MediaElementSession.cpp 2016-03-22 18:03:59 UTC (rev 198538) @@ -146,6 +146,11 @@ if (pageExplicitlyAllowsElementToAutoplayInline(element)) return true; +if (requiresFullscreenForVideoPlayback(element) && !ScriptController::processingUserGestureForMedia()) { +LOG(Media, "MediaElementSession::playbackPermitted - returning FALSE"); +return false; +} + if (m_restrictions & OverrideUserGestureRequirementForMainContent && updateIsMainContent()) return true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198549] trunk/Source/WebCore
Title: [198549] trunk/Source/WebCore Revision 198549 Author jer.no...@apple.com Date 2016-03-22 13:56:38 -0700 (Tue, 22 Mar 2016) Log Message CRASH in WebCore::MediaResourceLoader::requestResource + 698 https://bugs.webkit.org/show_bug.cgi?id=155651 Reviewed by Eric Carlson. No new tests, fixes existing tests running under GuardMalloc. Protect against the Document passed into MediaResourceLoader being destroyed during the MediaResourceLoader's lifetime. * loader/MediaResourceLoader.cpp: (WebCore::MediaResourceLoader::MediaResourceLoader): (WebCore::MediaResourceLoader::contextDestroyed): (WebCore::MediaResourceLoader::requestResource): (WebCore::MediaResource::responseReceived): * loader/MediaResourceLoader.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/MediaResourceLoader.cpp trunk/Source/WebCore/loader/MediaResourceLoader.h Diff Modified: trunk/Source/WebCore/ChangeLog (198548 => 198549) --- trunk/Source/WebCore/ChangeLog 2016-03-22 20:29:40 UTC (rev 198548) +++ trunk/Source/WebCore/ChangeLog 2016-03-22 20:56:38 UTC (rev 198549) @@ -1,3 +1,22 @@ +2016-03-18 Jer Noble + +CRASH in WebCore::MediaResourceLoader::requestResource + 698 +https://bugs.webkit.org/show_bug.cgi?id=155651 + + +Reviewed by Eric Carlson. + +No new tests, fixes existing tests running under GuardMalloc. + +Protect against the Document passed into MediaResourceLoader being destroyed during the MediaResourceLoader's lifetime. + +* loader/MediaResourceLoader.cpp: +(WebCore::MediaResourceLoader::MediaResourceLoader): +(WebCore::MediaResourceLoader::contextDestroyed): +(WebCore::MediaResourceLoader::requestResource): +(WebCore::MediaResource::responseReceived): +* loader/MediaResourceLoader.h: + 2016-03-22 Beth Dakin Advanced spell checking should be guarded behind Modified: trunk/Source/WebCore/loader/MediaResourceLoader.cpp (198548 => 198549) --- trunk/Source/WebCore/loader/MediaResourceLoader.cpp 2016-03-22 20:29:40 UTC (rev 198548) +++ trunk/Source/WebCore/loader/MediaResourceLoader.cpp 2016-03-22 20:56:38 UTC (rev 198549) @@ -1,5 +1,6 @@ /* * Copyright (C) 2014 Igalia S.L + * Copyright (C) 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,7 +40,8 @@ namespace WebCore { MediaResourceLoader::MediaResourceLoader(Document& document, const String& crossOriginMode) -: m_document(document) +: ContextDestructionObserver(&document) +, m_document(&document) , m_crossOriginMode(crossOriginMode) { } @@ -49,8 +51,17 @@ ASSERT(m_resources.isEmpty()); } +void MediaResourceLoader::contextDestroyed() +{ +ContextDestructionObserver::contextDestroyed(); +m_document = nullptr; +} + RefPtr MediaResourceLoader::requestResource(const ResourceRequest& request, LoadOptions options) { +if (!m_document) +return nullptr; + DataBufferingPolicy bufferingPolicy = options & LoadOption::BufferData ? WebCore::BufferData : WebCore::DoNotBufferData; RequestOriginPolicy corsPolicy = !m_crossOriginMode.isNull() ? PotentiallyCrossOriginEnabled : UseDefaultOriginRestrictionsForType; StoredCredentials allowCredentials = m_crossOriginMode.isNull() || equalLettersIgnoringASCIICase(m_crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; @@ -60,9 +71,9 @@ CachedResourceRequest cacheRequest(request, ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, bufferingPolicy, allowCredentials, DoNotAskClientForCrossOriginCredentials, ClientDidNotRequestCredentials, DoSecurityCheck, corsPolicy, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::AllowCaching)); if (!m_crossOriginMode.isNull()) -updateRequestForAccessControl(cacheRequest.mutableResourceRequest(), m_document.securityOrigin(), allowCredentials); +updateRequestForAccessControl(cacheRequest.mutableResourceRequest(), m_document->securityOrigin(), allowCredentials); -CachedResourceHandle resource = m_document.cachedResourceLoader().requestMedia(cacheRequest); +CachedResourceHandle resource = m_document->cachedResourceLoader().requestMedia(cacheRequest); if (!resource) return nullptr; @@ -116,10 +127,13 @@ { ASSERT_UNUSED(resource, resource == m_resource); +if (!m_loader->document()) +return; + RefPtr protect(this); -if (!m_loader->crossOriginMode().isNull() && !resource->passesSameOriginPolicyCheck(*m_loader->document().securityOrigin())) { +if (!m_loader->crossOriginMode().isNull() && !resource->passesSameOriginPolicyCheck(*m_loader->document()->secu
[webkit-changes] [198566] trunk/Source/WebCore
Title: [198566] trunk/Source/WebCore Revision 198566 Author jer.no...@apple.com Date 2016-03-22 17:47:41 -0700 (Tue, 22 Mar 2016) Log Message CachedResource::MediaResource types shouldn't be blocked due to mixed-content. https://bugs.webkit.org/show_bug.cgi?id=155588 Reviewed by Brent Fulgham. Follow-up to address crashes caused by r198549. Rather than destroy MediaResourceLoader on a background thread, migrate the Ref to the main thread before releasing. * platform/graphics/PlatformMediaResourceLoader.h: * platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSession dealloc]): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm Diff Modified: trunk/Source/WebCore/ChangeLog (198565 => 198566) --- trunk/Source/WebCore/ChangeLog 2016-03-23 00:19:47 UTC (rev 198565) +++ trunk/Source/WebCore/ChangeLog 2016-03-23 00:47:41 UTC (rev 198566) @@ -1,3 +1,18 @@ +2016-03-22 Jer Noble + +CachedResource::MediaResource types shouldn't be blocked due to mixed-content. +https://bugs.webkit.org/show_bug.cgi?id=155588 + + +Reviewed by Brent Fulgham. + +Follow-up to address crashes caused by r198549. Rather than destroy MediaResourceLoader on a background thread, +migrate the Ref to the main thread before releasing. + +* platform/graphics/PlatformMediaResourceLoader.h: +* platform/network/cocoa/WebCoreNSURLSession.mm: +(-[WebCoreNSURLSession dealloc]): + 2016-03-22 John Wilander Restrict WebSockets header parsing according to RFC6455 and RFC7230. Based on Lamarque V. Souza's original patch. Modified: trunk/Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h (198565 => 198566) --- trunk/Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h 2016-03-23 00:19:47 UTC (rev 198565) +++ trunk/Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h 2016-03-23 00:47:41 UTC (rev 198566) @@ -30,6 +30,7 @@ #include #include +#include namespace WebCore { @@ -55,7 +56,7 @@ #endif }; -class PlatformMediaResourceLoader : public RefCounted { +class PlatformMediaResourceLoader : public ThreadSafeRefCounted { WTF_MAKE_NONCOPYABLE(PlatformMediaResourceLoader); WTF_MAKE_FAST_ALLOCATED; public: enum LoadOption { Modified: trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm (198565 => 198566) --- trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm 2016-03-23 00:19:47 UTC (rev 198565) +++ trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm 2016-03-23 00:47:41 UTC (rev 198566) @@ -91,6 +91,12 @@ { for (auto& task : _dataTasks) task.get().session = nil; + +// FIXME(C++14): When we can move RefPtrs directly into blocks, replace this with a RefPtr&&: +WebCore::PlatformMediaResourceLoader* loader = _loader.leakRef(); +callOnMainThread([loader] { +loader->deref(); +}); [super dealloc]; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198608] trunk/Tools
Title: [198608] trunk/Tools Revision 198608 Author jer.no...@apple.com Date 2016-03-23 17:42:04 -0700 (Wed, 23 Mar 2016) Log Message [ios-sim] RequiresUserActionForPlaybackTest.DoesNotRequireUserActionForMediaPlayback and RequiresUserActionForVideoButNotAudioPlayback failing https://bugs.webkit.org/show_bug.cgi?id=155764 Reviewed by Eric Carlson. Remove the requirement for media elements to have webkit-playsinline attributes on iOS. * TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm: (RequiresUserActionForPlaybackTest::SetUp): Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm Diff Modified: trunk/Tools/ChangeLog (198607 => 198608) --- trunk/Tools/ChangeLog 2016-03-24 00:13:24 UTC (rev 198607) +++ trunk/Tools/ChangeLog 2016-03-24 00:42:04 UTC (rev 198608) @@ -1,3 +1,15 @@ +2016-03-23 Jer Noble + +[ios-sim] RequiresUserActionForPlaybackTest.DoesNotRequireUserActionForMediaPlayback and RequiresUserActionForVideoButNotAudioPlayback failing +https://bugs.webkit.org/show_bug.cgi?id=155764 + +Reviewed by Eric Carlson. + +Remove the requirement for media elements to have webkit-playsinline attributes on iOS. + +* TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm: +(RequiresUserActionForPlaybackTest::SetUp): + 2016-03-23 Anders Carlsson Crash when using KVO from within -[WebView initWithCoder:] Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm (198607 => 198608) --- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm 2016-03-24 00:13:24 UTC (rev 198607) +++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm 2016-03-24 00:42:04 UTC (rev 198608) @@ -76,6 +76,7 @@ configuration.get()._mediaDataLoadsAutomatically = YES; #if TARGET_OS_IPHONE configuration.get().allowsInlineMediaPlayback = YES; +configuration.get()._inlineMediaPlaybackRequiresPlaysInlineAttribute = NO; configuration.get().requiresUserActionForMediaPlayback = NO; #endif } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198609] trunk
Title: [198609] trunk Revision 198609 Author jer.no...@apple.com Date 2016-03-23 17:43:39 -0700 (Wed, 23 Mar 2016) Log Message Media elements allowed to play without a user gesture, but requiring fullscreen playback, should not be allowed to autoplay. https://bugs.webkit.org/show_bug.cgi?id=155599 Reviewed by Darin Adler. Test: media/video-autoplay-allowed-but-fullscreen-required.html Entering fullscreen should always require a user gesture. * html/MediaElementSession.cpp: (WebCore::MediaElementSession::playbackPermitted): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/MediaElementSession.cpp Added Paths trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html Diff Added: trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt (0 => 198609) --- trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt (rev 0) +++ trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required-expected.txt 2016-03-24 00:43:39 UTC (rev 198609) @@ -0,0 +1,5 @@ +RUN(internals.settings.setAllowsInlineMediaPlayback(false)) +EVENT(canplaythrough) +Video did not begin playing OK +END OF TEST + Added: trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html (0 => 198609) --- trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html (rev 0) +++ trunk/LayoutTests/media/video-autoplay-allowed-but-fullscreen-required.html 2016-03-24 00:43:39 UTC (rev 198609) @@ -0,0 +1,31 @@ + + + +video-main-content-allow + +function go() { +run('internals.settings.setAllowsInlineMediaPlayback(false)'); +video = document.createElement('video'); +document.body.appendChild(video); + +video.src = "" 'content/test'); +waitForEvent('canplaythrough', canPlayThrough); +} + +function canPlayThrough() { +video.play(); +waitForEventAndFail('playing'); +setTimeout(didNotPlay, 100); +} + +function didNotPlay() { +logResult(true, "Video did not begin playing"); +endTest(); +} + + + + + \ No newline at end of file Modified: trunk/Source/WebCore/ChangeLog (198608 => 198609) --- trunk/Source/WebCore/ChangeLog 2016-03-24 00:42:04 UTC (rev 198608) +++ trunk/Source/WebCore/ChangeLog 2016-03-24 00:43:39 UTC (rev 198609) @@ -1,3 +1,17 @@ +2016-03-23 Jer Noble + +Media elements allowed to play without a user gesture, but requiring fullscreen playback, should not be allowed to autoplay. +https://bugs.webkit.org/show_bug.cgi?id=155599 + +Reviewed by Darin Adler. + +Test: media/video-autoplay-allowed-but-fullscreen-required.html + +Entering fullscreen should always require a user gesture. + +* html/MediaElementSession.cpp: +(WebCore::MediaElementSession::playbackPermitted): + 2016-03-23 Commit Queue Unreviewed, rolling out r198538. Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (198608 => 198609) --- trunk/Source/WebCore/html/MediaElementSession.cpp 2016-03-24 00:42:04 UTC (rev 198608) +++ trunk/Source/WebCore/html/MediaElementSession.cpp 2016-03-24 00:43:39 UTC (rev 198609) @@ -146,6 +146,11 @@ if (pageExplicitlyAllowsElementToAutoplayInline(element)) return true; +if (requiresFullscreenForVideoPlayback(element) && !ScriptController::processingUserGestureForMedia()) { +LOG(Media, "MediaElementSession::playbackPermitted - returning FALSE"); +return false; +} + if (m_restrictions & OverrideUserGestureRequirementForMainContent && updateIsMainContent()) return true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198637] trunk/Source/WebCore
Title: [198637] trunk/Source/WebCore Revision 198637 Author jer.no...@apple.com Date 2016-03-24 11:42:04 -0700 (Thu, 24 Mar 2016) Log Message REGRESSION(r189129): elements do not have playback controls on iOS. https://bugs.webkit.org/show_bug.cgi?id=155808 Reviewed by Eric Carlson. Audio elements should never require fullscreen for playback. * html/MediaElementSession.cpp: (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/MediaElementSession.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (198636 => 198637) --- trunk/Source/WebCore/ChangeLog 2016-03-24 18:14:54 UTC (rev 198636) +++ trunk/Source/WebCore/ChangeLog 2016-03-24 18:42:04 UTC (rev 198637) @@ -1,3 +1,16 @@ +2016-03-24 Jer Noble + +REGRESSION(r189129): elements do not have playback controls on iOS. +https://bugs.webkit.org/show_bug.cgi?id=155808 + + +Reviewed by Eric Carlson. + +Audio elements should never require fullscreen for playback. + +* html/MediaElementSession.cpp: +(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): + 2016-03-24 Alex Christensen Clean up cookie jar after r198195 Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (198636 => 198637) --- trunk/Source/WebCore/html/MediaElementSession.cpp 2016-03-24 18:14:54 UTC (rev 198636) +++ trunk/Source/WebCore/html/MediaElementSession.cpp 2016-03-24 18:42:04 UTC (rev 198637) @@ -34,6 +34,7 @@ #include "Document.h" #include "Frame.h" #include "FrameView.h" +#include "HTMLAudioElement.h" #include "HTMLMediaElement.h" #include "HTMLMediaElementEnums.h" #include "HTMLNames.h" @@ -393,6 +394,9 @@ if (pageExplicitlyAllowsElementToAutoplayInline(element)) return false; +if (is(element)) +return false; + Settings* settings = element.document().settings(); if (!settings || !settings->allowsInlineMediaPlayback()) return true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [198646] trunk/Source/WebCore
Title: [198646] trunk/Source/WebCore Revision 198646 Author jer.no...@apple.com Date 2016-03-24 15:27:45 -0700 (Thu, 24 Mar 2016) Log Message [MSE] Make calling HTMLMediaElement.buffered less expensive https://bugs.webkit.org/show_bug.cgi?id=155846 Reviewed by Eric Carlson. The MSE specification requires a new TimeRanges object be returned when calling HTMLMediaElement.buffered. Additionally, the requirements for generating the buffered time ranges for MediaSource and its constituent SourceBuffers are specific and expensive. Rather than perform all these steps each time HTMLMediaElement.buffered is queried, cache the final result and only regenerate the cached value if the buffered ranges of the consituent SourceBuffers has changed. Also, make copying a PlatformTimeRanges more efficient by doing a straight vector-to-vector copy of the PlatformTimeRange's data. * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::buffered): (WebCore::MediaSource::regenerateActiveSourceBuffers): * Modules/mediasource/MediaSource.h: * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::removeCodedFrames): (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): * Modules/mediasource/SourceBuffer.h: * platform/graphics/PlatformTimeRanges.cpp: (WebCore::PlatformTimeRanges::PlatformTimeRanges): Deleted. (WebCore::PlatformTimeRanges::operator=): Deleted. (WebCore::PlatformTimeRanges::copy): Deleted. * platform/graphics/PlatformTimeRanges.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp trunk/Source/WebCore/Modules/mediasource/MediaSource.h trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h trunk/Source/WebCore/platform/graphics/PlatformTimeRanges.cpp trunk/Source/WebCore/platform/graphics/PlatformTimeRanges.h Diff Modified: trunk/Source/WebCore/ChangeLog (198645 => 198646) --- trunk/Source/WebCore/ChangeLog 2016-03-24 22:20:52 UTC (rev 198645) +++ trunk/Source/WebCore/ChangeLog 2016-03-24 22:27:45 UTC (rev 198646) @@ -1,5 +1,36 @@ 2016-03-24 Jer Noble +[MSE] Make calling HTMLMediaElement.buffered less expensive +https://bugs.webkit.org/show_bug.cgi?id=155846 + +Reviewed by Eric Carlson. + +The MSE specification requires a new TimeRanges object be returned when calling +HTMLMediaElement.buffered. Additionally, the requirements for generating the buffered time +ranges for MediaSource and its constituent SourceBuffers are specific and expensive. Rather +than perform all these steps each time HTMLMediaElement.buffered is queried, cache the final +result and only regenerate the cached value if the buffered ranges of the consituent +SourceBuffers has changed. + +Also, make copying a PlatformTimeRanges more efficient by doing a straight vector-to-vector +copy of the PlatformTimeRange's data. + +* Modules/mediasource/MediaSource.cpp: +(WebCore::MediaSource::buffered): +(WebCore::MediaSource::regenerateActiveSourceBuffers): +* Modules/mediasource/MediaSource.h: +* Modules/mediasource/SourceBuffer.cpp: +(WebCore::SourceBuffer::removeCodedFrames): +(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): +* Modules/mediasource/SourceBuffer.h: +* platform/graphics/PlatformTimeRanges.cpp: +(WebCore::PlatformTimeRanges::PlatformTimeRanges): Deleted. +(WebCore::PlatformTimeRanges::operator=): Deleted. +(WebCore::PlatformTimeRanges::copy): Deleted. +* platform/graphics/PlatformTimeRanges.h: + +2016-03-24 Jer Noble + REGRESSION(r189129): elements do not have playback controls on iOS. https://bugs.webkit.org/show_bug.cgi?id=155808 Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (198645 => 198646) --- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2016-03-24 22:20:52 UTC (rev 198645) +++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2016-03-24 22:27:45 UTC (rev 198646) @@ -141,13 +141,20 @@ std::unique_ptr MediaSource::buffered() const { +if (m_buffered && m_activeSourceBuffers->length() && std::all_of(m_activeSourceBuffers->begin(), m_activeSourceBuffers->end(), [] (RefPtr& buffer) { return !buffer->isBufferedDirty(); })) +return std::make_unique(*m_buffered); + +m_buffered = std::make_unique(); +for (auto& sourceBuffer : *m_activeSourceBuffers) +sourceBuffer->setBufferedDirty(false); + // Implements MediaSource algorithm for HTMLMediaElement.buffered. // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#htmlmediaelement-extensions Vector activeRanges = this->activeRanges(); // 1. If activeSourceBuffers.length equals 0 then return an empty TimeRanges o