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

Unified Diff: Source/core/editing/VisibleSelection.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/editing/VisiblePosition.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleSelection.cpp
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index 233062549f42262c5c67fe97cf4c90def1419ffb..c5fcdab9711d32802673bddf3b54b903e8161e15 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -132,7 +132,7 @@ void VisibleSelection::setExtent(const VisiblePosition& visiblePosition)
PassRefPtr<Range> VisibleSelection::firstRange() const
{
if (isNone())
- return 0;
+ return nullptr;
Position start = m_start.parentAnchoredEquivalent();
Position end = m_end.parentAnchoredEquivalent();
return Range::create(*start.document(), start, end);
@@ -141,7 +141,7 @@ PassRefPtr<Range> VisibleSelection::firstRange() const
PassRefPtr<Range> VisibleSelection::toNormalizedRange() const
{
if (isNone())
- return 0;
+ return nullptr;
// Make sure we have an updated layout since this function is called
// in the course of running edit commands which modify the DOM.
@@ -151,7 +151,7 @@ PassRefPtr<Range> VisibleSelection::toNormalizedRange() const
// Check again, because updating layout can clear the selection.
if (isNone())
- return 0;
+ return nullptr;
Position s, e;
if (isCaret()) {
@@ -187,7 +187,7 @@ PassRefPtr<Range> VisibleSelection::toNormalizedRange() const
}
if (!s.containerNode() || !e.containerNode())
- return 0;
+ return nullptr;
// VisibleSelections are supposed to always be valid. This constructor will ASSERT
// if a valid range could not be created, which is fine for this callsite.
@@ -207,14 +207,14 @@ static PassRefPtr<Range> makeSearchRange(const Position& pos)
{
Node* n = pos.deprecatedNode();
if (!n)
- return 0;
+ return nullptr;
Document& d = n->document();
Node* de = d.documentElement();
if (!de)
- return 0;
+ return nullptr;
Node* boundary = n->enclosingBlockFlowElement();
if (!boundary)
- return 0;
+ return nullptr;
RefPtr<Range> searchRange(Range::create(d));
TrackExceptionState exceptionState;
@@ -225,7 +225,7 @@ static PassRefPtr<Range> makeSearchRange(const Position& pos)
ASSERT(!exceptionState.hadException());
if (exceptionState.hadException())
- return 0;
+ return nullptr;
return searchRange.release();
}
« no previous file with comments | « Source/core/editing/VisiblePosition.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698