Changeset 206186 in webkit


Ignore:
Timestamp:
Sep 20, 2016 4:58:00 PM (8 years ago)
Author:
jer.noble@apple.com
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:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206185 r206186  
     12016-09-20  Jer Noble  <jer.noble@apple.com>
     2
     3        [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html
     4        https://bugs.webkit.org/show_bug.cgi?id=162306
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/mac/TestExpectations:
     9
    1102016-09-20  Jer Noble  <jer.noble@apple.com>
    211
  • trunk/LayoutTests/platform/mac/TestExpectations

    r206185 r206186  
    10461046[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-mode.html [ Pass ]
    10471047[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Pass ]
     1048[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html [ Pass ]
    10481049[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Pass ]
    10491050[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r206185 r206186  
     12016-09-20  Jer Noble  <jer.noble@apple.com>
     2
     3        [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html
     4        https://bugs.webkit.org/show_bug.cgi?id=162306
     5
     6        Reviewed by Darin Adler.
     7
     8        appendWindowStart should be a restricted double, and both it and appendWindowEnd should throw
     9        TypeError exceptions when setting them to disallowed values.
     10
     11        * Modules/mediasource/SourceBuffer.cpp:
     12        (WebCore::SourceBuffer::setAppendWindowStart):
     13        (WebCore::SourceBuffer::setAppendWindowEnd):
     14        * Modules/mediasource/SourceBuffer.idl:
     15
    1162016-09-20  Jer Noble  <jer.noble@apple.com>
    217
  • trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp

    r206127 r206186  
    193193{
    194194    // Section 3.1 appendWindowStart attribute setter steps.
    195     // http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendWindowStart
     195    // W3C Editor's Draft 16 September 2016
     196    // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-sourcebuffer-appendwindowstart
    196197    // 1. If this object has been removed from the sourceBuffers attribute of the parent media source,
    197     //    then throw an INVALID_STATE_ERR exception and abort these steps.
    198     // 2. If the updating attribute equals true, then throw an INVALID_STATE_ERR exception and abort these steps.
     198    //    then throw an InvalidStateError exception and abort these steps.
     199    // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
    199200    if (isRemoved() || m_updating) {
    200201        ec = INVALID_STATE_ERR;
     
    203204
    204205    // 3. If the new value is less than 0 or greater than or equal to appendWindowEnd then
    205     //    throw an INVALID_ACCESS_ERR exception and abort these steps.
     206    //    throw an TypeError exception and abort these steps.
    206207    if (newValue < 0 || newValue >= m_appendWindowEnd.toDouble()) {
    207         ec = INVALID_ACCESS_ERR;
     208        ec = TypeError;
    208209        return;
    209210    }
     
    221222{
    222223    // Section 3.1 appendWindowEnd attribute setter steps.
    223     // http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendWindowEnd
     224    // W3C Editor's Draft 16 September 2016
     225    // https://rawgit.com/w3c/media-source/45627646344eea0170dd1cbc5a3d508ca751abb8/media-source-respec.html#dom-sourcebuffer-appendwindowend
    224226    // 1. If this object has been removed from the sourceBuffers attribute of the parent media source,
    225     //    then throw an INVALID_STATE_ERR exception and abort these steps.
    226     // 2. If the updating attribute equals true, then throw an INVALID_STATE_ERR exception and abort these steps.
     227    //    then throw an InvalidStateError exception and abort these steps.
     228    // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
    227229    if (isRemoved() || m_updating) {
    228230        ec = INVALID_STATE_ERR;
     
    230232    }
    231233
    232     // 3. If the new value equals NaN, then throw an INVALID_ACCESS_ERR and abort these steps.
    233     // 4. If the new value is less than or equal to appendWindowStart then throw an INVALID_ACCESS_ERR exception
     234    // 3. If the new value equals NaN, then throw an TypeError and abort these steps.
     235    // 4. If the new value is less than or equal to appendWindowStart then throw an TypeError exception
    234236    //    and abort these steps.
    235237    if (std::isnan(newValue) || newValue <= m_appendWindowStart.toDouble()) {
    236         ec = INVALID_ACCESS_ERR;
     238        ec = TypeError;
    237239        return;
    238240    }
  • trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl

    r206146 r206186  
    5555    [Conditional=VIDEO_TRACK] readonly attribute TextTrackList textTracks;
    5656
    57     [SetterRaisesException] attribute unrestricted double appendWindowStart;
     57    [SetterRaisesException] attribute double appendWindowStart;
    5858    [SetterRaisesException] attribute unrestricted double appendWindowEnd;
    5959
Note: See TracChangeset for help on using the changeset viewer.