| OLD | NEW |
| 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 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1726 r->setStart(n, offset - 1, ASSERT_NO_EXCEPTION); | 1726 r->setStart(n, offset - 1, ASSERT_NO_EXCEPTION); |
| 1727 r->setEnd(n, offset, ASSERT_NO_EXCEPTION); | 1727 r->setEnd(n, offset, ASSERT_NO_EXCEPTION); |
| 1728 } | 1728 } |
| 1729 } | 1729 } |
| 1730 return r.release(); | 1730 return r.release(); |
| 1731 } | 1731 } |
| 1732 | 1732 |
| 1733 Position BackwardsCharacterIterator::endPosition() const | 1733 Position BackwardsCharacterIterator::endPosition() const |
| 1734 { | 1734 { |
| 1735 Node* n = m_textIterator.startContainer(); | 1735 Node* n = m_textIterator.startContainer(); |
| 1736 if (m_textIterator.atEnd()) { | 1736 if (!m_textIterator.atEnd()) { |
| 1737 if (m_textIterator.length() > 1) | 1737 if (m_textIterator.length() > 1) |
| 1738 return createLegacyEditingPosition(n, m_textIterator.endOffset() - m
_runOffset); | 1738 return createLegacyEditingPosition(n, m_textIterator.endOffset() - m
_runOffset); |
| 1739 ASSERT(!m_runOffset); | 1739 ASSERT(!m_runOffset); |
| 1740 } | 1740 } |
| 1741 return createLegacyEditingPosition(n, m_textIterator.endOffset()); | 1741 return createLegacyEditingPosition(n, m_textIterator.endOffset()); |
| 1742 } | 1742 } |
| 1743 | 1743 |
| 1744 void BackwardsCharacterIterator::advance(int count) | 1744 void BackwardsCharacterIterator::advance(int count) |
| 1745 { | 1745 { |
| 1746 if (count <= 0) { | 1746 if (count <= 0) { |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2323 resultEnd = collapseTo; | 2323 resultEnd = collapseTo; |
| 2324 return; | 2324 return; |
| 2325 } | 2325 } |
| 2326 } | 2326 } |
| 2327 | 2327 |
| 2328 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo
rFindPlainText); | 2328 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo
rFindPlainText); |
| 2329 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re
sultStart, resultEnd); | 2329 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re
sultStart, resultEnd); |
| 2330 } | 2330 } |
| 2331 | 2331 |
| 2332 } | 2332 } |
| OLD | NEW |