| OLD | NEW |
| 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 | 521 |
| 522 // The current RTL run segments, to be applied by |UpdateRTLSegmentRanges()|. | 522 // The current RTL run segments, to be applied by |UpdateRTLSegmentRanges()|. |
| 523 std::vector<SegmentHandle> rtl_segments_; | 523 std::vector<SegmentHandle> rtl_segments_; |
| 524 | 524 |
| 525 DISALLOW_COPY_AND_ASSIGN(HarfBuzzLineBreaker); | 525 DISALLOW_COPY_AND_ASSIGN(HarfBuzzLineBreaker); |
| 526 }; | 526 }; |
| 527 | 527 |
| 528 // Function object for case insensitive string comparison. | 528 // Function object for case insensitive string comparison. |
| 529 struct CaseInsensitiveCompare { | 529 struct CaseInsensitiveCompare { |
| 530 bool operator() (const std::string& a, const std::string& b) const { | 530 bool operator() (const std::string& a, const std::string& b) const { |
| 531 return base::strncasecmp(a.c_str(), b.c_str(), b.length()) < 0; | 531 return base::CompareCaseInsensitiveASCII(a, b) < 0; |
| 532 } | 532 } |
| 533 }; | 533 }; |
| 534 | 534 |
| 535 } // namespace | 535 } // namespace |
| 536 | 536 |
| 537 namespace internal { | 537 namespace internal { |
| 538 | 538 |
| 539 TextRunHarfBuzz::TextRunHarfBuzz() | 539 TextRunHarfBuzz::TextRunHarfBuzz() |
| 540 : width(0.0f), | 540 : width(0.0f), |
| 541 preceding_run_widths(0.0f), | 541 preceding_run_widths(0.0f), |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 DCHECK(!update_layout_run_list_); | 1525 DCHECK(!update_layout_run_list_); |
| 1526 DCHECK(!update_display_run_list_); | 1526 DCHECK(!update_display_run_list_); |
| 1527 return text_elided() ? display_run_list_.get() : &layout_run_list_; | 1527 return text_elided() ? display_run_list_.get() : &layout_run_list_; |
| 1528 } | 1528 } |
| 1529 | 1529 |
| 1530 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { | 1530 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { |
| 1531 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); | 1531 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 } // namespace gfx | 1534 } // namespace gfx |
| OLD | NEW |