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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 // 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 "SymbolsIterator.h" 5 #include "SymbolsIterator.h"
6 6
7 #include "wtf/PtrUtil.h"
7 #include <unicode/uchar.h> 8 #include <unicode/uchar.h>
8 #include <unicode/uniset.h> 9 #include <unicode/uniset.h>
9 10
10 namespace blink { 11 namespace blink {
11 12
12 using namespace WTF::Unicode; 13 using namespace WTF::Unicode;
13 14
14 SymbolsIterator::SymbolsIterator(const UChar* buffer, unsigned bufferSize) 15 SymbolsIterator::SymbolsIterator(const UChar* buffer, unsigned bufferSize)
15 : m_utf16Iterator(adoptPtr(new UTF16TextIterator(buffer, bufferSize))) 16 : m_utf16Iterator(wrapUnique(new UTF16TextIterator(buffer, bufferSize)))
16 , m_bufferSize(bufferSize) 17 , m_bufferSize(bufferSize)
17 , m_nextChar(0) 18 , m_nextChar(0)
18 , m_atEnd(bufferSize == 0) 19 , m_atEnd(bufferSize == 0)
19 , m_currentFontFallbackPriority(FontFallbackPriority::Invalid) 20 , m_currentFontFallbackPriority(FontFallbackPriority::Invalid)
20 { 21 {
21 } 22 }
22 23
23 FontFallbackPriority SymbolsIterator::fontFallbackPriorityForCharacter(UChar32 c odepoint) 24 FontFallbackPriority SymbolsIterator::fontFallbackPriorityForCharacter(UChar32 c odepoint)
24 { 25 {
25 26
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return true; 146 return true;
146 } 147 }
147 } 148 }
148 *symbolsLimit = m_bufferSize; 149 *symbolsLimit = m_bufferSize;
149 *fontFallbackPriority = m_currentFontFallbackPriority; 150 *fontFallbackPriority = m_currentFontFallbackPriority;
150 m_atEnd = true; 151 m_atEnd = true;
151 return true; 152 return true;
152 } 153 }
153 154
154 } // namespace blink 155 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698