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: add operator= ? | |
| 23 | |
| 24 // TODO(leviw): re-enable when we don't have the LayoutObject*() operator. | |
| 25 // This conversion operator allows implicit conversion to bool but not to | |
| 26 // other integer types. | |
| 27 // typedef void* UnspecifiedBoolType; | |
| 28 // operator UnspecifiedBoolType() const { return m_layoutObject; } | |
|
leviw_travelin_and_unemployed
2015/06/08 18:14:28
We shouldn't land this commented out code. I assum
| |
| 29 | |
| 30 // TODO(leviw): Remove this. It's only here to make things compile before | |
| 31 // switching all of core/layout/line to using the API. | |
| 32 operator LayoutObject*() const { return m_layoutObject; } | |
| 33 | |
| 34 LineLayoutItem* operator->() { return this; } | |
| 35 | |
| 36 LineLayoutItem parent() const; | |
| 37 LineLayoutItem nextSibling() const; | |
| 38 LineLayoutItem previousSibling() const; | |
| 39 LineLayoutItem slowFirstChild() const; | |
| 40 LineLayoutItem slowLastChild() const; | |
| 41 | |
| 42 const ComputedStyle* style() const; | |
| 43 const ComputedStyle& styleRef() const; | |
| 44 | |
| 45 Document& document() const; | |
| 46 | |
| 47 bool preservesNewline() const; | |
| 48 | |
| 49 unsigned length() const; | |
| 50 | |
| 51 bool isFloatingOrOutOfFlowPositioned() const; | |
| 52 bool isFloating() const; | |
| 53 bool isOutOfFlowPositioned() const; | |
| 54 bool isBR() const; | |
| 55 bool isHorizontalWritingMode() const; | |
| 56 bool isImage() const; | |
| 57 bool isLayoutInline() const; | |
| 58 bool isListMarker() const; | |
| 59 bool isReplaced() const; | |
| 60 bool isRubyRun() const; | |
| 61 bool isSVGInlineText() const; | |
| 62 bool isTableCell() const; | |
| 63 bool isText() const; | |
| 64 | |
| 65 protected: | |
| 66 LayoutObject* layoutObject() { return m_layoutObject; } | |
| 67 const LayoutObject* layoutObject() const { return m_layoutObject; } | |
| 68 | |
| 69 friend class LineLayoutBlockFlow; // for layoutObject | |
| 70 friend class LineLayoutBox; | |
| 71 friend class LineLayoutInline; | |
| 72 friend class LineLayoutText; | |
| 73 | |
| 74 private: | |
| 75 LayoutObject* m_layoutObject; | |
| 76 }; | |
| 77 | |
| 78 } // namespace blink | |
| 79 | |
| 80 #endif // LineLayoutItem_h | |
| OLD | NEW |