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

Unified Diff: Source/core/rendering/RenderFullScreen.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/RenderFullScreen.cpp
diff --git a/Source/core/rendering/RenderFullScreen.cpp b/Source/core/rendering/RenderFullScreen.cpp
index 664bc0244dd79477e63a5af4046dd5ac99180ed3..34b1375570bf45a9ef0d53dbb3564fe79e77c3b1 100644
--- a/Source/core/rendering/RenderFullScreen.cpp
+++ b/Source/core/rendering/RenderFullScreen.cpp
@@ -76,9 +76,9 @@ void RenderFullScreen::willBeDestroyed()
// RenderObjects are unretained, so notify the document (which holds a pointer to a RenderFullScreen)
// if it's RenderFullScreen is destroyed.
- FullscreenElementStack* controller = FullscreenElementStack::from(&document());
- if (controller->fullScreenRenderer() == this)
- controller->fullScreenRendererDestroyed();
+ FullscreenElementStack& controller = FullscreenElementStack::from(document());
+ if (controller.fullScreenRenderer() == this)
+ controller.fullScreenRendererDestroyed();
RenderFlexibleBox::willBeDestroyed();
}
@@ -140,7 +140,8 @@ RenderObject* RenderFullScreen::wrapRenderer(RenderObject* object, RenderObject*
fullscreenRenderer->setNeedsLayoutAndPrefWidthsRecalc();
}
- FullscreenElementStack::from(document)->setFullScreenRenderer(fullscreenRenderer);
+ ASSERT(document);
+ FullscreenElementStack::from(*document).setFullScreenRenderer(fullscreenRenderer);
return fullscreenRenderer;
}
@@ -162,7 +163,7 @@ void RenderFullScreen::unwrapRenderer()
if (placeholder())
placeholder()->remove();
remove();
- FullscreenElementStack::from(&document())->setFullScreenRenderer(0);
+ FullscreenElementStack::from(document()).setFullScreenRenderer(0);
}
void RenderFullScreen::setPlaceholder(RenderBlock* placeholder)

Powered by Google App Engine
This is Rietveld 408576698