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

Unified Diff: Source/core/rendering/RenderNamedFlowThread.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/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderNamedFlowThread.cpp
diff --git a/Source/core/rendering/RenderNamedFlowThread.cpp b/Source/core/rendering/RenderNamedFlowThread.cpp
index bc72e9a873810db2140a9c0df4d299a173f6beb9..9601e69cfa9ab4734918820bbd587af25e4e91d2 100644
--- a/Source/core/rendering/RenderNamedFlowThread.cpp
+++ b/Source/core/rendering/RenderNamedFlowThread.cpp
@@ -82,7 +82,7 @@ void RenderNamedFlowThread::clearContentNodes()
ASSERT(contentNode && contentNode->isElementNode());
ASSERT(contentNode->inNamedFlow());
- ASSERT(contentNode->document() == document());
+ ASSERT(&contentNode->document() == &document());
contentNode->clearInNamedFlow();
}
@@ -440,7 +440,7 @@ void RenderNamedFlowThread::pushDependencies(RenderNamedFlowThreadList& list)
void RenderNamedFlowThread::registerNamedFlowContentNode(Node* contentNode)
{
ASSERT(contentNode && contentNode->isElementNode());
- ASSERT(contentNode->document() == document());
+ ASSERT(&contentNode->document() == &document());
contentNode->setInNamedFlow();
@@ -463,7 +463,7 @@ void RenderNamedFlowThread::unregisterNamedFlowContentNode(Node* contentNode)
ASSERT(contentNode && contentNode->isElementNode());
ASSERT(m_contentNodes.contains(contentNode));
ASSERT(contentNode->inNamedFlow());
- ASSERT(contentNode->document() == document());
+ ASSERT(&contentNode->document() == &document());
contentNode->clearInNamedFlow();
m_contentNodes.remove(contentNode);
@@ -493,7 +493,7 @@ bool RenderNamedFlowThread::isChildAllowed(RenderObject* child, RenderStyle* sty
void RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent()
{
RenderFlowThread::dispatchRegionLayoutUpdateEvent();
- InspectorInstrumentation::didUpdateRegionLayout(document(), m_namedFlow.get());
+ InspectorInstrumentation::didUpdateRegionLayout(&document(), m_namedFlow.get());
if (!m_regionLayoutUpdateEventTimer.isActive() && m_namedFlow->hasEventListeners())
m_regionLayoutUpdateEventTimer.startOneShot(0);
@@ -502,7 +502,7 @@ void RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent()
void RenderNamedFlowThread::dispatchRegionOversetChangeEvent()
{
RenderFlowThread::dispatchRegionOversetChangeEvent();
- InspectorInstrumentation::didChangeRegionOverset(document(), m_namedFlow.get());
+ InspectorInstrumentation::didChangeRegionOverset(&document(), m_namedFlow.get());
if (!m_regionOversetChangeEventTimer.isActive() && m_namedFlow->hasEventListeners())
m_regionOversetChangeEventTimer.startOneShot(0);
@@ -595,7 +595,7 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
if (!contentNode->renderer())
continue;
- RefPtr<Range> range = Range::create(contentNode->document());
+ RefPtr<Range> range = Range::create(&contentNode->document());
bool foundStartPosition = false;
bool startsAboveRegion = true;
bool endsBelowRegion = true;
@@ -636,7 +636,7 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
if (range->intersectsNode(node, IGNORE_EXCEPTION))
range->setEndBefore(node, IGNORE_EXCEPTION);
rangeObjects.append(range->cloneRange(IGNORE_EXCEPTION));
- range = Range::create(contentNode->document());
+ range = Range::create(&contentNode->document());
startsAboveRegion = true;
} else
skipOverOutsideNodes = true;
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698