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

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

Issue 2807913002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts Created 3 years, 8 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 "CaseMappingHarfBuzzBufferFiller.h" 5 #include "CaseMappingHarfBuzzBufferFiller.h"
6 6
7 #include "platform/wtf/text/WTFString.h" 7 #include "platform/wtf/text/WTFString.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 25 matching lines...) Expand all
36 } else { 36 } else {
37 caseMappedText = String(buffer, bufferLength).lower(locale); 37 caseMappedText = String(buffer, bufferLength).lower(locale);
38 } 38 }
39 39
40 if (caseMappedText.length() != bufferLength) { 40 if (caseMappedText.length() != bufferLength) {
41 fillSlowCase(caseMapIntend, locale, buffer, bufferLength, startIndex, 41 fillSlowCase(caseMapIntend, locale, buffer, bufferLength, startIndex,
42 numCharacters); 42 numCharacters);
43 return; 43 return;
44 } 44 }
45 45
46 ASSERT(caseMappedText.length() == bufferLength); 46 DCHECK_EQ(caseMappedText.length(), bufferLength);
47 ASSERT(!caseMappedText.is8Bit()); 47 DCHECK(!caseMappedText.is8Bit());
48 hb_buffer_add_utf16(m_harfBuzzBuffer, 48 hb_buffer_add_utf16(m_harfBuzzBuffer,
49 toUint16(caseMappedText.characters16()), bufferLength, 49 toUint16(caseMappedText.characters16()), bufferLength,
50 startIndex, numCharacters); 50 startIndex, numCharacters);
51 } 51 }
52 } 52 }
53 53
54 // TODO(drott): crbug.com/623940 Fix lack of context sensitive case mapping 54 // TODO(drott): crbug.com/623940 Fix lack of context sensitive case mapping
55 // here. 55 // here.
56 void CaseMappingHarfBuzzBufferFiller::fillSlowCase(CaseMapIntend caseMapIntend, 56 void CaseMappingHarfBuzzBufferFiller::fillSlowCase(CaseMapIntend caseMapIntend,
57 AtomicString locale, 57 AtomicString locale,
(...skipping 26 matching lines...) Expand all
84 } 84 }
85 charIndex = newCharIndex; 85 charIndex = newCharIndex;
86 } 86 }
87 87
88 // Record post-context 88 // Record post-context
89 hb_buffer_add_utf16(m_harfBuzzBuffer, toUint16(buffer), bufferLength, 89 hb_buffer_add_utf16(m_harfBuzzBuffer, toUint16(buffer), bufferLength,
90 startIndex + numCharacters, 0); 90 startIndex + numCharacters, 0);
91 } 91 }
92 92
93 } // namespace blink 93 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698