| 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 LineLayoutBox_h | 5 #ifndef LineLayoutBox_h |
| 6 #define LineLayoutBox_h | 6 #define LineLayoutBox_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutBlockFlow.h" | 8 #include "core/layout/LayoutBlockFlow.h" |
| 9 #include "core/layout/LayoutBox.h" | 9 #include "core/layout/LayoutBox.h" |
| 10 #include "core/layout/api/LineLayoutBoxModel.h" | 10 #include "core/layout/api/LineLayoutBoxModel.h" |
| 11 #include "platform/LayoutUnit.h" | 11 #include "platform/LayoutUnit.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class LayoutBox; | 15 class LayoutBox; |
| 16 | 16 |
| 17 class LineLayoutBox : public LineLayoutBoxModel { | 17 class LineLayoutBox : public LineLayoutBoxModel { |
| 18 public: | 18 public: |
| 19 explicit LineLayoutBox(LayoutBox* layoutBox) | 19 explicit LineLayoutBox(LayoutBox* layoutBox) |
| 20 : LineLayoutBoxModel(layoutBox) | 20 : LineLayoutBoxModel(layoutBox) |
| 21 { | 21 { |
| 22 } | 22 } |
| 23 | 23 |
| 24 explicit LineLayoutBox(const LineLayoutItem& item) | 24 explicit LineLayoutBox(const LineLayoutItem& item) |
| 25 : LineLayoutBoxModel(item) | 25 : LineLayoutBoxModel(item) |
| 26 { | 26 { |
| 27 ASSERT(!item || item.isBox()); | 27 ASSERT(!item || item.isBox()); |
| 28 } | 28 } |
| 29 | 29 |
| 30 LineLayoutBox(std::nullptr_t) : LineLayoutBoxModel(nullptr) { } |
| 31 |
| 30 LineLayoutBox() { } | 32 LineLayoutBox() { } |
| 31 | 33 |
| 32 LayoutPoint location() const | 34 LayoutPoint location() const |
| 33 { | 35 { |
| 34 return toBox()->location(); | 36 return toBox()->location(); |
| 35 } | 37 } |
| 36 | 38 |
| 37 LayoutSize size() const | 39 LayoutSize size() const |
| 38 { | 40 { |
| 39 return toBox()->size(); | 41 return toBox()->size(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 inline LineLayoutBox LineLayoutItem::containingBlock() const | 89 inline LineLayoutBox LineLayoutItem::containingBlock() const |
| 88 { | 90 { |
| 89 return LineLayoutBox(layoutObject()->containingBlock()); | 91 return LineLayoutBox(layoutObject()->containingBlock()); |
| 90 } | 92 } |
| 91 | 93 |
| 92 } // namespace blink | 94 } // namespace blink |
| 93 | 95 |
| 94 #endif // LineLayoutBox_h | 96 #endif // LineLayoutBox_h |
| OLD | NEW |