| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const UChar* characters16() const { return toText()->characters16(); } | 72 const UChar* characters16() const { return toText()->characters16(); } |
| 73 | 73 |
| 74 bool hasEmptyText() const { return toText()->hasEmptyText(); } | 74 bool hasEmptyText() const { return toText()->hasEmptyText(); } |
| 75 | 75 |
| 76 unsigned textLength() const { return toText()->textLength(); } | 76 unsigned textLength() const { return toText()->textLength(); } |
| 77 | 77 |
| 78 unsigned resolvedTextLength() const { return toText()->resolvedTextLength(); } | 78 unsigned resolvedTextLength() const { return toText()->resolvedTextLength(); } |
| 79 | 79 |
| 80 const String& text() const { return toText()->text(); } | 80 const String& text() const { return toText()->text(); } |
| 81 | 81 |
| 82 bool containsOnlyWhitespace(unsigned from, unsigned len) const { |
| 83 return toText()->containsOnlyWhitespace(from, len); |
| 84 } |
| 85 |
| 82 float width(unsigned from, | 86 float width(unsigned from, |
| 83 unsigned len, | 87 unsigned len, |
| 84 const Font& font, | 88 const Font& font, |
| 85 LayoutUnit xPos, | 89 LayoutUnit xPos, |
| 86 TextDirection textDirection, | 90 TextDirection textDirection, |
| 87 HashSet<const SimpleFontData*>* fallbackFonts, | 91 HashSet<const SimpleFontData*>* fallbackFonts, |
| 88 FloatRect* glyphBounds) const { | 92 FloatRect* glyphBounds) const { |
| 89 return toText()->width(from, len, font, xPos, textDirection, fallbackFonts, | 93 return toText()->width(from, len, font, xPos, textDirection, fallbackFonts, |
| 90 glyphBounds); | 94 glyphBounds); |
| 91 } | 95 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 114 float minLogicalWidth() const { return toText()->minLogicalWidth(); } | 118 float minLogicalWidth() const { return toText()->minLogicalWidth(); } |
| 115 | 119 |
| 116 private: | 120 private: |
| 117 LayoutText* toText() { return toLayoutText(layoutObject()); } | 121 LayoutText* toText() { return toLayoutText(layoutObject()); } |
| 118 const LayoutText* toText() const { return toLayoutText(layoutObject()); } | 122 const LayoutText* toText() const { return toLayoutText(layoutObject()); } |
| 119 }; | 123 }; |
| 120 | 124 |
| 121 } // namespace blink | 125 } // namespace blink |
| 122 | 126 |
| 123 #endif // LineLayoutText_h | 127 #endif // LineLayoutText_h |
| OLD | NEW |