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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/CaseMappingHarfBuzzBufferFiller.h

Issue 2102113002: Fix case mapping buffer length divergence for synthetic caps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turkish test is a progression, rebaselining, Moving comment up in test case Created 4 years, 5 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 #ifndef CaseMappingHarfBuzzBufferFiller_h 5 #ifndef CaseMappingHarfBuzzBufferFiller_h
6 #define CaseMappingHarfBuzzBufferFiller_h 6 #define CaseMappingHarfBuzzBufferFiller_h
7 7
8 #include "wtf/Allocator.h" 8 #include "wtf/Allocator.h"
9 #include "wtf/text/AtomicString.h"
9 #include "wtf/text/Unicode.h" 10 #include "wtf/text/Unicode.h"
10 11
11 #include <hb.h> 12 #include <hb.h>
12 13
13 namespace blink { 14 namespace blink {
14 15
15 enum class CaseMapIntend { 16 enum class CaseMapIntend {
16 KeepSameCase, 17 KeepSameCase,
17 UpperCase, 18 UpperCase,
18 LowerCase 19 LowerCase
19 }; 20 };
20 21
21 class CaseMappingHarfBuzzBufferFiller { 22 class CaseMappingHarfBuzzBufferFiller {
22 STACK_ALLOCATED() 23 STACK_ALLOCATED()
23 24
24 public: 25 public:
25 CaseMappingHarfBuzzBufferFiller( 26 CaseMappingHarfBuzzBufferFiller(
26 CaseMapIntend, 27 CaseMapIntend,
28 AtomicString locale,
27 hb_buffer_t* harfBuzzBuffer, 29 hb_buffer_t* harfBuzzBuffer,
28 const UChar* buffer, 30 const UChar* buffer,
29 unsigned bufferLength, 31 unsigned bufferLength,
30 unsigned startIndex, 32 unsigned startIndex,
31 unsigned numCharacters); 33 unsigned numCharacters);
32 34
33 private: 35 private:
36 void fillSlowCase(CaseMapIntend,
37 AtomicString locale,
38 const UChar* buffer,
39 unsigned bufferLength,
40 unsigned startIndex,
41 unsigned numCharacters);
34 hb_buffer_t* m_harfBuzzBuffer; 42 hb_buffer_t* m_harfBuzzBuffer;
35 }; 43 };
36 44
37 } // namespace blink 45 } // namespace blink
38 46
39 #endif 47 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698