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

Side by Side Diff: third_party/WebKit/Source/platform/text/mac/HyphenationMac.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/text/Hyphenation.h" 5 #include "platform/text/Hyphenation.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h>
7 #include "wtf/RetainPtr.h" 8 #include "wtf/RetainPtr.h"
8 #include "wtf/text/StringView.h" 9 #include "wtf/text/StringView.h"
9 #include <CoreFoundation/CoreFoundation.h>
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class HyphenationCF : public Hyphenation { 13 class HyphenationCF : public Hyphenation {
14 public: 14 public:
15 HyphenationCF(RetainPtr<CFLocaleRef>& localeCF) : m_localeCF(localeCF) { 15 HyphenationCF(RetainPtr<CFLocaleRef>& localeCF) : m_localeCF(localeCF) {
16 DCHECK(m_localeCF); 16 DCHECK(m_localeCF);
17 } 17 }
18 18
19 size_t lastHyphenLocation(const StringView& text, 19 size_t lastHyphenLocation(const StringView& text,
(...skipping 12 matching lines...) Expand all
32 const AtomicString& locale) { 32 const AtomicString& locale) {
33 RetainPtr<CFStringRef> localeCFString = locale.impl()->createCFString(); 33 RetainPtr<CFStringRef> localeCFString = locale.impl()->createCFString();
34 RetainPtr<CFLocaleRef> localeCF = 34 RetainPtr<CFLocaleRef> localeCF =
35 adoptCF(CFLocaleCreate(kCFAllocatorDefault, localeCFString.get())); 35 adoptCF(CFLocaleCreate(kCFAllocatorDefault, localeCFString.get()));
36 if (!CFStringIsHyphenationAvailableForLocale(localeCF.get())) 36 if (!CFStringIsHyphenationAvailableForLocale(localeCF.get()))
37 return nullptr; 37 return nullptr;
38 return adoptRef(new HyphenationCF(localeCF)); 38 return adoptRef(new HyphenationCF(localeCF));
39 } 39 }
40 40
41 } // namespace blink 41 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698