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

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

Issue 624483002: Make TextIterator not stop at IMG element for finding text separating inline image (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « LayoutTests/editing/text-iterator/findString-expected.txt ('k') | no next file » | 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 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/editing/text-iterator/findString-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698