| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 LayoutBoxItem_h | 5 #ifndef LayoutBoxItem_h |
| 6 #define LayoutBoxItem_h | 6 #define LayoutBoxItem_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutBox.h" | 8 #include "core/layout/LayoutBox.h" |
| 9 #include "core/layout/api/LayoutBoxModel.h" | 9 #include "core/layout/api/LayoutBoxModel.h" |
| 10 #include "platform/scroll/ScrollTypes.h" | 10 #include "platform/scroll/ScrollTypes.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class LayoutPoint; | 14 class LayoutPoint; |
| 15 class LayoutSize; | 15 class LayoutSize; |
| 16 class LayoutUnit; | 16 class LayoutUnit; |
| 17 | 17 |
| 18 class LayoutBoxItem : public LayoutBoxModel { | 18 class LayoutBoxItem : public LayoutBoxModel { |
| 19 public: | 19 public: |
| 20 explicit LayoutBoxItem(LayoutBox* layoutBox) : LayoutBoxModel(layoutBox) {} | 20 explicit LayoutBoxItem(LayoutBox* layoutBox) : LayoutBoxModel(layoutBox) {} |
| 21 | 21 |
| 22 explicit LayoutBoxItem(const LayoutItem& item) : LayoutBoxModel(item) { | 22 explicit LayoutBoxItem(const LayoutItem& item) : LayoutBoxModel(item) { |
| 23 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isBox()); | 23 SECURITY_DCHECK(!item || item.isBox()); |
| 24 } | 24 } |
| 25 | 25 |
| 26 explicit LayoutBoxItem(std::nullptr_t) : LayoutBoxModel(nullptr) {} | 26 explicit LayoutBoxItem(std::nullptr_t) : LayoutBoxModel(nullptr) {} |
| 27 | 27 |
| 28 LayoutBoxItem() {} | 28 LayoutBoxItem() {} |
| 29 | 29 |
| 30 LayoutBoxItem enclosingBox() const { | 30 LayoutBoxItem enclosingBox() const { |
| 31 return LayoutBoxItem(toBox()->enclosingBox()); | 31 return LayoutBoxItem(toBox()->enclosingBox()); |
| 32 } | 32 } |
| 33 | 33 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 LayoutBox* toBox() { return toLayoutBox(layoutObject()); } | 70 LayoutBox* toBox() { return toLayoutBox(layoutObject()); } |
| 71 | 71 |
| 72 const LayoutBox* toBox() const { return toLayoutBox(layoutObject()); } | 72 const LayoutBox* toBox() const { return toLayoutBox(layoutObject()); } |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace blink | 75 } // namespace blink |
| 76 | 76 |
| 77 #endif // LayoutBoxItem_h | 77 #endif // LayoutBoxItem_h |
| OLD | NEW |