| 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 } | 18 } |
| 19 | 19 |
| 20 explicit LayoutLIItem(const LayoutItem& item) | 20 explicit LayoutLIItem(const LayoutItem& item) |
| 21 : LayoutBoxItem(item) | 21 : LayoutBoxItem(item) |
| 22 { | 22 { |
| 23 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isListItem()); | 23 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isListItem()); |
| 24 } | 24 } |
| 25 | 25 |
| 26 explicit LayoutLIItem(std::nullptr_t) : LayoutBoxItem(nullptr) { } | 26 explicit LayoutLIItem(std::nullptr_t) : LayoutBoxItem(nullptr) { } |
| 27 | 27 |
| 28 LayoutLIItem() { } | 28 LayoutLIItem() { } |
| 29 | 29 |
| 30 void setNotInList(bool notInList) | |
| 31 { | |
| 32 return toListItem()->setNotInList(notInList); | |
| 33 } | |
| 34 | |
| 35 private: | 30 private: |
| 36 LayoutListItem* toListItem() | 31 LayoutListItem* toListItem() |
| 37 { | 32 { |
| 38 return toLayoutListItem(layoutObject()); | 33 return toLayoutListItem(layoutObject()); |
| 39 } | 34 } |
| 40 | 35 |
| 41 const LayoutListItem* toListItem() const | 36 const LayoutListItem* toListItem() const |
| 42 { | 37 { |
| 43 return toLayoutListItem(layoutObject()); | 38 return toLayoutListItem(layoutObject()); |
| 44 } | 39 } |
| 45 }; | 40 }; |
| 46 | 41 |
| 47 } // namespace blink | 42 } // namespace blink |
| 48 | 43 |
| 49 #endif // LayoutLIItem_h | 44 #endif // LayoutLIItem_h |
| OLD | NEW |