| 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" |
| 11 #include "platform/text/TextPath.h" | |
| 12 #include "wtf/Forward.h" | 11 #include "wtf/Forward.h" |
| 13 | 12 |
| 14 namespace blink { | 13 namespace blink { |
| 15 | 14 |
| 16 class LayoutText; | 15 class LayoutText; |
| 17 | 16 |
| 18 class LineLayoutText : public LineLayoutItem { | 17 class LineLayoutText : public LineLayoutItem { |
| 19 public: | 18 public: |
| 20 explicit LineLayoutText(LayoutText* layoutObject) | 19 explicit LineLayoutText(LayoutText* layoutObject) |
| 21 : LineLayoutItem(layoutObject) {} | 20 : LineLayoutItem(layoutObject) {} |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const UChar* characters16() const { return toText()->characters16(); } | 72 const UChar* characters16() const { return toText()->characters16(); } |
| 74 | 73 |
| 75 bool hasEmptyText() const { return toText()->hasEmptyText(); } | 74 bool hasEmptyText() const { return toText()->hasEmptyText(); } |
| 76 | 75 |
| 77 unsigned textLength() const { return toText()->textLength(); } | 76 unsigned textLength() const { return toText()->textLength(); } |
| 78 | 77 |
| 79 unsigned resolvedTextLength() const { return toText()->resolvedTextLength(); } | 78 unsigned resolvedTextLength() const { return toText()->resolvedTextLength(); } |
| 80 | 79 |
| 81 const String& text() const { return toText()->text(); } | 80 const String& text() const { return toText()->text(); } |
| 82 | 81 |
| 83 bool canUseSimpleFontCodePath() const { | |
| 84 return toText()->canUseSimpleFontCodePath(); | |
| 85 } | |
| 86 | |
| 87 float width(unsigned from, | 82 float width(unsigned from, |
| 88 unsigned len, | 83 unsigned len, |
| 89 const Font& font, | 84 const Font& font, |
| 90 LayoutUnit xPos, | 85 LayoutUnit xPos, |
| 91 TextDirection textDirection, | 86 TextDirection textDirection, |
| 92 HashSet<const SimpleFontData*>* fallbackFonts, | 87 HashSet<const SimpleFontData*>* fallbackFonts, |
| 93 FloatRect* glyphBounds) const { | 88 FloatRect* glyphBounds) const { |
| 94 return toText()->width(from, len, font, xPos, textDirection, fallbackFonts, | 89 return toText()->width(from, len, font, xPos, textDirection, fallbackFonts, |
| 95 glyphBounds); | 90 glyphBounds); |
| 96 } | 91 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 119 float minLogicalWidth() const { return toText()->minLogicalWidth(); } | 114 float minLogicalWidth() const { return toText()->minLogicalWidth(); } |
| 120 | 115 |
| 121 private: | 116 private: |
| 122 LayoutText* toText() { return toLayoutText(layoutObject()); } | 117 LayoutText* toText() { return toLayoutText(layoutObject()); } |
| 123 const LayoutText* toText() const { return toLayoutText(layoutObject()); } | 118 const LayoutText* toText() const { return toLayoutText(layoutObject()); } |
| 124 }; | 119 }; |
| 125 | 120 |
| 126 } // namespace blink | 121 } // namespace blink |
| 127 | 122 |
| 128 #endif // LineLayoutText_h | 123 #endif // LineLayoutText_h |
| OLD | NEW |