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

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

Issue 23533013: Have RenderView's enclosingSeamlessRenderer() take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 8b056b372a6fdb647f9a7b51a80bdedf14e0cd2a..897c0f5aa17e38210ddb6a95618026b01c139915 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -136,11 +136,9 @@ void RenderView::checkLayoutState(const LayoutState& state)
}
#endif
-static RenderBox* enclosingSeamlessRenderer(Document* doc)
+static RenderBox* enclosingSeamlessRenderer(const Document& doc)
{
- if (!doc)
- return 0;
- Element* ownerElement = doc->seamlessParentIFrame();
+ Element* ownerElement = doc.seamlessParentIFrame();
if (!ownerElement)
return 0;
return ownerElement->renderBox();
@@ -151,7 +149,7 @@ void RenderView::addChild(RenderObject* newChild, RenderObject* beforeChild)
// Seamless iframes are considered part of an enclosing render flow thread from the parent document. This is necessary for them to look
// up regions in the parent document during layout.
if (newChild && !newChild->isRenderFlowThread()) {
- RenderBox* seamlessBox = enclosingSeamlessRenderer(&document());
+ RenderBox* seamlessBox = enclosingSeamlessRenderer(document());
if (seamlessBox && seamlessBox->flowThreadContainingBlock())
newChild->setFlowThreadState(seamlessBox->flowThreadState());
}
@@ -167,7 +165,7 @@ bool RenderView::initializeLayoutState(LayoutState& state)
// Check the writing mode of the seamless ancestor. It has to match our document's writing mode, or we won't inherit any
// pagination information.
- RenderBox* seamlessAncestor = enclosingSeamlessRenderer(&document());
+ RenderBox* seamlessAncestor = enclosingSeamlessRenderer(document());
LayoutState* seamlessLayoutState = seamlessAncestor ? seamlessAncestor->view()->layoutState() : 0;
bool shouldInheritPagination = seamlessLayoutState && !m_pageLogicalHeight && seamlessAncestor->style()->writingMode() == style()->writingMode();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698