| 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 "OrientationIterator.h" | 5 #include "OrientationIterator.h" |
| 6 | 6 |
| 7 #include "wtf/PtrUtil.h" | 7 #include "platform/wtf/PtrUtil.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 OrientationIterator::OrientationIterator(const UChar* buffer, | 11 OrientationIterator::OrientationIterator(const UChar* buffer, |
| 12 unsigned bufferSize, | 12 unsigned bufferSize, |
| 13 FontOrientation runOrientation) | 13 FontOrientation runOrientation) |
| 14 : m_utf16Iterator(WTF::makeUnique<UTF16TextIterator>(buffer, bufferSize)), | 14 : m_utf16Iterator(WTF::makeUnique<UTF16TextIterator>(buffer, bufferSize)), |
| 15 m_bufferSize(bufferSize), | 15 m_bufferSize(bufferSize), |
| 16 m_atEnd(bufferSize == 0) { | 16 m_atEnd(bufferSize == 0) { |
| 17 // There's not much point in segmenting by isUprightInVertical if the text | 17 // There's not much point in segmenting by isUprightInVertical if the text |
| (...skipping 25 matching lines...) Expand all Loading... |
| 43 } | 43 } |
| 44 m_utf16Iterator->advance(); | 44 m_utf16Iterator->advance(); |
| 45 } | 45 } |
| 46 *orientationLimit = m_bufferSize; | 46 *orientationLimit = m_bufferSize; |
| 47 *renderOrientation = currentRenderOrientation; | 47 *renderOrientation = currentRenderOrientation; |
| 48 m_atEnd = true; | 48 m_atEnd = true; |
| 49 return true; | 49 return true; |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace blink | 52 } // namespace blink |
| OLD | NEW |