Chromium Code Reviews| Index: third_party/WebKit/Source/web/FullscreenController.cpp |
| diff --git a/third_party/WebKit/Source/web/FullscreenController.cpp b/third_party/WebKit/Source/web/FullscreenController.cpp |
| index cb8efeffd7bb3e843c17fa3f5debc2591e0afc5f..7a341fddc3bc803f0ee6d62fa188ce4f4145b278 100644 |
| --- a/third_party/WebKit/Source/web/FullscreenController.cpp |
| +++ b/third_party/WebKit/Source/web/FullscreenController.cpp |
| @@ -31,6 +31,7 @@ |
| #include "web/FullscreenController.h" |
| #include "core/dom/Document.h" |
| +#include "core/dom/ElementTraversal.h" |
| #include "core/dom/Fullscreen.h" |
| #include "core/frame/FrameView.h" |
| #include "core/frame/LocalFrame.h" |
| @@ -86,6 +87,12 @@ void FullscreenController::didEnterFullscreen() { |
| if (videoElement->usesOverlayFullscreenVideo() && |
| m_webViewImpl->layerTreeView()) |
| m_webViewImpl->layerTreeView()->setHasTransparentBackground(true); |
| + } else { |
| + for (HTMLVideoElement& videoElement : |
| + Traversal<HTMLVideoElement>::descendantsOf(*element)) { |
|
esprehn
2016/10/08 03:33:04
This is traversing every element of the element wh
foolip
2016/10/10 08:35:22
I believe the idea is to detect a case where the v
foolip
2016/10/10 08:39:08
Please make sure to write tests that show the beha
xjz
2016/10/10 19:31:02
Removed this from this CL. As commented, will open
|
| + if (videoElement.webMediaPlayer()) |
| + videoElement.webMediaPlayer()->ancestorEnteredFullscreen(); |
| + } |
| } |
| } |
| @@ -120,6 +127,13 @@ void FullscreenController::didExitFullscreen() { |
| m_needsScrollAndScaleRestore = true; |
| fullscreen->didExitFullscreen(); |
| + if (!isHTMLVideoElement(element)) { |
| + for (HTMLVideoElement& videoElement : |
| + Traversal<HTMLVideoElement>::descendantsOf(*element)) { |
|
esprehn
2016/10/08 03:33:04
ditto, walking the entire document seems unfortuna
xjz
2016/10/10 19:31:02
Removed this from this CL. As commented, will open
|
| + if (videoElement.webMediaPlayer()) |
| + videoElement.webMediaPlayer()->ancestorExitedFullscreen(); |
| + } |
| + } |
| } |
| } |
| } |