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 bd03224eddbf5a30289fc42bcf28e9116ab52fdb..cf9626ce0095e2ee396c6529efbffd17b481c6bd 100644 |
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
@@ -354,6 +354,7 @@ void MediaControls::reset() { |
onTextTracksAddedOrRemoved(); |
m_fullscreenButton->setIsWanted(shouldShowFullscreenButton(mediaElement())); |
+ m_fullscreenButton->setIsFullscreen(mediaElement().isFullscreen()); |
refreshCastButtonVisibilityWithoutUpdate(); |
@@ -549,18 +550,6 @@ void MediaControls::exitFullscreen() { |
Fullscreen::exitFullscreen(document()); |
} |
-void MediaControls::enteredFullscreen() { |
- m_fullscreenButton->setIsFullscreen(true); |
- stopHideMediaControlsTimer(); |
- startHideMediaControlsTimer(); |
-} |
- |
-void MediaControls::exitedFullscreen() { |
- m_fullscreenButton->setIsFullscreen(false); |
- stopHideMediaControlsTimer(); |
- startHideMediaControlsTimer(); |
-} |
- |
void MediaControls::startedCasting() { |
m_castButton->setIsPlayingRemotely(true); |
m_overlayCastButton->setIsPlayingRemotely(true); |
@@ -760,6 +749,18 @@ void MediaControls::onLoadedMetadata() { |
reset(); |
} |
+void MediaControls::onEnteredFullscreen() { |
+ m_fullscreenButton->setIsFullscreen(true); |
+ stopHideMediaControlsTimer(); |
+ startHideMediaControlsTimer(); |
+} |
+ |
+void MediaControls::onExitedFullscreen() { |
+ m_fullscreenButton->setIsFullscreen(false); |
+ stopHideMediaControlsTimer(); |
+ startHideMediaControlsTimer(); |
+} |
+ |
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. |