<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206146] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206146">206146</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2016-09-20 08:26:19 -0700 (Tue, 20 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[media-source] Support MediaSource.setLiveSeekableRanges()
https://bugs.webkit.org/show_bug.cgi?id=162252

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/media-source/interfaces-expected.txt:

Source/WebCore:

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&lt;event&gt; 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):

LayoutTests:

* 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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsmediasourceinterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceMediaSourcecpp">trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceMediaSourceh">trunk/Source/WebCore/Modules/mediasource/MediaSource.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceMediaSourceidl">trunk/Source/WebCore/Modules/mediasource/MediaSource.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceSourceBufferidl">trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceSourceBufferListidl">trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacimportedw3cwebplatformtestsmediasourceinterfacesexpectedtxt">trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-20 09:08:42 UTC (rev 206145)
+++ trunk/LayoutTests/ChangeLog        2016-09-20 15:26:19 UTC (rev 206146)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-09-20  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        [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:
+
</ins><span class="cx"> 2016-09-19  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/css
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-09-20  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        [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:
+
</ins><span class="cx"> 2016-09-19  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for HTMLSourceElement.prototype.sizes / HTMLSourceElement.prototype.srcset
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsmediasourceinterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> 
</span><span class="cx"> PASS URL interface: operation createObjectURL(MediaSource) 
</span><del>-PASS HTMLVideoElement interface: operation getVideoPlaybackQuality() 
</del><span class="cx"> PASS AudioTrack interface: attribute sourceBuffer 
</span><span class="cx"> PASS VideoTrack interface: attribute sourceBuffer 
</span><span class="cx"> PASS TextTrack interface: attribute sourceBuffer 
</span><span class="lines">@@ -67,12 +66,9 @@
</span><span class="cx"> PASS SourceBuffer interface: attribute onupdateend 
</span><span class="cx"> PASS SourceBuffer interface: attribute onerror 
</span><span class="cx"> PASS SourceBuffer interface: attribute onabort 
</span><del>-PASS SourceBuffer interface: operation appendBuffer(ArrayBuffer) 
-PASS SourceBuffer interface: operation appendBuffer(ArrayBufferView) 
-PASS SourceBuffer interface: operation appendStream(ReadableStream,unsigned long long) 
</del><ins>+PASS SourceBuffer interface: operation appendBuffer(BufferSource) 
</ins><span class="cx"> PASS SourceBuffer interface: operation abort() 
</span><span class="cx"> PASS SourceBuffer interface: operation remove(double,unrestricted double) 
</span><del>-PASS SourceBuffer interface: attribute trackDefaults 
</del><span class="cx"> PASS SourceBuffer must be primary interface of sourceBuffer 
</span><span class="cx"> PASS Stringification of sourceBuffer 
</span><span class="cx"> PASS SourceBuffer interface: sourceBuffer must inherit property &quot;mode&quot; with the proper type (0) 
</span><span class="lines">@@ -90,15 +86,10 @@
</span><span class="cx"> PASS SourceBuffer interface: sourceBuffer must inherit property &quot;onerror&quot; with the proper type (12) 
</span><span class="cx"> PASS SourceBuffer interface: sourceBuffer must inherit property &quot;onabort&quot; with the proper type (13) 
</span><span class="cx"> PASS SourceBuffer interface: sourceBuffer must inherit property &quot;appendBuffer&quot; with the proper type (14) 
</span><del>-PASS SourceBuffer interface: calling appendBuffer(ArrayBuffer) on sourceBuffer with too few arguments must throw TypeError 
-PASS SourceBuffer interface: sourceBuffer must inherit property &quot;appendBuffer&quot; 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 &quot;appendStream&quot; 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 &quot;abort&quot; with the proper type (17) 
-PASS SourceBuffer interface: sourceBuffer must inherit property &quot;remove&quot; with the proper type (18) 
</del><ins>+PASS SourceBuffer interface: calling appendBuffer(BufferSource) on sourceBuffer with too few arguments must throw TypeError 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;abort&quot; with the proper type (15) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;remove&quot; with the proper type (16) 
</ins><span class="cx"> PASS SourceBuffer interface: calling remove(double,unrestricted double) on sourceBuffer with too few arguments must throw TypeError 
</span><del>-PASS SourceBuffer interface: sourceBuffer must inherit property &quot;trackDefaults&quot; with the proper type (19) 
</del><span class="cx"> PASS EventTarget interface: sourceBuffer must inherit property &quot;addEventListener&quot; with the proper type (0) 
</span><span class="cx"> PASS EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on sourceBuffer with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: sourceBuffer must inherit property &quot;removeEventListener&quot; with the proper type (1) 
</span><span class="lines">@@ -124,40 +115,4 @@
</span><span class="cx"> PASS EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on mediaSource.sourceBuffers with too few arguments must throw TypeError 
</span><span class="cx"> PASS EventTarget interface: mediaSource.sourceBuffers must inherit property &quot;dispatchEvent&quot; with the proper type (2) 
</span><span class="cx"> PASS EventTarget interface: calling dispatchEvent(Event) on mediaSource.sourceBuffers with too few arguments must throw TypeError 
</span><del>-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 &quot;constructor&quot; 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 &quot;creationTime&quot; with the proper type (0) 
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property &quot;totalVideoFrames&quot; with the proper type (1) 
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property &quot;droppedVideoFrames&quot; with the proper type (2) 
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property &quot;corruptedVideoFrames&quot; with the proper type (3) 
-PASS VideoPlaybackQuality interface: video.getVideoPlaybackQuality() must inherit property &quot;totalFrameDelay&quot; 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 &quot;constructor&quot; 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 &quot;constructor&quot; 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 &quot;length&quot; with the proper type (0) 
</del><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1058,6 +1058,7 @@
</span><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-duration.html [ Pass ]
</span><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-endofstream-invaliderror.html [ Pass ]
</span><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html [ Pass ]
</span><ins>+[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-liveseekable.html [ Pass ]
</ins><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-multiple-attach.html [ Pass ]
</span><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play-then-seek-back.html [ Pass ]
</span><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-play.html [ Pass ]
</span><span class="lines">@@ -1066,6 +1067,9 @@
</span><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-sourcebufferlist.html [ Pass ]
</span><span class="cx"> [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-timestamp-offset.html [ Pass ]
</span><span class="cx"> 
</span><ins>+# Passes, but will need rebaselining once &lt;https://github.com/w3c/web-platform-tests/pull/3758&gt; is merged
+[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/interfaces.html [ Pass ]
+
</ins><span class="cx"> # Newly failing Media Source tests
</span><span class="cx"> webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ]
</span><span class="cx"> webkit.org/b/161725 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html [ Failure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacimportedw3cwebplatformtestsmediasourceinterfacesexpectedtxtfromrev206145trunkLayoutTestsimportedw3cwebplatformtestsmediasourceinterfacesexpectedtxt"></a>
<div class="copfile"><h4>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)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,118 @@
</span><ins>+
+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 &quot;constructor&quot; 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 &quot;sourceBuffers&quot; with the proper type (0) 
+PASS MediaSource interface: mediaSource must inherit property &quot;activeSourceBuffers&quot; with the proper type (1) 
+PASS MediaSource interface: mediaSource must inherit property &quot;readyState&quot; with the proper type (2) 
+PASS MediaSource interface: mediaSource must inherit property &quot;duration&quot; with the proper type (3) 
+FAIL MediaSource interface: mediaSource must inherit property &quot;onsourceopen&quot; with the proper type (4) Unrecognized type EventHandler
+FAIL MediaSource interface: mediaSource must inherit property &quot;onsourceended&quot; with the proper type (5) Unrecognized type EventHandler
+FAIL MediaSource interface: mediaSource must inherit property &quot;onsourceclose&quot; with the proper type (6) Unrecognized type EventHandler
+PASS MediaSource interface: mediaSource must inherit property &quot;addSourceBuffer&quot; 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 &quot;removeSourceBuffer&quot; 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 &quot;endOfStream&quot; 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 &quot;setLiveSeekableRange&quot; 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 &quot;clearLiveSeekableRange&quot; with the proper type (11) 
+PASS MediaSource interface: mediaSource must inherit property &quot;isTypeSupported&quot; 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 &quot;addEventListener&quot; 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 &quot;removeEventListener&quot; 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 &quot;dispatchEvent&quot; 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 &quot;constructor&quot; 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 &quot;mode&quot; with the proper type (0) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;updating&quot; with the proper type (1) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;buffered&quot; with the proper type (2) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;timestampOffset&quot; with the proper type (3) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;audioTracks&quot; with the proper type (4) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;videoTracks&quot; with the proper type (5) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;textTracks&quot; with the proper type (6) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;appendWindowStart&quot; with the proper type (7) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;appendWindowEnd&quot; with the proper type (8) 
+FAIL SourceBuffer interface: sourceBuffer must inherit property &quot;onupdatestart&quot; with the proper type (9) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property &quot;onupdate&quot; with the proper type (10) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property &quot;onupdateend&quot; with the proper type (11) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property &quot;onerror&quot; with the proper type (12) Unrecognized type EventHandler
+FAIL SourceBuffer interface: sourceBuffer must inherit property &quot;onabort&quot; with the proper type (13) Unrecognized type EventHandler
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;appendBuffer&quot; 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 &quot;abort&quot; with the proper type (15) 
+PASS SourceBuffer interface: sourceBuffer must inherit property &quot;remove&quot; 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 &quot;addEventListener&quot; 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 &quot;removeEventListener&quot; 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 &quot;dispatchEvent&quot; 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 &quot;constructor&quot; 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 &quot;length&quot; with the proper type (0) 
+FAIL SourceBufferList interface: mediaSource.sourceBuffers must inherit property &quot;onaddsourcebuffer&quot; with the proper type (1) Unrecognized type EventHandler
+FAIL SourceBufferList interface: mediaSource.sourceBuffers must inherit property &quot;onremovesourcebuffer&quot; with the proper type (2) Unrecognized type EventHandler
+PASS EventTarget interface: mediaSource.sourceBuffers must inherit property &quot;addEventListener&quot; 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 &quot;removeEventListener&quot; 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 &quot;dispatchEvent&quot; with the proper type (2) 
+PASS EventTarget interface: calling dispatchEvent(Event) on mediaSource.sourceBuffers with too few arguments must throw TypeError 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1998,6 +1998,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true
</span><ins>+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
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1983,6 +1983,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true
</span><ins>+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
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1998,6 +1998,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'ShadowRoot').configurable is true
</span><ins>+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
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').value is SpeechSynthesisEvent
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'SpeechSynthesisEvent').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2016-09-20  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        [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&lt;event&gt; 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):
+
</ins><span class="cx"> 2016-09-20  Per Arne Vollan  &lt;pvollan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Unreviewed warning fix.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -261,6 +261,81 @@
</span><span class="cx">     monitorSourceBuffers();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref&lt;TimeRanges&gt; 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-&gt;buffered();
+        // If live seekable range is not empty:
+        if (m_liveSeekable &amp;&amp; m_liveSeekable-&gt;length()) {
+            // Let union ranges be the union of live seekable range and the HTMLMediaElement.buffered attribute.
+            buffered-&gt;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-&gt;add(buffered-&gt;start(0), buffered-&gt;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-&gt;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-&gt;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&amp; 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 &quot;open&quot; 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 &lt; 0 || start &gt; 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&lt;PlatformTimeRanges&gt;(MediaTime::createWithDouble(start), MediaTime::createWithDouble(end));
+}
+
+void MediaSource::clearLiveSeekableRange(ExceptionCode&amp; 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 &quot;open&quot; then throw an InvalidStateError exception and abort these steps.
+    if (!isOpen()) {
+        ec = INVALID_STATE_ERR;
+        return;
+    }
+    m_liveSeekable = nullptr;
+}
+
</ins><span class="cx"> const MediaTime&amp; MediaSource::currentTimeFudgeFactor()
</span><span class="cx"> {
</span><span class="cx">     // Allow hasCurrentTime() to be off by as much as the length of two 24fps video frames
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceMediaSourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.h (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -82,7 +82,11 @@
</span><span class="cx">     void monitorSourceBuffers();
</span><span class="cx">     bool isSeeking() const { return m_pendingSeekTime.isValid(); }
</span><span class="cx">     void completeSeek();
</span><ins>+    Ref&lt;TimeRanges&gt; seekable();
+    void setLiveSeekableRange(double start, double end, ExceptionCode&amp;);
+    void clearLiveSeekableRange(ExceptionCode&amp;);
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx">     void setDuration(double, ExceptionCode&amp;);
</span><span class="cx">     Optional&lt;ExceptionCode&gt; setDurationInternal(const MediaTime&amp;);
</span><span class="cx">     MediaTime currentTime() const;
</span><span class="lines">@@ -143,6 +147,7 @@
</span><span class="cx">     RefPtr&lt;SourceBufferList&gt; m_sourceBuffers;
</span><span class="cx">     RefPtr&lt;SourceBufferList&gt; m_activeSourceBuffers;
</span><span class="cx">     mutable std::unique_ptr&lt;PlatformTimeRanges&gt; m_buffered;
</span><ins>+    std::unique_ptr&lt;PlatformTimeRanges&gt; m_liveSeekable;
</ins><span class="cx">     HTMLMediaElement* m_mediaElement;
</span><span class="cx">     MediaTime m_duration;
</span><span class="cx">     MediaTime m_pendingSeekTime;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceMediaSourceidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.idl (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -56,4 +56,11 @@
</span><span class="cx">     [RaisesException] void endOfStream(optional EndOfStreamError error);
</span><span class="cx"> 
</span><span class="cx">     static boolean isTypeSupported (DOMString type);
</span><ins>+
+    [RaisesException] void setLiveSeekableRange(double start, double end);
+    [RaisesException] void clearLiveSeekableRange();
+
+    attribute EventHandler onsourceopen;
+    attribute EventHandler onsourceended;
+    attribute EventHandler onsourceclose;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceSourceBufferidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx">     ActiveDOMObject,
</span><span class="cx">     Conditional=MEDIA_SOURCE,
</span><span class="cx">     ExportMacro=WEBCORE_EXPORT,
</span><del>-    NoInterfaceObject,
</del><span class="cx"> ] interface SourceBuffer : EventTarget {
</span><span class="cx"> 
</span><span class="cx">     [SetterRaisesException] attribute AppendMode mode;
</span><span class="lines">@@ -65,5 +64,11 @@
</span><span class="cx">     // Abort the current segment append sequence.
</span><span class="cx">     [RaisesException] void abort();
</span><span class="cx">     [RaisesException] void remove(unrestricted double start, unrestricted double end);
</span><ins>+
+    attribute EventHandler onupdatestart;
+    attribute EventHandler onupdate;
+    attribute EventHandler onupdateend;
+    attribute EventHandler onerror;
+    attribute EventHandler onabort;
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceSourceBufferListidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -30,11 +30,13 @@
</span><span class="cx">  
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_SOURCE,
</span><del>-    NoInterfaceObject,
</del><span class="cx">     GenerateIsReachable=Impl,
</span><span class="cx">     CallWith=ScriptExecutionContext,
</span><span class="cx"> ] interface SourceBufferList : EventTarget {
</span><span class="cx">     readonly attribute unsigned long length;
</span><span class="cx">     getter SourceBuffer item(unsigned long index);
</span><ins>+
+    attribute EventHandler onaddsourcebuffer;
+    attribute EventHandler onremovesourcebuffer;
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (206145 => 206146)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -4836,6 +4836,11 @@
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;TimeRanges&gt; HTMLMediaElement::seekable() const
</span><span class="cx"> {
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+    if (m_mediaSource)
+        return m_mediaSource-&gt;seekable();
+#endif
+
</ins><span class="cx">     if (m_player)
</span><span class="cx">         return TimeRanges::create(*m_player-&gt;seekable());
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>