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

Side by Side Diff: Source/core/editing/TextIterator.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
« no previous file with comments | « Source/core/editing/TextCheckingHelper.cpp ('k') | Source/core/editing/TypingCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 m_positionEndOffset += index; 1121 m_positionEndOffset += index;
1122 m_positionOffsetBaseNode = 0; 1122 m_positionOffsetBaseNode = 0;
1123 } 1123 }
1124 return Range::create(m_positionNode->document(), m_positionNode, m_posit ionStartOffset, m_positionNode, m_positionEndOffset); 1124 return Range::create(m_positionNode->document(), m_positionNode, m_posit ionStartOffset, m_positionNode, m_positionEndOffset);
1125 } 1125 }
1126 1126
1127 // otherwise, return the end of the overall range we were given 1127 // otherwise, return the end of the overall range we were given
1128 if (m_endContainer) 1128 if (m_endContainer)
1129 return Range::create(m_endContainer->document(), m_endContainer, m_endOf fset, m_endContainer, m_endOffset); 1129 return Range::create(m_endContainer->document(), m_endContainer, m_endOf fset, m_endContainer, m_endOffset);
1130 1130
1131 return 0; 1131 return nullptr;
1132 } 1132 }
1133 1133
1134 Node* TextIterator::node() const 1134 Node* TextIterator::node() const
1135 { 1135 {
1136 RefPtr<Range> textRange = range(); 1136 RefPtr<Range> textRange = range();
1137 if (!textRange) 1137 if (!textRange)
1138 return 0; 1138 return 0;
1139 1139
1140 Node* node = textRange->startContainer(); 1140 Node* node = textRange->startContainer();
1141 if (!node) 1141 if (!node)
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 if (!matchLength) 2081 if (!matchLength)
2082 return collapsedToBoundary(range, !(options & Backwards)); 2082 return collapsedToBoundary(range, !(options & Backwards));
2083 } 2083 }
2084 2084
2085 // Then, find the document position of the start and the end of the text. 2085 // Then, find the document position of the start and the end of the text.
2086 CharacterIterator computeRangeIterator(range, TextIteratorEntersTextControls | TextIteratorEntersAuthorShadowRoots); 2086 CharacterIterator computeRangeIterator(range, TextIteratorEntersTextControls | TextIteratorEntersAuthorShadowRoots);
2087 return characterSubrange(computeRangeIterator, matchStart, matchLength); 2087 return characterSubrange(computeRangeIterator, matchStart, matchLength);
2088 } 2088 }
2089 2089
2090 } 2090 }
OLDNEW
« no previous file with comments | « Source/core/editing/TextCheckingHelper.cpp ('k') | Source/core/editing/TypingCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698