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