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

Side by Side Diff: Source/core/editing/TextIterator.cpp

Issue 252783002: Make Range.detach() a no-op (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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/TextIteratorTest.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 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 } 2069 }
2070 2070
2071 if (!bufferLength) 2071 if (!bufferLength)
2072 return emptyString(); 2072 return emptyString();
2073 2073
2074 return builder.toString(); 2074 return builder.toString();
2075 } 2075 }
2076 2076
2077 static PassRefPtrWillBeRawPtr<Range> collapsedToBoundary(const Range* range, boo l forward) 2077 static PassRefPtrWillBeRawPtr<Range> collapsedToBoundary(const Range* range, boo l forward)
2078 { 2078 {
2079 RefPtrWillBeRawPtr<Range> result = range->cloneRange(ASSERT_NO_EXCEPTION); 2079 RefPtrWillBeRawPtr<Range> result = range->cloneRange();
2080 result->collapse(!forward, ASSERT_NO_EXCEPTION); 2080 result->collapse(!forward);
2081 return result.release(); 2081 return result.release();
2082 } 2082 }
2083 2083
2084 // Check if there's any unpaird surrogate code point. 2084 // Check if there's any unpaird surrogate code point.
2085 // Non-character code points are not checked. 2085 // Non-character code points are not checked.
2086 static bool isValidUTF16(const String& s) 2086 static bool isValidUTF16(const String& s)
2087 { 2087 {
2088 if (s.is8Bit()) 2088 if (s.is8Bit())
2089 return true; 2089 return true;
2090 const UChar* ustr = s.characters16(); 2090 const UChar* ustr = s.characters16();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 resultEnd = collapseTo; 2195 resultEnd = collapseTo;
2196 return; 2196 return;
2197 } 2197 }
2198 } 2198 }
2199 2199
2200 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); 2200 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText);
2201 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd); 2201 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd);
2202 } 2202 }
2203 2203
2204 } 2204 }
OLDNEW
« no previous file with comments | « Source/core/editing/TextCheckingHelper.cpp ('k') | Source/core/editing/TextIteratorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698