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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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 | « Source/core/rendering/RenderFrameSet.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderFullScreen.cpp
diff --git a/Source/core/rendering/RenderFullScreen.cpp b/Source/core/rendering/RenderFullScreen.cpp
index b98c2293d4deda709c051cd12fb0ff314da2b244..0eab50c0c571f3fb6f3bbf1ac3fe061397827774 100644
--- a/Source/core/rendering/RenderFullScreen.cpp
+++ b/Source/core/rendering/RenderFullScreen.cpp
@@ -35,7 +35,7 @@ public:
: RenderBlock(0)
, m_owner(owner)
{
- setDocumentForAnonymous(owner->document());
+ setDocumentForAnonymous(&owner->document());
}
private:
virtual bool isRenderFullScreenPlaceholder() const { return true; }
@@ -74,11 +74,9 @@ void RenderFullScreen::willBeDestroyed()
// RenderObjects are unretained, so notify the document (which holds a pointer to a RenderFullScreen)
// if it's RenderFullScreen is destroyed.
- if (document()) {
- FullscreenElementStack* controller = FullscreenElementStack::from(document());
- if (controller->fullScreenRenderer() == this)
- controller->fullScreenRendererDestroyed();
- }
+ FullscreenElementStack* controller = FullscreenElementStack::from(&document());
+ if (controller->fullScreenRenderer() == this)
+ controller->fullScreenRendererDestroyed();
RenderFlexibleBox::willBeDestroyed();
}
@@ -162,7 +160,7 @@ void RenderFullScreen::unwrapRenderer()
if (placeholder())
placeholder()->remove();
remove();
- FullscreenElementStack::from(document())->setFullScreenRenderer(0);
+ FullscreenElementStack::from(&document())->setFullScreenRenderer(0);
}
void RenderFullScreen::setPlaceholder(RenderBlock* placeholder)
« no previous file with comments | « Source/core/rendering/RenderFrameSet.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698