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 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1738 return; | 1738 return; |
1739 } | 1739 } |
1740 | 1740 |
1741 // exhaust the current m_textIterator run | 1741 // exhaust the current m_textIterator run |
1742 count -= remaining; | 1742 count -= remaining; |
1743 m_offset += remaining; | 1743 m_offset += remaining; |
1744 | 1744 |
1745 // move to a subsequent m_textIterator run | 1745 // move to a subsequent m_textIterator run |
1746 for (m_textIterator.advance(); !atEnd(); m_textIterator.advance()) { | 1746 for (m_textIterator.advance(); !atEnd(); m_textIterator.advance()) { |
1747 int runLength = m_textIterator.length(); | 1747 int runLength = m_textIterator.length(); |
1748 if (!runLength) { | 1748 if (runLength) { |
mlamouri (slow - plz ping)
2014/10/02 10:44:26
if (!m_textIterator.length())
continue;
(or use
| |
1749 m_atBreak = true; | |
1750 } else { | |
1751 // see whether this is m_textIterator to use | 1749 // see whether this is m_textIterator to use |
1752 if (count < runLength) { | 1750 if (count < runLength) { |
1753 m_runOffset = count; | 1751 m_runOffset = count; |
1754 m_offset += count; | 1752 m_offset += count; |
1755 return; | 1753 return; |
1756 } | 1754 } |
1757 | 1755 |
1758 // exhaust this m_textIterator run | 1756 // exhaust this m_textIterator run |
1759 count -= runLength; | 1757 count -= runLength; |
1760 m_offset += runLength; | 1758 m_offset += runLength; |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2419 resultEnd = collapseTo; | 2417 resultEnd = collapseTo; |
2420 return; | 2418 return; |
2421 } | 2419 } |
2422 } | 2420 } |
2423 | 2421 |
2424 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); | 2422 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); |
2425 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd); | 2423 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd); |
2426 } | 2424 } |
2427 | 2425 |
2428 } | 2426 } |
OLD | NEW |