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

Unified Diff: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp

Issue 1254613003: Let the WebMediaPlayer decide whether to use overlay video. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address Xianzhu's Comments Created 5 years, 4 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/layout/compositing/DeprecatedPaintLayerCompositor.cpp
diff --git a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
index cb030300f82f53ba861f62982325124e5d63ff2c..9fc7bb163f313ac33c96cce94f4efa0daaf8906a 100644
--- a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
+++ b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
@@ -37,6 +37,7 @@
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLIFrameElement.h"
+#include "core/html/HTMLVideoElement.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/layout/LayoutPart.h"
#include "core/layout/LayoutVideo.h"
@@ -281,7 +282,7 @@ void DeprecatedPaintLayerCompositor::assertNoUnresolvedDirtyBits()
#endif
-void DeprecatedPaintLayerCompositor::applyOverlayFullscreenVideoAdjustment()
+void DeprecatedPaintLayerCompositor::applyOverlayFullscreenVideoAdjustmentIfNeeded()
{
m_inOverlayFullscreenVideo = false;
if (!m_rootContentLayer)
@@ -289,7 +290,7 @@ void DeprecatedPaintLayerCompositor::applyOverlayFullscreenVideoAdjustment()
bool isLocalRoot = m_layoutView.frame()->isLocalRoot();
LayoutVideo* video = findFullscreenVideoLayoutObject(m_layoutView.document());
- if (!video || !video->layer()->hasCompositedDeprecatedPaintLayerMapping()) {
+ if (!video || !video->layer()->hasCompositedDeprecatedPaintLayerMapping() || !video->videoElement()->usesOverlayFullscreenVideo()) {
if (isLocalRoot) {
GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer();
if (backgroundLayer && !backgroundLayer->parent())
@@ -414,8 +415,7 @@ void DeprecatedPaintLayerCompositor::updateIfNeeded()
else
m_rootContentLayer->setChildren(childList);
- if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled())
- applyOverlayFullscreenVideoAdjustment();
+ applyOverlayFullscreenVideoAdjustmentIfNeeded();
}
if (m_needsUpdateFixedBackground) {

Powered by Google App Engine
This is Rietveld 408576698