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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/RunSegmenter.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 // 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 "wtf/Assertions.h"
13 #include "wtf/PtrUtil.h" 13 #include "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({0, 0, USCRIPT_INVALID_CODE, 21 m_candidateRange({0, 0, USCRIPT_INVALID_CODE,
22 OrientationIterator::OrientationKeep, 22 OrientationIterator::OrientationKeep,
23 FontFallbackPriority::Text}), 23 FontFallbackPriority::Text}),
24 m_scriptRunIterator(makeUnique<ScriptRunIterator>(buffer, bufferSize)), 24 m_scriptRunIterator(
25 WTF::makeUnique<ScriptRunIterator>(buffer, bufferSize)),
25 m_orientationIterator( 26 m_orientationIterator(
26 runOrientation == FontOrientation::VerticalMixed 27 runOrientation == FontOrientation::VerticalMixed
27 ? wrapUnique( 28 ? WTF::wrapUnique(
28 new OrientationIterator(buffer, bufferSize, runOrientation)) 29 new OrientationIterator(buffer, bufferSize, runOrientation))
29 : nullptr), 30 : nullptr),
30 m_symbolsIterator(makeUnique<SymbolsIterator>(buffer, bufferSize)), 31 m_symbolsIterator(WTF::makeUnique<SymbolsIterator>(buffer, bufferSize)),
31 m_lastSplit(0), 32 m_lastSplit(0),
32 m_scriptRunIteratorPosition(0), 33 m_scriptRunIteratorPosition(0),
33 m_orientationIteratorPosition( 34 m_orientationIteratorPosition(
34 runOrientation == FontOrientation::VerticalMixed ? 0 : m_bufferSize), 35 runOrientation == FontOrientation::VerticalMixed ? 0 : m_bufferSize),
35 m_symbolsIteratorPosition(0), 36 m_symbolsIteratorPosition(0),
36 m_atEnd(false) {} 37 m_atEnd(false) {}
37 38
38 void RunSegmenter::consumeScriptIteratorPastLastSplit() { 39 void RunSegmenter::consumeScriptIteratorPastLastSplit() {
39 ASSERT(m_scriptRunIterator); 40 ASSERT(m_scriptRunIterator);
40 if (m_scriptRunIteratorPosition <= m_lastSplit && 41 if (m_scriptRunIteratorPosition <= m_lastSplit &&
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 m_candidateRange.start = m_candidateRange.end; 97 m_candidateRange.start = m_candidateRange.end;
97 m_candidateRange.end = m_lastSplit; 98 m_candidateRange.end = m_lastSplit;
98 *nextRange = m_candidateRange; 99 *nextRange = m_candidateRange;
99 100
100 m_atEnd = m_lastSplit == m_bufferSize; 101 m_atEnd = m_lastSplit == m_bufferSize;
101 return true; 102 return true;
102 } 103 }
103 104
104 } // namespace blink 105 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698