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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/OrientationIterator.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 "OrientationIterator.h" 5 #include "OrientationIterator.h"
6 6
7 #include "wtf/PtrUtil.h"
8
7 namespace blink { 9 namespace blink {
8 10
9 OrientationIterator::OrientationIterator(const UChar* buffer, unsigned bufferSiz e, FontOrientation runOrientation) 11 OrientationIterator::OrientationIterator(const UChar* buffer, unsigned bufferSiz e, FontOrientation runOrientation)
10 : m_utf16Iterator(adoptPtr(new UTF16TextIterator(buffer, bufferSize))) 12 : m_utf16Iterator(wrapUnique(new UTF16TextIterator(buffer, bufferSize)))
11 , m_bufferSize(bufferSize) 13 , m_bufferSize(bufferSize)
12 , m_atEnd(bufferSize == 0) 14 , m_atEnd(bufferSize == 0)
13 { 15 {
14 // There's not much point in segmenting by isUprightInVertical if the text 16 // There's not much point in segmenting by isUprightInVertical if the text
15 // orientation is not "mixed". 17 // orientation is not "mixed".
16 ASSERT(runOrientation == FontOrientation::VerticalMixed); 18 ASSERT(runOrientation == FontOrientation::VerticalMixed);
17 } 19 }
18 20
19 bool OrientationIterator::consume(unsigned *orientationLimit, RenderOrientation* renderOrientation) 21 bool OrientationIterator::consume(unsigned *orientationLimit, RenderOrientation* renderOrientation)
20 { 22 {
(...skipping 19 matching lines...) Expand all
40 } 42 }
41 m_utf16Iterator->advance(); 43 m_utf16Iterator->advance();
42 } 44 }
43 *orientationLimit = m_bufferSize; 45 *orientationLimit = m_bufferSize;
44 *renderOrientation = currentRenderOrientation; 46 *renderOrientation = currentRenderOrientation;
45 m_atEnd = true; 47 m_atEnd = true;
46 return true; 48 return true;
47 } 49 }
48 50
49 } // namespace blink 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698