Chromium Code Reviews| Index: Source/platform/text/BidiResolver.h |
| diff --git a/Source/platform/text/BidiResolver.h b/Source/platform/text/BidiResolver.h |
| index 356f89488517ce6c997c074e375deb1df0867f32..9a9ae025947d17721fedcd568733984b91bea47f 100644 |
| --- a/Source/platform/text/BidiResolver.h |
| +++ b/Source/platform/text/BidiResolver.h |
| @@ -336,8 +336,15 @@ void BidiResolver<Iterator, Run>::appendRun(BidiRunList<Run>& runs) |
| endOffset = m_endOfRunAtEndOfLine.offset(); |
| } |
| - if (endOffset >= startOffset) |
| - runs.addRun(new Run(startOffset, endOffset + 1, context(), m_direction)); |
| + endOffset += 1; |
|
eae
2015/01/15 20:07:07
I know you just moved this but a comment explainin
Daniel Bratell
2015/01/16 13:47:32
Done.
|
| + while (startOffset < endOffset) { |
| + unsigned end = endOffset; |
| + const int limit = USHRT_MAX; // Use a small number in Debug to keep the code well tested? |
| + if (end - startOffset > limit) |
| + end = startOffset + limit; |
| + runs.addRun(new Run(startOffset, end, context(), m_direction)); |
| + startOffset = end; |
| + } |
| m_eor.increment(); |
| m_sor = m_eor; |