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

Side by Side Diff: ui/gfx/render_text_harfbuzz.cc

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | ui/gfx/test/fontconfig_util_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/gfx/render_text_harfbuzz.h" 5 #include "ui/gfx/render_text_harfbuzz.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "base/i18n/bidi_line_iterator.h" 10 #include "base/i18n/bidi_line_iterator.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 // The current RTL run segments, to be applied by |UpdateRTLSegmentRanges()|. 524 // The current RTL run segments, to be applied by |UpdateRTLSegmentRanges()|.
525 std::vector<SegmentHandle> rtl_segments_; 525 std::vector<SegmentHandle> rtl_segments_;
526 526
527 DISALLOW_COPY_AND_ASSIGN(HarfBuzzLineBreaker); 527 DISALLOW_COPY_AND_ASSIGN(HarfBuzzLineBreaker);
528 }; 528 };
529 529
530 // Function object for case insensitive string comparison. 530 // Function object for case insensitive string comparison.
531 struct CaseInsensitiveCompare { 531 struct CaseInsensitiveCompare {
532 bool operator() (const std::string& a, const std::string& b) const { 532 bool operator() (const std::string& a, const std::string& b) const {
533 return base::strncasecmp(a.c_str(), b.c_str(), b.length()) < 0; 533 return base::CompareCaseInsensitiveASCII(a, b) < 0;
534 } 534 }
535 }; 535 };
536 536
537 } // namespace 537 } // namespace
538 538
539 namespace internal { 539 namespace internal {
540 540
541 TextRunHarfBuzz::TextRunHarfBuzz() 541 TextRunHarfBuzz::TextRunHarfBuzz()
542 : width(0.0f), 542 : width(0.0f),
543 preceding_run_widths(0.0f), 543 preceding_run_widths(0.0f),
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 DCHECK(!update_layout_run_list_); 1527 DCHECK(!update_layout_run_list_);
1528 DCHECK(!update_display_run_list_); 1528 DCHECK(!update_display_run_list_);
1529 return text_elided() ? display_run_list_.get() : &layout_run_list_; 1529 return text_elided() ? display_run_list_.get() : &layout_run_list_;
1530 } 1530 }
1531 1531
1532 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { 1532 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const {
1533 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); 1533 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList();
1534 } 1534 }
1535 1535
1536 } // namespace gfx 1536 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | ui/gfx/test/fontconfig_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698