Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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 LineLayoutItem_h | |
| 6 #define LineLayoutItem_h | |
| 7 | |
| 8 #include "platform/LayoutUnit.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class ComputedStyle; | |
| 13 class Document; | |
| 14 class LayoutObject; | |
| 15 | |
| 16 class LineLayoutItem { | |
| 17 public: | |
| 18 LineLayoutItem(LayoutObject*); | |
| 19 LineLayoutItem(const LineLayoutItem& item) : m_layoutObject(item.m_layoutObj ect) { } | |
| 20 LineLayoutItem() : m_layoutObject(0) { } | |
| 21 | |
| 22 // TODO: Remove this. It's only here to make things compile before | |
| 23 // switching all of core/layout/line to using the API. | |
|
leviw_travelin_and_unemployed
2015/06/10 21:11:27
Bug link.
| |
| 24 operator LayoutObject*() const { return m_layoutObject; } | |
| 25 | |
| 26 LineLayoutItem* operator->() { return this; } | |
| 27 | |
| 28 LineLayoutItem parent() const; | |
| 29 LineLayoutItem nextSibling() const; | |
| 30 LineLayoutItem previousSibling() const; | |
| 31 LineLayoutItem slowFirstChild() const; | |
| 32 LineLayoutItem slowLastChild() const; | |
| 33 | |
| 34 const ComputedStyle* style() const; | |
| 35 const ComputedStyle& styleRef() const; | |
| 36 | |
| 37 Document& document() const; | |
| 38 | |
| 39 bool preservesNewline() const; | |
| 40 | |
| 41 unsigned length() const; | |
| 42 | |
| 43 bool isFloatingOrOutOfFlowPositioned() const; | |
| 44 bool isFloating() const; | |
| 45 bool isOutOfFlowPositioned() const; | |
| 46 bool isBR() const; | |
| 47 bool isHorizontalWritingMode() const; | |
| 48 bool isImage() const; | |
| 49 bool isLayoutInline() const; | |
| 50 bool isListMarker() const; | |
| 51 bool isReplaced() const; | |
| 52 bool isRubyRun() const; | |
| 53 bool isSVGInlineText() const; | |
| 54 bool isTableCell() const; | |
| 55 bool isText() const; | |
| 56 | |
| 57 protected: | |
| 58 LayoutObject* layoutObject() { return m_layoutObject; } | |
| 59 const LayoutObject* layoutObject() const { return m_layoutObject; } | |
| 60 | |
| 61 friend class LineLayoutBlockFlow; // for layoutObject | |
| 62 friend class LineLayoutBox; | |
| 63 friend class LineLayoutInline; | |
| 64 friend class LineLayoutText; | |
| 65 | |
| 66 private: | |
| 67 LayoutObject* m_layoutObject; | |
| 68 }; | |
| 69 | |
| 70 } // namespace blink | |
| 71 | |
| 72 #endif // LineLayoutItem_h | |
| OLD | NEW |