| Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| index 5b4b0b7b707d21ec773acb1c80f361aa5d401624..005afa2a5d80e5688dc6bcdb7cf363e05ee9d806 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
|
| @@ -339,8 +339,7 @@ void MediaControls::reset() {
|
| m_timeline->setPosition(mediaElement().currentTime());
|
|
|
| onVolumeChange();
|
| -
|
| - refreshClosedCaptionsButtonVisibility();
|
| + onTextTracksAddedRemoved();
|
|
|
| m_fullscreenButton->setIsWanted(shouldShowFullscreenButton(mediaElement()));
|
|
|
| @@ -454,15 +453,6 @@ void MediaControls::updateCurrentTimeDisplay() {
|
| m_currentTimeDisplay->setCurrentValue(now);
|
| }
|
|
|
| -void MediaControls::changedClosedCaptionsVisibility() {
|
| - m_toggleClosedCaptionsButton->updateDisplayType();
|
| -}
|
| -
|
| -void MediaControls::refreshClosedCaptionsButtonVisibility() {
|
| - m_toggleClosedCaptionsButton->setIsWanted(mediaElement().hasClosedCaptions());
|
| - BatchedControlUpdate batch(this);
|
| -}
|
| -
|
| void MediaControls::toggleTextTrackList() {
|
| if (!mediaElement().hasClosedCaptions()) {
|
| m_textTrackList->setVisible(false);
|
| @@ -724,6 +714,15 @@ void MediaControls::onPause() {
|
| stopHideMediaControlsTimer();
|
| }
|
|
|
| +void MediaControls::onTextTracksAddedRemoved() {
|
| + m_toggleClosedCaptionsButton->setIsWanted(mediaElement().hasClosedCaptions());
|
| + BatchedControlUpdate batch(this);
|
| +}
|
| +
|
| +void MediaControls::onTextTracksChanged() {
|
| + m_toggleClosedCaptionsButton->updateDisplayType();
|
| +}
|
| +
|
| void MediaControls::notifyPanelWidthChanged(const LayoutUnit& newWidth) {
|
| // Don't bother to do any work if this matches the most recent panel
|
| // width, since we're called after layout.
|
|
|