| 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) {
|
|
|