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

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: layout test 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
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index 69fa42c6204dab39b73542a8e0ee3fca55ea996a..0bfc27fd8d7beb4f3c7ad4fa29096a07b2221fc0 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();

Powered by Google App Engine
This is Rietveld 408576698