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 7fa17e2b42c67ae4901a253a4c08bc9aabcc3cd6..e90414a8c983faf5123c9a858ca5936f2393f2fb 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -666,6 +666,11 @@ Node::InsertionNotificationRequest HTMLMediaElement::insertedInto( |
void HTMLMediaElement::didNotifySubtreeInsertionsToDocument() { |
updateControlsVisibility(); |
+ |
+ if (document().settings() && |
+ document().settings()->getEmbeddedMediaExperienceEnabled()) { |
+ mediaControls()->makeTransparent(); |
+ } |
} |
void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint) { |
@@ -3551,6 +3556,11 @@ bool HTMLMediaElement::isFullscreen() const { |
void HTMLMediaElement::didEnterFullscreen() { |
updateControlsVisibility(); |
+ if (document().settings() && |
+ document().settings()->getEmbeddedMediaExperienceEnabled()) { |
+ mediaControls()->makeTransparent(); |
+ } |
+ |
// FIXME: There is no embedder-side handling in layout test mode. |
if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest()) |
webMediaPlayer()->enteredFullscreen(); |
@@ -3564,6 +3574,11 @@ void HTMLMediaElement::didEnterFullscreen() { |
void HTMLMediaElement::didExitFullscreen() { |
updateControlsVisibility(); |
+ if (document().settings() && |
+ document().settings()->getEmbeddedMediaExperienceEnabled()) { |
+ mediaControls()->makeTransparent(); |
+ } |
+ |
if (webMediaPlayer()) |
webMediaPlayer()->exitedFullscreen(); |
if (m_inOverlayFullscreenVideo) |