Diff
Modified: trunk/LayoutTests/ChangeLog (206145 => 206146)
--- trunk/LayoutTests/ChangeLog 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/ChangeLog 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1,3 +1,16 @@
+2016-09-20 Jer Noble <jer.no...@apple.com>
+
+ [media-source] Support MediaSource.setLiveSeekableRanges()
+ https://bugs.webkit.org/show_bug.cgi?id=162252
+
+ Reviewed by Sam Weinig.
+
+ * platform/mac/TestExpectations:
+ * platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt:
+ * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
+ * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+ * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+
2016-09-19 Devin Rousso <dcrousso+web...@gmail.com>
Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/css
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (206145 => 206146)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1,3 +1,12 @@
+2016-09-20 Jer Noble <jer.no...@apple.com>
+
+ [media-source] Support MediaSource.setLiveSeekableRanges()
+ https://bugs.webkit.org/show_bug.cgi?id=162252
+
+ Reviewed by Sam Weinig.
+
+ * web-platform-tests/media-source/interfaces-expected.txt:
+
2016-09-19 Chris Dumez <cdu...@apple.com>
Add support for HTMLSourceElement.prototype.sizes / HTMLSourceElement.prototype.srcset
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt (206145 => 206146)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1,6 +1,5 @@
PASS URL interface: operation createObjectURL(MediaSource)
-PASS HTMLVideoElement interface: operation getVideoPlaybackQuality()
PASS AudioTrack interface: attribute sourceBuffer
PASS VideoTrack interface: attribute sourceBuffer
PASS TextTrack interface: attribute sourceBuffer
@@ -67,12 +66,9 @@
PASS SourceBuffer interface: attribute onupdateend
PASS SourceBuffer interface: attribute onerror
PASS SourceBuffer interface: attribute onabort
-PASS SourceBuffer interface: operation appendBuffer(ArrayBuffer)
-PASS SourceBuffer interface: operation appendBuffer(ArrayBufferView)
-PASS SourceBuffer interface: operation appendStream(ReadableStream,unsigned long long)
+PASS SourceBuffer interface: operation appendBuffer(BufferSource)
PASS SourceBuffer interface: operation abort()
PASS SourceBuffer interface: operation remove(double,unrestricted double)
-PASS SourceBuffer interface: attribute trackDefaults
PASS SourceBuffer must be primary interface of sourceBuffer
PASS Stringification of sourceBuffer
PASS SourceBuffer interface: sourceBuffer must inherit property "mode" with the proper type (0)
@@ -90,15 +86,10 @@
PASS SourceBuffer interface: sourceBuffer must inherit property "onerror" with the proper type (12)
PASS SourceBuffer interface: sourceBuffer must inherit property "onabort" with the proper type (13)
PASS SourceBuffer interface: sourceBuffer must inherit property "appendBuffer" with the proper type (14)
-PASS SourceBuffer interface: calling appendBuffer(ArrayBuffer) on sourceBuffer with too few arguments must throw TypeError
-PASS SourceBuffer interface: sourceBuffer must inherit property "appendBuffer" with the proper type (15)
-PASS SourceBuffer interface: calling appendBuffer(ArrayBufferView) on sourceBuffer with too few arguments must throw TypeError
-PASS SourceBuffer interface: sourceBuffer must inherit property "appendStream" with the proper type (16)
-PASS SourceBuffer interface: calling appendStream(ReadableStream,unsigned long long) on sourceBuffer with too few arguments must throw TypeError
-PASS SourceBuffer interface: sourceBuffer must inherit property "abort" with the proper type (17)
-PASS SourceBuffer interface: sourceBuffer must inherit property "remove" with the proper type (18)
+PASS SourceBuffer interface: calling appendBuffer(BufferSource) on sourceBuffer with too few arguments must throw TypeError
+PASS SourceBuffer interface: sourceBuffer must inherit property "abort" with the proper type (15)
+PASS SourceBuffer interface: sourceBuffer must inherit property "remove" with the proper type (16)
PASS SourceBuffer interface: calling remove(double,unrestricted double) on sourceBuffer with too few arguments must throw TypeError
-PASS SourceBuffer interface: sourceBuffer must inherit property "trackDefaults" with the proper type (19)
PASS EventTarget interface: sourceBuffer must inherit property "addEventListener" with the proper type (0)
PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on sourceBuffer with too few arguments must throw TypeError
PASS EventTarget interface: sourceBuffer must inherit property "removeEventListener" with the proper type (1)
@@ -124,40 +115,4 @@
PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on mediaSource.sourceBuffers with too few arguments must throw TypeError
PASS EventTarget interface: mediaSource.sourceBuffers must inherit property "dispatchEvent" with the proper type (2)
PASS EventTarget interface: calling dispatchEvent(Event) on mediaSource.sourceBuffers with too few arguments must throw TypeError
-PASS VideoPlaybackQuality interface: existence and properties of interface object
-PASS VideoPlaybackQuality interface object length
-PASS VideoPlaybackQuality interface object name
-PASS VideoPlaybackQuality interface: existence and properties of interface prototype object
-PASS VideoPlaybackQuality interface: existence and properties of interface prototype object's "constructor" property
-PASS VideoPlaybackQuality interface: attribute creationTime
-PASS VideoPlaybackQuality interface: attribute totalVideoFrames
-PASS VideoPlaybackQuality interface: attribute droppedVideoFrames
-PASS VideoPlaybackQuality interface: attribute corruptedVideoFrames
-PASS VideoPlaybackQuality interface: attribute totalFrameDelay
-PASS VideoPlaybackQuality must be primary interface of video.getVideoPlaybackQuality()
-PASS Stringification of video.getVideoPlaybackQuality()
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "creationTime" with the proper type (0)
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "totalVideoFrames" with the proper type (1)
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "droppedVideoFrames" with the proper type (2)
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "corruptedVideoFrames" with the proper type (3)
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property "totalFrameDelay" with the proper type (4)
-PASS TrackDefault interface: existence and properties of interface object
-PASS TrackDefault interface object length
-PASS TrackDefault interface object name
-PASS TrackDefault interface: existence and properties of interface prototype object
-PASS TrackDefault interface: existence and properties of interface prototype object's "constructor" property
-PASS TrackDefault interface: attribute type
-PASS TrackDefault interface: attribute byteStreamTrackID
-PASS TrackDefault interface: attribute language
-PASS TrackDefault interface: attribute label
-PASS TrackDefault interface: operation getKinds()
-PASS TrackDefaultList interface: existence and properties of interface object
-PASS TrackDefaultList interface object length
-PASS TrackDefaultList interface object name
-PASS TrackDefaultList interface: existence and properties of interface prototype object
-PASS TrackDefaultList interface: existence and properties of interface prototype object's "constructor" property
-PASS TrackDefaultList interface: attribute length
-PASS TrackDefaultList must be primary interface of sourceBuffer.trackDefaults
-PASS Stringification of sourceBuffer.trackDefaults
-PASS TrackDefaultList interface: sourceBuffer.trackDefaults must inherit property "length" with the proper type (0)
Modified: trunk/LayoutTests/platform/mac/TestExpectations (206145 => 206146)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1058,6 +1058,7 @@
[ 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-liveseekable.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 ]
@@ -1066,6 +1067,9 @@
[ 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 ]
+# Passes, but will need rebaselining once <https://github.com/w3c/web-platform-tests/pull/3758> is merged
+[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/interfaces.html [ Pass ]
+
# 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 ]
Copied: trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt (from rev 206145, trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt) (0 => 206146)
--- trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt 2016-09-20 15:26:19 UTC (rev 206146)
@@ -0,0 +1,118 @@
+
+PASS URL interface: operation createObjectURL(MediaSource)
+PASS AudioTrack interface: attribute sourceBuffer
+PASS VideoTrack interface: attribute sourceBuffer
+PASS TextTrack interface: attribute sourceBuffer
+PASS MediaSource interface: existence and properties of interface object
+PASS MediaSource interface object length
+PASS MediaSource interface object name
+PASS MediaSource interface: existence and properties of interface prototype object
+PASS MediaSource interface: existence and properties of interface prototype object's "constructor" property
+PASS MediaSource interface: attribute sourceBuffers
+PASS MediaSource interface: attribute activeSourceBuffers
+PASS MediaSource interface: attribute readyState
+PASS MediaSource interface: attribute duration
+PASS MediaSource interface: attribute onsourceopen
+PASS MediaSource interface: attribute onsourceended
+PASS MediaSource interface: attribute onsourceclose
+PASS MediaSource interface: operation addSourceBuffer(DOMString)
+PASS MediaSource interface: operation removeSourceBuffer(SourceBuffer)
+PASS MediaSource interface: operation endOfStream(EndOfStreamError)
+PASS MediaSource interface: operation setLiveSeekableRange(double,double)
+PASS MediaSource interface: operation clearLiveSeekableRange()
+PASS MediaSource interface: operation isTypeSupported(DOMString)
+PASS MediaSource must be primary interface of mediaSource
+PASS Stringification of mediaSource
+PASS MediaSource interface: mediaSource must inherit property "sourceBuffers" with the proper type (0)
+PASS MediaSource interface: mediaSource must inherit property "activeSourceBuffers" with the proper type (1)
+PASS MediaSource interface: mediaSource must inherit property "readyState" with the proper type (2)
+PASS MediaSource interface: mediaSource must inherit property "duration" with the proper type (3)
+FAIL MediaSource interface: mediaSource must inherit property "onsourceopen" with the proper type (4) Unrecognized type EventHandler
+FAIL MediaSource interface: mediaSource must inherit property "onsourceended" with the proper type (5) Unrecognized type EventHandler
+FAIL MediaSource interface: mediaSource must inherit property "onsourceclose" with the proper type (6) Unrecognized type EventHandler
+PASS MediaSource interface: mediaSource must inherit property "addSourceBuffer" with the proper type (7)
+PASS MediaSource interface: calling addSourceBuffer(DOMString) on mediaSource with too few arguments must throw TypeError
+PASS MediaSource interface: mediaSource must inherit property "removeSourceBuffer" with the proper type (8)
+PASS MediaSource interface: calling removeSourceBuffer(SourceBuffer) on mediaSource with too few arguments must throw TypeError
+PASS MediaSource interface: mediaSource must inherit property "endOfStream" with the proper type (9)
+PASS MediaSource interface: calling endOfStream(EndOfStreamError) on mediaSource with too few arguments must throw TypeError
+PASS MediaSource interface: mediaSource must inherit property "setLiveSeekableRange" with the proper type (10)
+PASS MediaSource interface: calling setLiveSeekableRange(double,double) on mediaSource with too few arguments must throw TypeError
+PASS MediaSource interface: mediaSource must inherit property "clearLiveSeekableRange" with the proper type (11)
+PASS MediaSource interface: mediaSource must inherit property "isTypeSupported" with the proper type (12)
+PASS MediaSource interface: calling isTypeSupported(DOMString) on mediaSource with too few arguments must throw TypeError
+PASS EventTarget interface: mediaSource must inherit property "addEventListener" with the proper type (0)
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on mediaSource with too few arguments must throw TypeError
+PASS EventTarget interface: mediaSource must inherit property "removeEventListener" with the proper type (1)
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on mediaSource with too few arguments must throw TypeError
+PASS EventTarget interface: mediaSource must inherit property "dispatchEvent" with the proper type (2)
+PASS EventTarget interface: calling dispatchEvent(Event) on mediaSource with too few arguments must throw TypeError
+PASS SourceBuffer interface: existence and properties of interface object
+PASS SourceBuffer interface object length
+PASS SourceBuffer interface object name
+PASS SourceBuffer interface: existence and properties of interface prototype object
+PASS SourceBuffer interface: existence and properties of interface prototype object's "constructor" property
+PASS SourceBuffer interface: attribute mode
+PASS SourceBuffer interface: attribute updating
+PASS SourceBuffer interface: attribute buffered
+PASS SourceBuffer interface: attribute timestampOffset
+PASS SourceBuffer interface: attribute audioTracks
+PASS SourceBuffer interface: attribute videoTracks
+PASS SourceBuffer interface: attribute textTracks
+PASS SourceBuffer interface: attribute appendWindowStart
+PASS SourceBuffer interface: attribute appendWindowEnd
+PASS SourceBuffer interface: attribute onupdatestart
+PASS SourceBuffer interface: attribute onupdate
+PASS SourceBuffer interface: attribute onupdateend
+PASS SourceBuffer interface: attribute onerror
+PASS SourceBuffer interface: attribute onabort
+PASS SourceBuffer interface: operation appendBuffer(BufferSource)
+PASS SourceBuffer interface: operation abort()
+PASS SourceBuffer interface: operation remove(double,unrestricted double)
+PASS SourceBuffer must be primary interface of sourceBuffer
+PASS Stringification of sourceBuffer
+PASS SourceBuffer interface: sourceBuffer must inherit property "mode" with the proper type (0)
+PASS SourceBuffer interface: sourceBuffer must inherit property "updating" with the proper type (1)
+PASS SourceBuffer interface: sourceBuffer must inherit property "buffered" with the proper type (2)
+PASS SourceBuffer interface: sourceBuffer must inherit property "timestampOffset" with the proper type (3)
+PASS SourceBuffer interface: sourceBuffer must inherit property "audioTracks" with the proper type (4)
+PASS SourceBuffer interface: sourceBuffer must inherit property "videoTracks" with the proper type (5)
+PASS SourceBuffer interface: sourceBuffer must inherit property "textTracks" with the proper type (6)
+PASS SourceBuffer interface: sourceBuffer must inherit property "appendWindowStart" with the proper type (7)
+PASS SourceBuffer interface: sourceBuffer must inherit property "appendWindowEnd" with the proper type (8)
+FAIL SourceBuffer interface: sourceBuffer must inherit property "onupdatestart" with the proper type (9) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property "onupdate" with the proper type (10) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property "onupdateend" with the proper type (11) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property "onerror" with the proper type (12) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property "onabort" with the proper type (13) Unrecognized type EventHandler
+PASS SourceBuffer interface: sourceBuffer must inherit property "appendBuffer" with the proper type (14)
+PASS SourceBuffer interface: calling appendBuffer(BufferSource) on sourceBuffer with too few arguments must throw TypeError
+PASS SourceBuffer interface: sourceBuffer must inherit property "abort" with the proper type (15)
+PASS SourceBuffer interface: sourceBuffer must inherit property "remove" with the proper type (16)
+PASS SourceBuffer interface: calling remove(double,unrestricted double) on sourceBuffer with too few arguments must throw TypeError
+PASS EventTarget interface: sourceBuffer must inherit property "addEventListener" with the proper type (0)
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on sourceBuffer with too few arguments must throw TypeError
+PASS EventTarget interface: sourceBuffer must inherit property "removeEventListener" with the proper type (1)
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on sourceBuffer with too few arguments must throw TypeError
+PASS EventTarget interface: sourceBuffer must inherit property "dispatchEvent" with the proper type (2)
+PASS EventTarget interface: calling dispatchEvent(Event) on sourceBuffer with too few arguments must throw TypeError
+PASS SourceBufferList interface: existence and properties of interface object
+PASS SourceBufferList interface object length
+PASS SourceBufferList interface object name
+PASS SourceBufferList interface: existence and properties of interface prototype object
+PASS SourceBufferList interface: existence and properties of interface prototype object's "constructor" property
+PASS SourceBufferList interface: attribute length
+PASS SourceBufferList interface: attribute onaddsourcebuffer
+PASS SourceBufferList interface: attribute onremovesourcebuffer
+PASS SourceBufferList must be primary interface of mediaSource.sourceBuffers
+PASS Stringification of mediaSource.sourceBuffers
+PASS SourceBufferList interface: mediaSource.sourceBuffers must inherit property "length" with the proper type (0)
+FAIL SourceBufferList interface: mediaSource.sourceBuffers must inherit property "onaddsourcebuffer" with the proper type (1) Unrecognized type EventHandler
+FAIL SourceBufferList interface: mediaSource.sourceBuffers must inherit property "onremovesourcebuffer" with the proper type (2) Unrecognized type EventHandler
+PASS EventTarget interface: mediaSource.sourceBuffers must inherit property "addEventListener" with the proper type (0)
+PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on mediaSource.sourceBuffers with too few arguments must throw TypeError
+PASS EventTarget interface: mediaSource.sourceBuffers must inherit property "removeEventListener" with the proper type (1)
+PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on mediaSource.sourceBuffers with too few arguments must throw TypeError
+PASS EventTarget interface: mediaSource.sourceBuffers must inherit property "dispatchEvent" with the proper type (2)
+PASS EventTarget interface: calling dispatchEvent(Event) on mediaSource.sourceBuffers with too few arguments must throw TypeError
+
Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (206145 => 206146)
--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1998,6 +1998,16 @@
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').value is SourceBuffer
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').value is SourceBufferList
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt (206145 => 206146)
--- trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1983,6 +1983,16 @@
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').value is SourceBuffer
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').value is SourceBufferList
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (206145 => 206146)
--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1998,6 +1998,16 @@
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').value is SourceBuffer
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBuffer').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').value is SourceBufferList
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'SourceBufferList').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('set') is false
Modified: trunk/Source/WebCore/ChangeLog (206145 => 206146)
--- trunk/Source/WebCore/ChangeLog 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/Source/WebCore/ChangeLog 2016-09-20 15:26:19 UTC (rev 206146)
@@ -1,3 +1,32 @@
+2016-09-20 Jer Noble <jer.no...@apple.com>
+
+ [media-source] Support MediaSource.setLiveSeekableRanges()
+ https://bugs.webkit.org/show_bug.cgi?id=162252
+
+ Reviewed by Sam Weinig.
+
+ Fixes tests: imported/w3c/web-platform-tests/media-source/interfaces.html
+ imported/w3c/web-platform-tests/media-source/mediasource-liveseekable.html
+
+ Add support for a new part of the Media Source specification, the ability for clients to
+ specify the seekable ranges for a MediaSource-backed HTMLMediaElement.
+
+ Adding the live-seekable methods to MediaSource fixes a large number of the interfaces.html
+ tests, and the rest are fixed by adding on<event> handlers to MediaSource, SourceBuffer,
+ and SourceBufferList.
+
+ * Modules/mediasource/MediaSource.cpp:
+ (WebCore::MediaSource::seekable):
+ (WebCore::MediaSource::setLiveSeekableRange):
+ (WebCore::MediaSource::clearLiveSeekableRange):
+ * Modules/mediasource/MediaSource.h:
+ * Modules/mediasource/MediaSource.idl:
+ * Modules/mediasource/SourceBuffer.idl:
+ * Modules/mediasource/SourceBufferList.idl:
+ * Modules/mediasource/VideoPlaybackQuality.idl:
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::seekable):
+
2016-09-20 Per Arne Vollan <pvol...@apple.com>
[Win] Unreviewed warning fix.
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (206145 => 206146)
--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2016-09-20 15:26:19 UTC (rev 206146)
@@ -261,6 +261,81 @@
monitorSourceBuffers();
}
+Ref<TimeRanges> MediaSource::seekable()
+{
+ // 6. HTMLMediaElement Extensions, seekable
+ // W3C Editor's Draft 16 September 2016
+ // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#htmlmediaelement-extensions
+
+ // ↳ If duration equals NaN:
+ // Return an empty TimeRanges object.
+ if (m_duration.isInvalid())
+ return TimeRanges::create();
+
+ // ↳ If duration equals positive Infinity:
+ if (m_duration.isPositiveInfinite()) {
+ auto buffered = this->buffered();
+ // If live seekable range is not empty:
+ if (m_liveSeekable && m_liveSeekable->length()) {
+ // Let union ranges be the union of live seekable range and the HTMLMediaElement.buffered attribute.
+ buffered->unionWith(*m_liveSeekable);
+ // Return a single range with a start time equal to the earliest start time in union ranges
+ // and an end time equal to the highest end time in union ranges and abort these steps.
+ buffered->add(buffered->start(0), buffered->maximumBufferedTime());
+ return TimeRanges::create(*buffered);
+ }
+
+ // If the HTMLMediaElement.buffered attribute returns an empty TimeRanges object, then return
+ // an empty TimeRanges object and abort these steps.
+ if (!buffered->length())
+ return TimeRanges::create();
+
+ // Return a single range with a start time of 0 and an end time equal to the highest end time
+ // reported by the HTMLMediaElement.buffered attribute.
+ return TimeRanges::create({MediaTime::zeroTime(), buffered->maximumBufferedTime()});
+ }
+
+
+ // ↳ Otherwise:
+ // Return a single range with a start time of 0 and an end time equal to duration.
+ return TimeRanges::create({MediaTime::zeroTime(), m_duration});
+}
+
+void MediaSource::setLiveSeekableRange(double start, double end, ExceptionCode& ec)
+{
+ // W3C Editor's Draft 16 September 2016
+ // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-mediasource-setliveseekablerange
+
+ // If the readyState attribute is not "open" then throw an InvalidStateError exception and abort these steps.
+ if (!isOpen()) {
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+
+ // If start is negative or greater than end, then throw a TypeError exception and abort these steps.
+ if (start < 0 || start > end) {
+ ec = TypeError;
+ return;
+ }
+
+ // Set live seekable range to be a new normalized TimeRanges object containing a single range
+ // whose start position is start and end position is end.
+ m_liveSeekable = std::make_unique<PlatformTimeRanges>(MediaTime::createWithDouble(start), MediaTime::createWithDouble(end));
+}
+
+void MediaSource::clearLiveSeekableRange(ExceptionCode& ec)
+{
+ // W3C Editor's Draft 16 September 2016
+ // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-mediasource-clearliveseekablerange
+
+ // If the readyState attribute is not "open" then throw an InvalidStateError exception and abort these steps.
+ if (!isOpen()) {
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+ m_liveSeekable = nullptr;
+}
+
const MediaTime& MediaSource::currentTimeFudgeFactor()
{
// Allow hasCurrentTime() to be off by as much as the length of two 24fps video frames
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.h (206145 => 206146)
--- trunk/Source/WebCore/Modules/mediasource/MediaSource.h 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.h 2016-09-20 15:26:19 UTC (rev 206146)
@@ -82,7 +82,11 @@
void monitorSourceBuffers();
bool isSeeking() const { return m_pendingSeekTime.isValid(); }
void completeSeek();
+ Ref<TimeRanges> seekable();
+ void setLiveSeekableRange(double start, double end, ExceptionCode&);
+ void clearLiveSeekableRange(ExceptionCode&);
+
void setDuration(double, ExceptionCode&);
Optional<ExceptionCode> setDurationInternal(const MediaTime&);
MediaTime currentTime() const;
@@ -143,6 +147,7 @@
RefPtr<SourceBufferList> m_sourceBuffers;
RefPtr<SourceBufferList> m_activeSourceBuffers;
mutable std::unique_ptr<PlatformTimeRanges> m_buffered;
+ std::unique_ptr<PlatformTimeRanges> m_liveSeekable;
HTMLMediaElement* m_mediaElement;
MediaTime m_duration;
MediaTime m_pendingSeekTime;
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.idl (206145 => 206146)
--- trunk/Source/WebCore/Modules/mediasource/MediaSource.idl 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.idl 2016-09-20 15:26:19 UTC (rev 206146)
@@ -56,4 +56,11 @@
[RaisesException] void endOfStream(optional EndOfStreamError error);
static boolean isTypeSupported (DOMString type);
+
+ [RaisesException] void setLiveSeekableRange(double start, double end);
+ [RaisesException] void clearLiveSeekableRange();
+
+ attribute EventHandler onsourceopen;
+ attribute EventHandler onsourceended;
+ attribute EventHandler onsourceclose;
};
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl (206145 => 206146)
--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl 2016-09-20 15:26:19 UTC (rev 206146)
@@ -37,7 +37,6 @@
ActiveDOMObject,
Conditional=MEDIA_SOURCE,
ExportMacro=WEBCORE_EXPORT,
- NoInterfaceObject,
] interface SourceBuffer : EventTarget {
[SetterRaisesException] attribute AppendMode mode;
@@ -65,5 +64,11 @@
// Abort the current segment append sequence.
[RaisesException] void abort();
[RaisesException] void remove(unrestricted double start, unrestricted double end);
+
+ attribute EventHandler onupdatestart;
+ attribute EventHandler onupdate;
+ attribute EventHandler onupdateend;
+ attribute EventHandler onerror;
+ attribute EventHandler onabort;
};
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl (206145 => 206146)
--- trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl 2016-09-20 15:26:19 UTC (rev 206146)
@@ -30,11 +30,13 @@
[
Conditional=MEDIA_SOURCE,
- NoInterfaceObject,
GenerateIsReachable=Impl,
CallWith=ScriptExecutionContext,
] interface SourceBufferList : EventTarget {
readonly attribute unsigned long length;
getter SourceBuffer item(unsigned long index);
+
+ attribute EventHandler onaddsourcebuffer;
+ attribute EventHandler onremovesourcebuffer;
};
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (206145 => 206146)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-09-20 15:26:19 UTC (rev 206146)
@@ -4836,6 +4836,11 @@
Ref<TimeRanges> HTMLMediaElement::seekable() const
{
+#if ENABLE(MEDIA_SOURCE)
+ if (m_mediaSource)
+ return m_mediaSource->seekable();
+#endif
+
if (m_player)
return TimeRanges::create(*m_player->seekable());