OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 { | 329 { |
330 if (!m_emptyRun && !m_eor.atEnd()) { | 330 if (!m_emptyRun && !m_eor.atEnd()) { |
331 unsigned startOffset = m_sor.offset(); | 331 unsigned startOffset = m_sor.offset(); |
332 unsigned endOffset = m_eor.offset(); | 332 unsigned endOffset = m_eor.offset(); |
333 | 333 |
334 if (!m_endOfRunAtEndOfLine.atEnd() && endOffset >= m_endOfRunAtEndOfLine .offset()) { | 334 if (!m_endOfRunAtEndOfLine.atEnd() && endOffset >= m_endOfRunAtEndOfLine .offset()) { |
335 m_reachedEndOfLine = true; | 335 m_reachedEndOfLine = true; |
336 endOffset = m_endOfRunAtEndOfLine.offset(); | 336 endOffset = m_endOfRunAtEndOfLine.offset(); |
337 } | 337 } |
338 | 338 |
339 if (endOffset >= startOffset) | 339 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.
| |
340 runs.addRun(new Run(startOffset, endOffset + 1, context(), m_directi on)); | 340 while (startOffset < endOffset) { |
341 unsigned end = endOffset; | |
342 const int limit = USHRT_MAX; // Use a small number in Debug to keep the code well tested? | |
343 if (end - startOffset > limit) | |
344 end = startOffset + limit; | |
345 runs.addRun(new Run(startOffset, end, context(), m_direction)); | |
346 startOffset = end; | |
347 } | |
341 | 348 |
342 m_eor.increment(); | 349 m_eor.increment(); |
343 m_sor = m_eor; | 350 m_sor = m_eor; |
344 } | 351 } |
345 | 352 |
346 m_direction = WTF::Unicode::OtherNeutral; | 353 m_direction = WTF::Unicode::OtherNeutral; |
347 m_status.eor = WTF::Unicode::OtherNeutral; | 354 m_status.eor = WTF::Unicode::OtherNeutral; |
348 } | 355 } |
349 | 356 |
350 template <class Iterator, class Run> | 357 template <class Iterator, class Run> |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1078 template<class Iterator, class Run> | 1085 template<class Iterator, class Run> |
1079 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun (Run* run) | 1086 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun (Run* run) |
1080 { | 1087 { |
1081 return m_midpointStateForIsolatedRun.take(run); | 1088 return m_midpointStateForIsolatedRun.take(run); |
1082 } | 1089 } |
1083 | 1090 |
1084 | 1091 |
1085 } // namespace blink | 1092 } // namespace blink |
1086 | 1093 |
1087 #endif // BidiResolver_h | 1094 #endif // BidiResolver_h |
OLD | NEW |