| 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 LayoutLIItem_h | 5 #ifndef LayoutLIItem_h |
| 6 #define LayoutLIItem_h | 6 #define LayoutLIItem_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutListItem.h" | 8 #include "core/layout/LayoutListItem.h" |
| 9 #include "core/layout/api/LayoutBoxItem.h" | 9 #include "core/layout/api/LayoutBoxItem.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class LayoutLIItem : public LayoutBoxItem { | 13 class LayoutLIItem : public LayoutBoxItem { |
| 14 public: | 14 public: |
| 15 explicit LayoutLIItem(LayoutListItem* layoutListItem) | 15 explicit LayoutLIItem(LayoutListItem* layoutListItem) |
| 16 : LayoutBoxItem(layoutListItem) {} | 16 : LayoutBoxItem(layoutListItem) {} |
| 17 | 17 |
| 18 explicit LayoutLIItem(const LayoutItem& item) : LayoutBoxItem(item) { | 18 explicit LayoutLIItem(const LayoutItem& item) : LayoutBoxItem(item) { |
| 19 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isListItem()); | 19 SECURITY_DCHECK(!item || item.isListItem()); |
| 20 } | 20 } |
| 21 | 21 |
| 22 explicit LayoutLIItem(std::nullptr_t) : LayoutBoxItem(nullptr) {} | 22 explicit LayoutLIItem(std::nullptr_t) : LayoutBoxItem(nullptr) {} |
| 23 | 23 |
| 24 LayoutLIItem() {} | 24 LayoutLIItem() {} |
| 25 | 25 |
| 26 void setNotInList(bool notInList) { | 26 void setNotInList(bool notInList) { |
| 27 return toListItem()->setNotInList(notInList); | 27 return toListItem()->setNotInList(notInList); |
| 28 } | 28 } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 LayoutListItem* toListItem() { return toLayoutListItem(layoutObject()); } | 31 LayoutListItem* toListItem() { return toLayoutListItem(layoutObject()); } |
| 32 | 32 |
| 33 const LayoutListItem* toListItem() const { | 33 const LayoutListItem* toListItem() const { |
| 34 return toLayoutListItem(layoutObject()); | 34 return toLayoutListItem(layoutObject()); |
| 35 } | 35 } |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 } // namespace blink | 38 } // namespace blink |
| 39 | 39 |
| 40 #endif // LayoutLIItem_h | 40 #endif // LayoutLIItem_h |
| OLD | NEW |