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

Unified Diff: Source/web/FullscreenController.cpp

Issue 1278583004: Undo overlay fullscreen video background transparency (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/web/FullscreenController.cpp
diff --git a/Source/web/FullscreenController.cpp b/Source/web/FullscreenController.cpp
index 232af889b0ca1d1176b8e008ea8cc5aa4be3f7f6..019c1d2e18be77f7baabaf7b55f91b3117a9926d 100644
--- a/Source/web/FullscreenController.cpp
+++ b/Source/web/FullscreenController.cpp
@@ -106,14 +106,16 @@ void FullscreenController::didExitFullScreen()
if (Document* document = m_fullScreenFrame->document()) {
if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*document)) {
- if (fullscreen->webkitCurrentFullScreenElement()) {
+ Element* element = fullscreen->webkitCurrentFullScreenElement();
+ if (element) {
// When the client exits from full screen we have to call fullyExitFullscreen to notify
// the document. While doing that, suppress notifications back to the client.
m_isCancelingFullScreen = true;
Fullscreen::fullyExitFullscreen(*document);
m_isCancelingFullScreen = false;
- if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && m_webViewImpl->layerTreeView())
+ // If the video used overlay fullscreen mode, the background was made transparent. Restore the transparency.
+ if (isHTMLVideoElement(element) && m_webViewImpl->layerTreeView())
m_webViewImpl->layerTreeView()->setHasTransparentBackground(m_webViewImpl->isTransparent());
if (m_exitFullscreenPageScaleFactor) {

Powered by Google App Engine
This is Rietveld 408576698