| 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 explicit LineLayoutBox(const LineLayoutItem& item) | 22 explicit LineLayoutBox(const LineLayoutItem& item) |
| 23 : LineLayoutBoxModel(item) { | 23 : LineLayoutBoxModel(item) { |
| 24 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isBox()); | 24 SECURITY_DCHECK(!item || item.isBox()); |
| 25 } | 25 } |
| 26 | 26 |
| 27 explicit LineLayoutBox(std::nullptr_t) : LineLayoutBoxModel(nullptr) {} | 27 explicit LineLayoutBox(std::nullptr_t) : LineLayoutBoxModel(nullptr) {} |
| 28 | 28 |
| 29 LineLayoutBox() {} | 29 LineLayoutBox() {} |
| 30 | 30 |
| 31 LayoutPoint location() const { return toBox()->location(); } | 31 LayoutPoint location() const { return toBox()->location(); } |
| 32 | 32 |
| 33 LayoutSize size() const { return toBox()->size(); } | 33 LayoutSize size() const { return toBox()->size(); } |
| 34 | 34 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 const LayoutBox* toBox() const { return toLayoutBox(layoutObject()); } | 119 const LayoutBox* toBox() const { return toLayoutBox(layoutObject()); } |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 inline LineLayoutBox LineLayoutItem::containingBlock() const { | 122 inline LineLayoutBox LineLayoutItem::containingBlock() const { |
| 123 return LineLayoutBox(layoutObject()->containingBlock()); | 123 return LineLayoutBox(layoutObject()->containingBlock()); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace blink | 126 } // namespace blink |
| 127 | 127 |
| 128 #endif // LineLayoutBox_h | 128 #endif // LineLayoutBox_h |
| OLD | NEW |