OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef LineLayoutText_h |
| 6 #define LineLayoutText_h |
| 7 |
| 8 #include "core/layout/LayoutText.h" |
| 9 #include "core/layout/api/LineLayoutItem.h" |
| 10 #include "platform/LayoutUnit.h" |
| 11 #include "platform/text/TextPath.h" |
| 12 #include "wtf/Forward.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class LayoutText; |
| 17 |
| 18 class LineLayoutText : public LineLayoutItem { |
| 19 public: |
| 20 LineLayoutText(LayoutText* layoutObject) : LineLayoutItem(layoutObject) { } |
| 21 LineLayoutText(const LineLayoutItem&); |
| 22 LineLayoutText() { } |
| 23 |
| 24 bool isWordBreak() const |
| 25 { |
| 26 return toText()->isWordBreak(); |
| 27 } |
| 28 |
| 29 bool isAllCollapsibleWhitespace() const |
| 30 { |
| 31 return toText()->isAllCollapsibleWhitespace(); |
| 32 } |
| 33 |
| 34 UChar characterAt(unsigned offset) const |
| 35 { |
| 36 return toText()->characterAt(offset); |
| 37 } |
| 38 |
| 39 unsigned textLength() const |
| 40 { |
| 41 return toText()->textLength(); |
| 42 } |
| 43 |
| 44 private: |
| 45 LayoutText* toText() { return toLayoutText(layoutObject()); } |
| 46 const LayoutText* toText() const { return toLayoutText(layoutObject()); } |
| 47 }; |
| 48 |
| 49 } // namespace blink |
| 50 |
| 51 #endif // LineLayoutText_h |
OLD | NEW |