Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: third_party/WebKit/Source/core/layout/api/LayoutLIItem.h

Issue 1759173002: [Layout API] Create api/LayoutLIItem and use it in html/HTMLLIElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LayoutItem.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/api/LayoutLIItem.h
diff --git a/third_party/WebKit/Source/core/layout/api/LayoutLIItem.h b/third_party/WebKit/Source/core/layout/api/LayoutLIItem.h
new file mode 100644
index 0000000000000000000000000000000000000000..3bbce4ea38e0ec01a8b16bb888274d882604d49b
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/api/LayoutLIItem.h
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef LayoutLIItem_h
+#define LayoutLIItem_h
+
+#include "core/layout/LayoutListItem.h"
+#include "core/layout/api/LayoutBoxItem.h"
+
+namespace blink {
+
+class LayoutLIItem : public LayoutBoxItem {
+public:
+ explicit LayoutLIItem(LayoutListItem* layoutListItem)
+ : LayoutBoxItem(layoutListItem)
+ {
+ }
+
+ explicit LayoutLIItem(const LayoutItem& item)
+ : LayoutBoxItem(item)
+ {
+ ASSERT(!item || item.isListItem());
+ }
+
+ explicit LayoutLIItem(std::nullptr_t) : LayoutBoxItem(nullptr) { }
+
+ LayoutLIItem() { }
+
+ void setNotInList(bool notInList)
+ {
+ return toListItem()->setNotInList(notInList);
+ }
+
+private:
+ LayoutListItem* toListItem()
+ {
+ return toLayoutListItem(layoutObject());
+ }
+
+ const LayoutListItem* toListItem() const
+ {
+ return toLayoutListItem(layoutObject());
+ }
+};
+
+} // namespace blink
+
+#endif // LayoutLIItem_h
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LayoutItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698