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

Unified Diff: Source/core/rendering/compositing/GraphicsLayerUpdater.cpp

Issue 187193002: Fix an issue that subtitle is not shown for native fullscreen video that is inside an iframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressing comments Created 6 years, 10 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: Source/core/rendering/compositing/GraphicsLayerUpdater.cpp
diff --git a/Source/core/rendering/compositing/GraphicsLayerUpdater.cpp b/Source/core/rendering/compositing/GraphicsLayerUpdater.cpp
index 40c419947199076cd33c2a73106ab36d3df34799..6b1ac807988ae89ea25d937996906095f9c07dff 100644
--- a/Source/core/rendering/compositing/GraphicsLayerUpdater.cpp
+++ b/Source/core/rendering/compositing/GraphicsLayerUpdater.cpp
@@ -27,6 +27,7 @@
#include "config.h"
#include "core/rendering/compositing/GraphicsLayerUpdater.h"
+#include "core/html/HTMLMediaElement.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderLayerReflectionInfo.h"
#include "core/rendering/RenderPart.h"
@@ -122,7 +123,8 @@ void GraphicsLayerUpdater::rebuildTree(RenderLayer& layer, Vector<GraphicsLayer*
}
}
- childLayersOfEnclosingLayer.append(currentCompositedLayerMapping->childForSuperlayers());
+ if (shouldAppendLayer(layer))
+ childLayersOfEnclosingLayer.append(currentCompositedLayerMapping->childForSuperlayers());
}
if (!depth) {
@@ -171,4 +173,14 @@ void GraphicsLayerUpdater::update(RenderLayer& layer)
layer.scrollableArea()->positionOverflowControls();
}
+bool GraphicsLayerUpdater::shouldAppendLayer(RenderLayer& layer)
+{
+ if (!RuntimeEnabledFeatures::overlayFullscreenVideoEnabled())
+ return true;
+ Node* node = layer.renderer()->node();
+ if (isHTMLMediaElement(*node) && toHTMLMediaElement(node)->isFullscreen())
+ return false;
+ return true;
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698