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

Side by Side Diff: Source/platform/text/BidiResolver.h

Issue 853903002: Render string sequences of more than 64k characters. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed tests. Created 5 years, 11 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
OLDNEW
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
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
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
OLDNEW
« Source/core/rendering/InlineIterator.h ('K') | « Source/core/rendering/InlineIterator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698