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

Side by Side Diff: Source/core/editing/PlainTextRange.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
3 * Copyright (C) 2005 Alexey Proskuryakov. 3 * Copyright (C) 2005 Alexey Proskuryakov.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 else 140 else
141 resultRange->setEnd(textRunRange->endContainer(), textRunRan ge->endOffset(), IGNORE_EXCEPTION); 141 resultRange->setEnd(textRunRange->endContainer(), textRunRan ge->endOffset(), IGNORE_EXCEPTION);
142 } 142 }
143 docTextPosition += len; 143 docTextPosition += len;
144 break; 144 break;
145 } 145 }
146 docTextPosition += len; 146 docTextPosition += len;
147 } 147 }
148 148
149 if (!startRangeFound) 149 if (!startRangeFound)
150 return 0; 150 return nullptr;
151 151
152 if (length() && end() > docTextPosition) { // end() is out of bounds 152 if (length() && end() > docTextPosition) { // end() is out of bounds
153 resultRange->setEnd(textRunRange->endContainer(), textRunRange->endOffse t(), IGNORE_EXCEPTION); 153 resultRange->setEnd(textRunRange->endContainer(), textRunRange->endOffse t(), IGNORE_EXCEPTION);
154 } 154 }
155 155
156 return resultRange.release(); 156 return resultRange.release();
157 } 157 }
158 158
159 PlainTextRange PlainTextRange::create(const Node& scope, const Range& range) 159 PlainTextRange PlainTextRange::create(const Node& scope, const Range& range)
160 { 160 {
(...skipping 15 matching lines...) Expand all
176 size_t start = TextIterator::rangeLength(testRange.get()); 176 size_t start = TextIterator::rangeLength(testRange.get());
177 177
178 testRange->setEnd(range.endContainer(), range.endOffset(), IGNORE_EXCEPTION) ; 178 testRange->setEnd(range.endContainer(), range.endOffset(), IGNORE_EXCEPTION) ;
179 ASSERT(testRange->startContainer() == &scope); 179 ASSERT(testRange->startContainer() == &scope);
180 size_t end = TextIterator::rangeLength(testRange.get()); 180 size_t end = TextIterator::rangeLength(testRange.get());
181 181
182 return PlainTextRange(start, end); 182 return PlainTextRange(start, end);
183 } 183 }
184 184
185 } 185 }
OLDNEW
« no previous file with comments | « Source/core/editing/InsertListCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698