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

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

Issue 399703002: Find the current fullscreen video element rather than the one on top of stack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test expectations Created 6 years, 5 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
« no previous file with comments | « LayoutTests/platform/linux/virtual/android/fullscreen/video-fail-to-enter-full-screen-expected.png ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index f742e3103e9244c4238a1c2a5efe5eec26869abf..83caa4189e9e3a4cb1fb71d9abf9f5ef3b841f98 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -165,13 +165,17 @@ bool RenderLayerCompositor::acceleratedCompositingForOverflowScrollEnabled() con
static RenderVideo* findFullscreenVideoRenderer(Document& document)
{
+ // Recursively find the document that is in fullscreen.
Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(document);
+ Document* contentDocument = &document;
while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) {
- Document* contentDocument = toHTMLFrameOwnerElement(fullscreenElement)->contentDocument();
+ contentDocument = toHTMLFrameOwnerElement(fullscreenElement)->contentDocument();
if (!contentDocument)
return 0;
fullscreenElement = FullscreenElementStack::fullscreenElementFrom(*contentDocument);
}
+ // Get the current fullscreen element from the document.
+ fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom(*contentDocument);
if (!isHTMLVideoElement(fullscreenElement))
return 0;
RenderObject* renderer = fullscreenElement->renderer();
« no previous file with comments | « LayoutTests/platform/linux/virtual/android/fullscreen/video-fail-to-enter-full-screen-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698