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

Unified Diff: Source/core/dom/NodeRenderingContext.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/dom/NodeIterator.cpp ('k') | Source/core/dom/Position.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeRenderingContext.cpp
diff --git a/Source/core/dom/NodeRenderingContext.cpp b/Source/core/dom/NodeRenderingContext.cpp
index a59c09eef954279a1e28c54e18fe3bb921cd1070..008cb117f288051bc66aa54babca02d0c6769382 100644
--- a/Source/core/dom/NodeRenderingContext.cpp
+++ b/Source/core/dom/NodeRenderingContext.cpp
@@ -79,7 +79,7 @@ RenderObject* NodeRenderingContext::nextRenderer() const
if (!element->isInTopLayer())
return 0;
- const Vector<RefPtr<Element> >& topLayerElements = element->document()->topLayerElements();
+ const Vector<RefPtr<Element> >& topLayerElements = element->document().topLayerElements();
size_t position = topLayerElements.find(element);
ASSERT(position != notFound);
for (size_t i = position + 1; i < topLayerElements.size(); ++i) {
@@ -144,7 +144,7 @@ RenderObject* NodeRenderingContext::parentRenderer() const
// will prevent it.
if (!m_renderingParent || !m_renderingParent->renderer())
return 0;
- return m_node->document()->renderView();
+ return m_node->document().renderView();
}
if (m_parentFlowRenderer)
@@ -199,8 +199,8 @@ void NodeRenderingContext::moveToFlowThreadIfNeeded()
if (!element->shouldMoveToFlowThread(m_style.get()))
return;
- ASSERT(m_node->document()->renderView());
- FlowThreadController* flowThreadController = m_node->document()->renderView()->flowThreadController();
+ ASSERT(m_node->document().renderView());
+ FlowThreadController* flowThreadController = m_node->document().renderView()->flowThreadController();
m_parentFlowRenderer = flowThreadController->ensureRenderFlowThreadWithName(m_style->flowThread());
flowThreadController->registerNamedFlowContentNode(m_node, m_parentFlowRenderer);
}
@@ -247,7 +247,7 @@ void NodeRenderingContext::createRendererForElementIfNeeded()
newRenderer->setAnimatableStyle(m_style.release()); // setAnimatableStyle() can depend on renderer() already being set.
if (FullscreenElementStack::isActiveFullScreenElement(element)) {
- newRenderer = RenderFullScreen::wrapRenderer(newRenderer, parentRenderer, element->document());
+ newRenderer = RenderFullScreen::wrapRenderer(newRenderer, parentRenderer, &element->document());
if (!newRenderer)
return;
}
@@ -268,7 +268,7 @@ void NodeRenderingContext::createRendererForTextIfNeeded()
RenderObject* parentRenderer = this->parentRenderer();
if (m_parentDetails.resetStyleInheritance())
- m_style = textNode->document()->styleResolver()->defaultStyleForElement();
+ m_style = textNode->document().styleResolver()->defaultStyleForElement();
else
m_style = parentRenderer->style();
« no previous file with comments | « Source/core/dom/NodeIterator.cpp ('k') | Source/core/dom/Position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698