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

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

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index dd0f5fca28e8c8d912124e52b00b9fca40873164..731ba904e47c8725720dcf31dd274fbe45e37b3c 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -322,14 +322,14 @@ void RenderLayerCompositor::updateCompositingRequirementsState()
(*it)->updateNeedsCompositedScrolling();
}
-static RenderVideo* findFullscreenVideoRenderer(Document* document)
+static RenderVideo* findFullscreenVideoRenderer(Document& document)
{
Element* fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom(document);
while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) {
- document = toHTMLFrameOwnerElement(fullscreenElement)->contentDocument();
- if (!document)
+ Document* contentDocument = toHTMLFrameOwnerElement(fullscreenElement)->contentDocument();
+ if (!contentDocument)
return 0;
- fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom(document);
+ fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom(*contentDocument);
}
if (!fullscreenElement || !fullscreenElement->hasTagName(videoTag))
return 0;
@@ -473,7 +473,7 @@ void RenderLayerCompositor::updateCompositingLayers()
// Host the document layer in the RenderView's root layer.
if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isMainFrame()) {
- RenderVideo* video = findFullscreenVideoRenderer(&m_renderView->document());
+ RenderVideo* video = findFullscreenVideoRenderer(m_renderView->document());
if (video && video->hasCompositedLayerMapping()) {
childList.clear();
childList.append(video->compositedLayerMapping()->mainGraphicsLayer());

Powered by Google App Engine
This is Rietveld 408576698