Title: [206186] trunk
- Revision
- 206186
- Author
- jer.no...@apple.com
- Date
- 2016-09-20 16:58:00 -0700 (Tue, 20 Sep 2016)
Log Message
[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html
https://bugs.webkit.org/show_bug.cgi?id=162306
Reviewed by Darin Adler.
Source/WebCore:
appendWindowStart should be a restricted double, and both it and appendWindowEnd should throw
TypeError exceptions when setting them to disallowed values.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::setAppendWindowStart):
(WebCore::SourceBuffer::setAppendWindowEnd):
* Modules/mediasource/SourceBuffer.idl:
LayoutTests:
* platform/mac/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (206185 => 206186)
--- trunk/LayoutTests/ChangeLog 2016-09-20 23:56:38 UTC (rev 206185)
+++ trunk/LayoutTests/ChangeLog 2016-09-20 23:58:00 UTC (rev 206186)
@@ -1,5 +1,14 @@
2016-09-20 Jer Noble <jer.no...@apple.com>
+ [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html
+ https://bugs.webkit.org/show_bug.cgi?id=162306
+
+ Reviewed by Darin Adler.
+
+ * platform/mac/TestExpectations:
+
+2016-09-20 Jer Noble <jer.no...@apple.com>
+
[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-preload.html
https://bugs.webkit.org/show_bug.cgi?id=162304
Modified: trunk/LayoutTests/platform/mac/TestExpectations (206185 => 206186)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-09-20 23:56:38 UTC (rev 206185)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-09-20 23:58:00 UTC (rev 206186)
@@ -1045,6 +1045,7 @@
[ 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-appendwindow.html [ Pass ]
[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-avtracks.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 ]
Modified: trunk/Source/WebCore/ChangeLog (206185 => 206186)
--- trunk/Source/WebCore/ChangeLog 2016-09-20 23:56:38 UTC (rev 206185)
+++ trunk/Source/WebCore/ChangeLog 2016-09-20 23:58:00 UTC (rev 206186)
@@ -1,5 +1,20 @@
2016-09-20 Jer Noble <jer.no...@apple.com>
+ [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html
+ https://bugs.webkit.org/show_bug.cgi?id=162306
+
+ Reviewed by Darin Adler.
+
+ appendWindowStart should be a restricted double, and both it and appendWindowEnd should throw
+ TypeError exceptions when setting them to disallowed values.
+
+ * Modules/mediasource/SourceBuffer.cpp:
+ (WebCore::SourceBuffer::setAppendWindowStart):
+ (WebCore::SourceBuffer::setAppendWindowEnd):
+ * Modules/mediasource/SourceBuffer.idl:
+
+2016-09-20 Jer Noble <jer.no...@apple.com>
+
[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-preload.html
https://bugs.webkit.org/show_bug.cgi?id=162304
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (206185 => 206186)
--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-09-20 23:56:38 UTC (rev 206185)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-09-20 23:58:00 UTC (rev 206186)
@@ -192,10 +192,11 @@
void SourceBuffer::setAppendWindowStart(double newValue, ExceptionCode& ec)
{
// Section 3.1 appendWindowStart attribute setter steps.
- // http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendWindowStart
+ // W3C Editor's Draft 16 September 2016
+ // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-sourcebuffer-appendwindowstart
// 1. If this object has been removed from the sourceBuffers attribute of the parent media source,
- // then throw an INVALID_STATE_ERR exception and abort these steps.
- // 2. If the updating attribute equals true, then throw an INVALID_STATE_ERR exception and abort these steps.
+ // then throw an InvalidStateError exception and abort these steps.
+ // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
if (isRemoved() || m_updating) {
ec = INVALID_STATE_ERR;
return;
@@ -202,9 +203,9 @@
}
// 3. If the new value is less than 0 or greater than or equal to appendWindowEnd then
- // throw an INVALID_ACCESS_ERR exception and abort these steps.
+ // throw an TypeError exception and abort these steps.
if (newValue < 0 || newValue >= m_appendWindowEnd.toDouble()) {
- ec = INVALID_ACCESS_ERR;
+ ec = TypeError;
return;
}
@@ -220,20 +221,21 @@
void SourceBuffer::setAppendWindowEnd(double newValue, ExceptionCode& ec)
{
// Section 3.1 appendWindowEnd attribute setter steps.
- // http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendWindowEnd
+ // W3C Editor's Draft 16 September 2016
+ // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-sourcebuffer-appendwindowend
// 1. If this object has been removed from the sourceBuffers attribute of the parent media source,
- // then throw an INVALID_STATE_ERR exception and abort these steps.
- // 2. If the updating attribute equals true, then throw an INVALID_STATE_ERR exception and abort these steps.
+ // then throw an InvalidStateError exception and abort these steps.
+ // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
if (isRemoved() || m_updating) {
ec = INVALID_STATE_ERR;
return;
}
- // 3. If the new value equals NaN, then throw an INVALID_ACCESS_ERR and abort these steps.
- // 4. If the new value is less than or equal to appendWindowStart then throw an INVALID_ACCESS_ERR exception
+ // 3. If the new value equals NaN, then throw an TypeError and abort these steps.
+ // 4. If the new value is less than or equal to appendWindowStart then throw an TypeError exception
// and abort these steps.
if (std::isnan(newValue) || newValue <= m_appendWindowStart.toDouble()) {
- ec = INVALID_ACCESS_ERR;
+ ec = TypeError;
return;
}
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl (206185 => 206186)
--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl 2016-09-20 23:56:38 UTC (rev 206185)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl 2016-09-20 23:58:00 UTC (rev 206186)
@@ -54,7 +54,7 @@
[Conditional=VIDEO_TRACK] readonly attribute VideoTrackList videoTracks;
[Conditional=VIDEO_TRACK] readonly attribute TextTrackList textTracks;
- [SetterRaisesException] attribute unrestricted double appendWindowStart;
+ [SetterRaisesException] attribute double appendWindowStart;
[SetterRaisesException] attribute unrestricted double appendWindowEnd;
// Append segment data.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes