Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2084223002: Make the video layer visibility configurable in OverlayFullscreenVideo mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
index 315a6b0d177230d594ac511d8c574eebd7a2f1c5..6178e264b40f1d4748201860a399846a0d2906dd 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -36,6 +36,7 @@
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLMediaElement.h"
+#include "core/html/HTMLVideoElement.h"
#include "core/html/canvas/CanvasRenderingContext.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/layout/LayoutEmbeddedObject.h"
@@ -799,7 +800,11 @@ void CompositedLayerMapping::updateMainGraphicsLayerGeometry(const IntRect& rela
// descendants. So, the visibility flag for m_graphicsLayer should be true if there are any
// non-compositing visible layers.
bool contentsVisible = m_owningLayer.hasVisibleContent() || hasVisibleNonCompositingDescendant(&m_owningLayer);
-
+ if (layoutObject()->isVideo()) {
+ HTMLVideoElement* videoElement = toHTMLVideoElement(layoutObject()->node());
+ if (videoElement->isFullscreen() && videoElement->overlayFullscreenVideoMode() == WebMediaPlayer::OverlayFullscreenVideoMode::VideoLayerInvisible)
+ contentsVisible = false;
+ }
m_graphicsLayer->setContentsVisible(contentsVisible);
m_graphicsLayer->setBackfaceVisibility(layoutObject()->style()->backfaceVisibility() == BackfaceVisibilityVisible);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLVideoElement.cpp ('k') | third_party/WebKit/public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698