| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |