| 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" | 11 #include "platform/text/TextPath.h" |
| 12 #include "wtf/Forward.h" | 12 #include "wtf/Forward.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class LayoutText; | 16 class LayoutText; |
| 17 | 17 |
| 18 class LineLayoutText : public LineLayoutItem { | 18 class LineLayoutText : public LineLayoutItem { |
| 19 public: | 19 public: |
| 20 explicit LineLayoutText(LayoutText* layoutObject) : LineLayoutItem(layoutObj
ect) { } | 20 explicit LineLayoutText(LayoutText* layoutObject) : LineLayoutItem(layoutObj
ect) { } |
| 21 | 21 |
| 22 explicit LineLayoutText(const LineLayoutItem& item) | 22 explicit LineLayoutText(const LineLayoutItem& item) |
| 23 : LineLayoutItem(item) | 23 : LineLayoutItem(item) |
| 24 { | 24 { |
| 25 ASSERT(!item || item.isText()); | 25 ASSERT(!item || item.isText()); |
| 26 } | 26 } |
| 27 | 27 |
| 28 LineLayoutText(std::nullptr_t) : LineLayoutItem(nullptr) { } |
| 29 |
| 28 LineLayoutText() { } | 30 LineLayoutText() { } |
| 29 | 31 |
| 30 InlineTextBox* firstTextBox() const | 32 InlineTextBox* firstTextBox() const |
| 31 { | 33 { |
| 32 return toText()->firstTextBox(); | 34 return toText()->firstTextBox(); |
| 33 } | 35 } |
| 34 | 36 |
| 35 void extractTextBox(InlineTextBox* inlineTextBox) | 37 void extractTextBox(InlineTextBox* inlineTextBox) |
| 36 { | 38 { |
| 37 toText()->extractTextBox(inlineTextBox); | 39 toText()->extractTextBox(inlineTextBox); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 140 } |
| 139 | 141 |
| 140 private: | 142 private: |
| 141 LayoutText* toText() { return toLayoutText(layoutObject()); } | 143 LayoutText* toText() { return toLayoutText(layoutObject()); } |
| 142 const LayoutText* toText() const { return toLayoutText(layoutObject()); } | 144 const LayoutText* toText() const { return toLayoutText(layoutObject()); } |
| 143 }; | 145 }; |
| 144 | 146 |
| 145 } // namespace blink | 147 } // namespace blink |
| 146 | 148 |
| 147 #endif // LineLayoutText_h | 149 #endif // LineLayoutText_h |
| OLD | NEW |