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

Unified Diff: Source/core/dom/RangeBoundaryPoint.h

Issue 48803004: Have Document::nodeWillBeRemoved() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/Range.cpp ('k') | Source/core/editing/Caret.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/RangeBoundaryPoint.h
diff --git a/Source/core/dom/RangeBoundaryPoint.h b/Source/core/dom/RangeBoundaryPoint.h
index c1a4625ffddae4b5b7c32483f07533a7cf14a90a..7574a89ef481ebaf3d52bfe58f646f5066f7f7d0 100644
--- a/Source/core/dom/RangeBoundaryPoint.h
+++ b/Source/core/dom/RangeBoundaryPoint.h
@@ -48,7 +48,7 @@ public:
void set(PassRefPtr<Node> container, int offset, Node* childBefore);
void setOffset(int offset);
- void setToBeforeChild(Node*);
+ void setToBeforeChild(Node&);
void setToStartOfNode(PassRefPtr<Node>);
void setToEndOfNode(PassRefPtr<Node>);
@@ -136,12 +136,11 @@ inline void RangeBoundaryPoint::setOffset(int offset)
m_offsetInContainer = offset;
}
-inline void RangeBoundaryPoint::setToBeforeChild(Node* child)
+inline void RangeBoundaryPoint::setToBeforeChild(Node& child)
{
- ASSERT(child);
- ASSERT(child->parentNode());
- m_childBeforeBoundary = child->previousSibling();
- m_containerNode = child->parentNode();
+ ASSERT(child.parentNode());
+ m_childBeforeBoundary = child.previousSibling();
+ m_containerNode = child.parentNode();
m_offsetInContainer = m_childBeforeBoundary ? invalidOffset : 0;
}
« no previous file with comments | « Source/core/dom/Range.cpp ('k') | Source/core/editing/Caret.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698