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 7a3c5bb811ac9c53744959f8ea10062c0685cee2..24be90364865cf702c627fa50e8339d6fb532e09 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -66,6 +66,7 @@ |
#include "core/page/ChromeClient.h" |
#include "core/page/NetworkStateNotifier.h" |
#include "platform/ContentType.h" |
+#include "platform/LayoutTestSupport.h" |
#include "platform/Logging.h" |
#include "platform/MIMETypeFromURL.h" |
#include "platform/MIMETypeRegistry.h" |
@@ -3102,10 +3103,14 @@ void HTMLMediaElement::didBecomeFullscreenElement() |
{ |
if (mediaControls()) |
mediaControls()->enteredFullscreen(); |
+ // FIXME: There is no embedder-side handling in layout test mode. |
+ if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest()) |
+ webMediaPlayer()->enterFullscreen(); |
// Cache this in case the player is destroyed before leaving fullscreen. |
m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo(); |
- if (m_inOverlayFullscreenVideo) |
+ if (m_inOverlayFullscreenVideo) { |
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); |
+ } |
} |
void HTMLMediaElement::willStopBeingFullscreenElement() |
@@ -3115,6 +3120,8 @@ void HTMLMediaElement::willStopBeingFullscreenElement() |
if (m_inOverlayFullscreenVideo) |
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); |
m_inOverlayFullscreenVideo = false; |
+ if (webMediaPlayer()) |
+ webMediaPlayer()->exitedFullscreen(); |
} |
WebLayer* HTMLMediaElement::platformLayer() const |