Chromium Code Reviews| Index: Source/core/editing/TextIterator.cpp |
| diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp |
| index f806c98df89e1187bd7e88b26f7ffa9211a591ee..a76f291c0646c152262c5b9fea371ee0698bd5de 100644 |
| --- a/Source/core/editing/TextIterator.cpp |
| +++ b/Source/core/editing/TextIterator.cpp |
| @@ -266,6 +266,7 @@ TextIterator::TextIterator(const Range* range, TextIteratorBehaviorFlags behavio |
| , m_emitsImageAltText(behavior & TextIteratorEmitsImageAltText) |
| , m_entersAuthorShadowRoots(behavior & TextIteratorEntersAuthorShadowRoots) |
| , m_emitsObjectReplacementCharacter(behavior & TextIteratorEmitsObjectReplacementCharacter) |
| + , m_breakAtZeroLengthBoundary(behavior & TextIteratorBreakAtZeroLengthBoundary) |
| { |
| if (range) |
| initialize(range->startPosition(), range->endPosition()); |
| @@ -297,6 +298,7 @@ TextIterator::TextIterator(const Position& start, const Position& end, TextItera |
| , m_emitsImageAltText(behavior & TextIteratorEmitsImageAltText) |
| , m_entersAuthorShadowRoots(behavior & TextIteratorEntersAuthorShadowRoots) |
| , m_emitsObjectReplacementCharacter(behavior & TextIteratorEmitsObjectReplacementCharacter) |
| + , m_breakAtZeroLengthBoundary(behavior & TextIteratorBreakAtZeroLengthBoundary) |
| { |
| initialize(start, end); |
| } |
| @@ -1746,7 +1748,7 @@ void CharacterIterator::advance(int count) |
| for (m_textIterator.advance(); !atEnd(); m_textIterator.advance()) { |
| int runLength = m_textIterator.length(); |
| if (!runLength) { |
| - m_atBreak = true; |
| + m_atBreak = m_textIterator.breakAtZeroLengthBoundary(); |
|
yosin_UTC9
2014/10/03 07:53:56
Please make default value of |m_breakAtZeroLengthB
|
| } else { |
| // see whether this is m_textIterator to use |
| if (count < runLength) { |