Chromium Code Reviews| Index: Source/core/layout/api/LineLayoutItem.h |
| diff --git a/Source/core/layout/api/LineLayoutItem.h b/Source/core/layout/api/LineLayoutItem.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9f7422ed74ea3693764d9d589e67c3502f5ef650 |
| --- /dev/null |
| +++ b/Source/core/layout/api/LineLayoutItem.h |
| @@ -0,0 +1,70 @@ |
| +// Copyright 2015 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 LineLayoutItem_h |
| +#define LineLayoutItem_h |
| + |
| +#include "platform/LayoutUnit.h" |
| + |
| +namespace blink { |
| + |
| +class ComputedStyle; |
| +class Document; |
| +class LayoutObject; |
| + |
| +class LineLayoutItem { |
| +public: |
| + LineLayoutItem(LayoutObject*); |
| + LineLayoutItem(const LineLayoutItem& item) : m_layoutObject(item.m_layoutObject) { } |
| + LineLayoutItem() : m_layoutObject(0) { } |
| + |
| + operator LayoutObject*() const { return m_layoutObject; } |
|
leviw_travelin_and_unemployed
2015/06/08 20:05:00
You should have a TODO here about removing this. T
|
| + |
| + LineLayoutItem* operator->() { return this; } |
| + |
| + LineLayoutItem parent() const; |
| + LineLayoutItem nextSibling() const; |
| + LineLayoutItem previousSibling() const; |
| + LineLayoutItem slowFirstChild() const; |
| + LineLayoutItem slowLastChild() const; |
| + |
| + const ComputedStyle* style() const; |
| + const ComputedStyle& styleRef() const; |
| + |
| + Document& document() const; |
| + |
| + bool preservesNewline() const; |
| + |
| + unsigned length() const; |
| + |
| + bool isFloatingOrOutOfFlowPositioned() const; |
| + bool isFloating() const; |
| + bool isOutOfFlowPositioned() const; |
| + bool isBR() const; |
| + bool isHorizontalWritingMode() const; |
| + bool isImage() const; |
| + bool isLayoutInline() const; |
| + bool isListMarker() const; |
| + bool isReplaced() const; |
| + bool isRubyRun() const; |
| + bool isSVGInlineText() const; |
| + bool isTableCell() const; |
| + bool isText() const; |
| + |
| +protected: |
| + LayoutObject* layoutObject() { return m_layoutObject; } |
| + const LayoutObject* layoutObject() const { return m_layoutObject; } |
| + |
| + friend class LineLayoutBlockFlow; // for layoutObject |
| + friend class LineLayoutBox; |
| + friend class LineLayoutInline; |
| + friend class LineLayoutText; |
| + |
| +private: |
| + LayoutObject* m_layoutObject; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // LineLayoutItem_h |