Changeset 206209 in webkit


Ignore:
Timestamp:
Sep 21, 2016 9:13:57 AM (8 years ago)
Author:
jer.noble@apple.com
Message:

[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html
https://bugs.webkit.org/show_bug.cgi?id=162257

Reviewed by Eric Carlson.

Source/WebCore:

Some of the conditions in the track changed methods were reversed, and all failed to schedule
a change event.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::videoTrackSelectedChanged):
(WebCore::SourceBuffer::audioTrackEnabledChanged):
(WebCore::SourceBuffer::textTrackModeChanged):

LayoutTests:

  • platform/mac/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

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

    r206208 r206209  
    10451045[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/URL-createObjectURL.html [ Pass ]
    10461046[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/URL-createObjectURL-null.html [ Pass ]
     1047[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html [ Pass ]
    10471048[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-mode.html [ Pass ]
    10481049[ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r206208 r206209  
     12016-09-19  Jer Noble  <jer.noble@apple.com>
     2
     3        [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html
     4        https://bugs.webkit.org/show_bug.cgi?id=162257
     5
     6        Reviewed by Eric Carlson.
     7
     8        Some of the conditions in the track changed methods were reversed, and all failed to schedule
     9        a change event.
     10
     11        * Modules/mediasource/SourceBuffer.cpp:
     12        (WebCore::SourceBuffer::videoTrackSelectedChanged):
     13        (WebCore::SourceBuffer::audioTrackEnabledChanged):
     14        (WebCore::SourceBuffer::textTrackModeChanged):
     15
    1162016-09-20  Jer Noble  <jer.noble@apple.com>
    217
  • trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp

    r206186 r206209  
    16961696    // 1. If the SourceBuffer associated with the previously selected video track is not associated with
    16971697    // any other enabled tracks, run the following steps:
    1698     if (track->selected()
     1698    if (!track->selected()
    16991699        && (!m_videoTracks || !m_videoTracks->isAnyTrackEnabled())
    17001700        && (!m_audioTracks || !m_audioTracks->isAnyTrackEnabled())
     
    17031703        // 1.2 Queue a task to fire a simple event named removesourcebuffer at activeSourceBuffers
    17041704        setActive(false);
    1705     } else if (!track->selected()) {
     1705    } else if (track->selected()) {
    17061706        // 2. If the SourceBuffer associated with the newly selected video track is not already in activeSourceBuffers,
    17071707        // run the following steps:
     
    17111711    }
    17121712
     1713    if (m_videoTracks && m_videoTracks->contains(*track))
     1714        m_videoTracks->scheduleChangeEvent();
     1715
    17131716    if (!isRemoved())
    17141717        m_source->mediaElement()->videoTrackSelectedChanged(track);
     
    17201723    // If an audio track becomes disabled and the SourceBuffer associated with this track is not
    17211724    // associated with any other enabled or selected track, then run the following steps:
    1722     if (track->enabled()
     1725    if (!track->enabled()
    17231726        && (!m_videoTracks || !m_videoTracks->isAnyTrackEnabled())
    17241727        && (!m_audioTracks || !m_audioTracks->isAnyTrackEnabled())
     
    17271730        // 2. Queue a task to fire a simple event named removesourcebuffer at activeSourceBuffers
    17281731        setActive(false);
    1729     } else if (!track->enabled()) {
     1732    } else if (track->enabled()) {
    17301733        // If an audio track becomes enabled and the SourceBuffer associated with this track is
    17311734        // not already in activeSourceBuffers, then run the following steps:
     
    17341737        setActive(true);
    17351738    }
     1739
     1740    if (m_audioTracks && m_audioTracks->contains(*track))
     1741        m_audioTracks->scheduleChangeEvent();
    17361742
    17371743    if (!isRemoved())
     
    17591765    }
    17601766
     1767    if (m_textTracks && m_textTracks->contains(*track))
     1768        m_textTracks->scheduleChangeEvent();
     1769
    17611770    if (!isRemoved())
    17621771        m_source->mediaElement()->textTrackModeChanged(track);
Note: See TracChangeset for help on using the changeset viewer.