| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef LineLayoutText_h | 5 #ifndef LineLayoutText_h |
| 6 #define LineLayoutText_h | 6 #define LineLayoutText_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutText.h" | 8 #include "core/layout/LayoutText.h" |
| 9 #include "core/layout/api/LineLayoutItem.h" | 9 #include "core/layout/api/LineLayoutItem.h" |
| 10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 HashSet<const SimpleFontData*>* fallback_fonts = nullptr, | 102 HashSet<const SimpleFontData*>* fallback_fonts = nullptr, |
| 103 FloatRect* glyph_bounds = nullptr) const { | 103 FloatRect* glyph_bounds = nullptr) const { |
| 104 return ToText()->Width(from, len, x_pos, text_direction, first_line, | 104 return ToText()->Width(from, len, x_pos, text_direction, first_line, |
| 105 fallback_fonts, glyph_bounds); | 105 fallback_fonts, glyph_bounds); |
| 106 } | 106 } |
| 107 | 107 |
| 108 float HyphenWidth(const Font& font, TextDirection text_direction) { | 108 float HyphenWidth(const Font& font, TextDirection text_direction) { |
| 109 return ToText()->HyphenWidth(font, text_direction); | 109 return ToText()->HyphenWidth(font, text_direction); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void SelectionStartEnd(int& spos, int& epos) const { | 112 std::pair<int, int> SelectionStartEnd() const { |
| 113 return ToText()->SelectionStartEnd(spos, epos); | 113 return ToText()->SelectionStartEnd(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 unsigned TextStartOffset() const { return ToText()->TextStartOffset(); } | 116 unsigned TextStartOffset() const { return ToText()->TextStartOffset(); } |
| 117 | 117 |
| 118 float MinLogicalWidth() const { return ToText()->MinLogicalWidth(); } | 118 float MinLogicalWidth() const { return ToText()->MinLogicalWidth(); } |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 LayoutText* ToText() { return ToLayoutText(GetLayoutObject()); } | 121 LayoutText* ToText() { return ToLayoutText(GetLayoutObject()); } |
| 122 const LayoutText* ToText() const { return ToLayoutText(GetLayoutObject()); } | 122 const LayoutText* ToText() const { return ToLayoutText(GetLayoutObject()); } |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace blink | 125 } // namespace blink |
| 126 | 126 |
| 127 #endif // LineLayoutText_h | 127 #endif // LineLayoutText_h |
| OLD | NEW |