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

Unified Diff: Source/core/rendering/RenderLayerBacking.cpp

Issue 22454003: Support subtitles for native fullscreen video (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 3 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
« no previous file with comments | « Source/core/platform/graphics/MediaPlayer.h ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerBacking.cpp
diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp
index 25bea23d3fe94073c70d6e125fd7a959d9c59df8..51174576cdd1b6fa6d4a929db9fd4193bfe92333 100644
--- a/Source/core/rendering/RenderLayerBacking.cpp
+++ b/Source/core/rendering/RenderLayerBacking.cpp
@@ -513,7 +513,13 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
// m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer and its non-compositing
// descendants. So, the visibility flag for m_graphicsLayer should be true if there are any
// non-compositing visible layers.
- m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent() || hasVisibleNonCompositingDescendantLayers());
+ bool contentsVisible = m_owningLayer->hasVisibleContent() || hasVisibleNonCompositingDescendantLayers();
+ if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && renderer()->isVideo()) {
+ HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer()->node());
+ if (mediaElement->isFullscreen())
+ contentsVisible = false;
+ }
+ m_graphicsLayer->setContentsVisible(contentsVisible);
RenderStyle* style = renderer()->style();
// FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959
« no previous file with comments | « Source/core/platform/graphics/MediaPlayer.h ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698