Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
index ac9168d2f444499ae3a72956d1e57c6db109d421..c37b09d04ae6d6f265fb4e765828bbb9762511ca 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -67,6 +67,7 @@ |
#include "core/page/NetworkStateNotifier.h" |
#include "platform/ContentType.h" |
#include "platform/Histogram.h" |
+#include "platform/LayoutTestSupport.h" |
#include "platform/Logging.h" |
#include "platform/MIMETypeFromURL.h" |
#include "platform/MIMETypeRegistry.h" |
@@ -3104,6 +3105,9 @@ void HTMLMediaElement::didBecomeFullscreenElement() |
{ |
if (mediaControls()) |
mediaControls()->enteredFullscreen(); |
+ // FIXME: There is no embedder-side handling in layout test mode. |
+ if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest()) |
+ webMediaPlayer()->enteredFullscreen(); |
// Cache this in case the player is destroyed before leaving fullscreen. |
m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo(); |
if (m_inOverlayFullscreenVideo) |
@@ -3114,6 +3118,8 @@ void HTMLMediaElement::willStopBeingFullscreenElement() |
{ |
if (mediaControls()) |
mediaControls()->exitedFullscreen(); |
+ if (webMediaPlayer()) |
+ webMediaPlayer()->exitedFullscreen(); |
if (m_inOverlayFullscreenVideo) |
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); |
m_inOverlayFullscreenVideo = false; |