Index: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
index e730ac088b2b7366f013c1bc0658694868ba7f58..d9485f3a9fb9149220be31abaf2159cfad9351cb 100644 |
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp |
@@ -787,9 +787,17 @@ std::unique_ptr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( |
HTMLMediaElementEncryptedMedia& encryptedMedia = |
HTMLMediaElementEncryptedMedia::from(htmlMediaElement); |
WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); |
- return wrapUnique(webFrame->client()->createMediaPlayer( |
- source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), |
- sinkId)); |
+ std::unique_ptr<WebMediaPlayer> mediaPlayer = |
+ wrapUnique(webFrame->client()->createMediaPlayer( |
+ source, client, &encryptedMedia, |
+ encryptedMedia.contentDecryptionModule(), sinkId)); |
+ |
+ Element* fullscreenElement = |
+ Fullscreen::currentFullScreenElementFrom(htmlMediaElement.document()); |
+ if (fullscreenElement->contains(&htmlMediaElement)) |
+ mediaPlayer->ancestorEnteredFullscreen(); |
+ |
+ return mediaPlayer; |
} |
std::unique_ptr<WebMediaSession> |