| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/fonts/shaping/RunSegmenter.h" | 5 #include "platform/fonts/shaping/RunSegmenter.h" |
| 6 | 6 |
| 7 #include "platform/fonts/ScriptRunIterator.h" | 7 #include "platform/fonts/ScriptRunIterator.h" |
| 8 #include "platform/fonts/SmallCapsIterator.h" | 8 #include "platform/fonts/SmallCapsIterator.h" |
| 9 #include "platform/fonts/SymbolsIterator.h" | 9 #include "platform/fonts/SymbolsIterator.h" |
| 10 #include "platform/fonts/UTF16TextIterator.h" | 10 #include "platform/fonts/UTF16TextIterator.h" |
| 11 #include "platform/text/Character.h" | 11 #include "platform/text/Character.h" |
| 12 #include "wtf/Assertions.h" | 12 #include "platform/wtf/Assertions.h" |
| 13 #include "wtf/PtrUtil.h" | 13 #include "platform/wtf/PtrUtil.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 RunSegmenter::RunSegmenter(const UChar* buffer, | 17 RunSegmenter::RunSegmenter(const UChar* buffer, |
| 18 unsigned bufferSize, | 18 unsigned bufferSize, |
| 19 FontOrientation runOrientation) | 19 FontOrientation runOrientation) |
| 20 : m_bufferSize(bufferSize), | 20 : m_bufferSize(bufferSize), |
| 21 m_candidateRange(nullRange()), | 21 m_candidateRange(nullRange()), |
| 22 m_scriptRunIterator( | 22 m_scriptRunIterator( |
| 23 WTF::makeUnique<ScriptRunIterator>(buffer, bufferSize)), | 23 WTF::makeUnique<ScriptRunIterator>(buffer, bufferSize)), |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 m_candidateRange.start = m_candidateRange.end; | 95 m_candidateRange.start = m_candidateRange.end; |
| 96 m_candidateRange.end = m_lastSplit; | 96 m_candidateRange.end = m_lastSplit; |
| 97 *nextRange = m_candidateRange; | 97 *nextRange = m_candidateRange; |
| 98 | 98 |
| 99 m_atEnd = m_lastSplit == m_bufferSize; | 99 m_atEnd = m_lastSplit == m_bufferSize; |
| 100 return true; | 100 return true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace blink | 103 } // namespace blink |
| OLD | NEW |