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 | 8 |
9 #include "base/i18n/bidi_line_iterator.h" | 9 #include "base/i18n/bidi_line_iterator.h" |
10 #include "base/i18n/break_iterator.h" | 10 #include "base/i18n/break_iterator.h" |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 update_display_text_ = false; | 646 update_display_text_ = false; |
647 display_run_list_.reset(); | 647 display_run_list_.reset(); |
648 return layout_text(); | 648 return layout_text(); |
649 } | 649 } |
650 | 650 |
651 EnsureLayoutRunList(); | 651 EnsureLayoutRunList(); |
652 DCHECK(!update_display_text_); | 652 DCHECK(!update_display_text_); |
653 return text_elided() ? display_text() : layout_text(); | 653 return text_elided() ? display_text() : layout_text(); |
654 } | 654 } |
655 | 655 |
| 656 bool RenderTextHarfBuzz::MultilineSupported() const { |
| 657 return true; |
| 658 } |
| 659 |
656 Size RenderTextHarfBuzz::GetStringSize() { | 660 Size RenderTextHarfBuzz::GetStringSize() { |
657 const SizeF size_f = GetStringSizeF(); | 661 const SizeF size_f = GetStringSizeF(); |
658 return Size(std::ceil(size_f.width()), size_f.height()); | 662 return Size(std::ceil(size_f.width()), size_f.height()); |
659 } | 663 } |
660 | 664 |
661 SizeF RenderTextHarfBuzz::GetStringSizeF() { | 665 SizeF RenderTextHarfBuzz::GetStringSizeF() { |
662 EnsureLayout(); | 666 EnsureLayout(); |
663 return total_size_; | 667 return total_size_; |
664 } | 668 } |
665 | 669 |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 DCHECK(!update_layout_run_list_); | 1472 DCHECK(!update_layout_run_list_); |
1469 DCHECK(!update_display_run_list_); | 1473 DCHECK(!update_display_run_list_); |
1470 return text_elided() ? display_run_list_.get() : &layout_run_list_; | 1474 return text_elided() ? display_run_list_.get() : &layout_run_list_; |
1471 } | 1475 } |
1472 | 1476 |
1473 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { | 1477 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { |
1474 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); | 1478 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); |
1475 } | 1479 } |
1476 | 1480 |
1477 } // namespace gfx | 1481 } // namespace gfx |
OLD | NEW |