-
vcarbune@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=106285 Reviewed by Eric Carlson. Source/WebCore: Updated existing test cases. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::textTracksAreReady): Checked whether there are tracks not loaded when the algorithm began. (WebCore::HTMLMediaElement::textTrackReadyStateChanged): If the ready state changed to FailedToLoad the media controls should check whether there are other caption tracks and hide the button if not. (WebCore::HTMLMediaElement::didAddTrack): Added trigger to closedCaptionsTrackChanged. (WebCore::HTMLMediaElement::hasClosedCaptions): Updated check to skip tracks that failed to load. * html/shadow/MediaControls.cpp: (WebCore::MediaControls::reset): Used the newly added method. (WebCore::MediaControls::refreshClosedCaptionsButtonVisibility): Added container method for default behaviour for refreshing the visibility of the caption button. (WebCore::MediaControls::closedCaptionTracksChanged): Used the newly added method. (WebCore): * html/shadow/MediaControls.h: (MediaControls): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::textTracksAreReady): (WebCore::HTMLMediaElement::textTrackReadyStateChanged): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::didAddTrack): (WebCore::HTMLMediaElement::hasClosedCaptions): * html/shadow/MediaControls.cpp: (WebCore::MediaControls::reset): (WebCore::MediaControls::refreshClosedCaptionsButtonVisibility): (WebCore::MediaControls::closedCaptionTracksChanged): (WebCore): * html/shadow/MediaControls.h: (MediaControls): LayoutTests: Updated tests to include improved behavior. * media/video-controls-captions-expected.txt: Updated. * media/video-controls-captions.html: Updated. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9fb916c7