OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv
ed. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 14 matching lines...) Expand all Loading... |
25 #ifndef LayoutTableRow_h | 25 #ifndef LayoutTableRow_h |
26 #define LayoutTableRow_h | 26 #define LayoutTableRow_h |
27 | 27 |
28 #include "core/layout/LayoutTableSection.h" | 28 #include "core/layout/LayoutTableSection.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 static const unsigned unsetRowIndex = 0x7FFFFFFF; | 32 static const unsigned unsetRowIndex = 0x7FFFFFFF; |
33 static const unsigned maxRowIndex = 0x7FFFFFFE; // 2,147,483,646 | 33 static const unsigned maxRowIndex = 0x7FFFFFFE; // 2,147,483,646 |
34 | 34 |
35 class LayoutTableRow final : public RenderBox { | 35 class LayoutTableRow final : public LayoutBox { |
36 public: | 36 public: |
37 explicit LayoutTableRow(Element*); | 37 explicit LayoutTableRow(Element*); |
38 | 38 |
39 LayoutTableCell* firstCell() const; | 39 LayoutTableCell* firstCell() const; |
40 LayoutTableCell* lastCell() const; | 40 LayoutTableCell* lastCell() const; |
41 | 41 |
42 LayoutTableRow* previousRow() const; | 42 LayoutTableRow* previousRow() const; |
43 LayoutTableRow* nextRow() const; | 43 LayoutTableRow* nextRow() const; |
44 | 44 |
45 const LayoutObjectChildList* children() const { return &m_children; } | 45 const LayoutObjectChildList* children() const { return &m_children; } |
46 LayoutObjectChildList* children() { return &m_children; } | 46 LayoutObjectChildList* children() { return &m_children; } |
47 | 47 |
48 LayoutTableSection* section() const { return toLayoutTableSection(parent());
} | 48 LayoutTableSection* section() const { return toLayoutTableSection(parent());
} |
49 LayoutTable* table() const { return toLayoutTable(parent()->parent()); } | 49 LayoutTable* table() const { return toLayoutTable(parent()->parent()); } |
50 | 50 |
51 static LayoutTableRow* createAnonymous(Document*); | 51 static LayoutTableRow* createAnonymous(Document*); |
52 static LayoutTableRow* createAnonymousWithParentRenderer(const LayoutObject*
); | 52 static LayoutTableRow* createAnonymousWithParentRenderer(const LayoutObject*
); |
53 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare
nt) const override | 53 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare
nt) const override |
54 { | 54 { |
55 return createAnonymousWithParentRenderer(parent); | 55 return createAnonymousWithParentRenderer(parent); |
56 } | 56 } |
57 | 57 |
58 void setRowIndex(unsigned rowIndex) | 58 void setRowIndex(unsigned rowIndex) |
59 { | 59 { |
60 if (UNLIKELY(rowIndex > maxRowIndex)) | 60 if (UNLIKELY(rowIndex > maxRowIndex)) |
61 CRASH(); | 61 CRASH(); |
62 | 62 |
63 m_rowIndex = rowIndex; | 63 m_rowIndex = rowIndex; |
(...skipping 29 matching lines...) Expand all Loading... |
93 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; | 93 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; |
94 | 94 |
95 void addOverflowFromCell(const LayoutTableCell*); | 95 void addOverflowFromCell(const LayoutTableCell*); |
96 | 96 |
97 private: | 97 private: |
98 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } | 98 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } |
99 virtual const LayoutObjectChildList* virtualChildren() const override { retu
rn children(); } | 99 virtual const LayoutObjectChildList* virtualChildren() const override { retu
rn children(); } |
100 | 100 |
101 virtual const char* renderName() const override { return (isAnonymous() || i
sPseudoElement()) ? "LayoutTableRow (anonymous)" : "LayoutTableRow"; } | 101 virtual const char* renderName() const override { return (isAnonymous() || i
sPseudoElement()) ? "LayoutTableRow (anonymous)" : "LayoutTableRow"; } |
102 | 102 |
103 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectTableRow || RenderBox::isOfType(type); } | 103 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectTableRow || LayoutBox::isOfType(type); } |
104 | 104 |
105 virtual void willBeRemovedFromTree() override; | 105 virtual void willBeRemovedFromTree() override; |
106 | 106 |
107 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov
erride; | 107 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov
erride; |
108 virtual void layout() override; | 108 virtual void layout() override; |
109 | 109 |
110 virtual LayerType layerTypeRequired() const override | 110 virtual LayerType layerTypeRequired() const override |
111 { | 111 { |
112 if (hasTransformRelatedProperty() || hasHiddenBackface() || hasClipPath(
) || createsGroup() || style()->shouldCompositeForCurrentAnimations()) | 112 if (hasTransformRelatedProperty() || hasHiddenBackface() || hasClipPath(
) || createsGroup() || style()->shouldCompositeForCurrentAnimations()) |
113 return NormalLayer; | 113 return NormalLayer; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 inline LayoutTableRow* LayoutTableSection::lastRow() const | 152 inline LayoutTableRow* LayoutTableSection::lastRow() const |
153 { | 153 { |
154 ASSERT(children() == virtualChildren()); | 154 ASSERT(children() == virtualChildren()); |
155 return toLayoutTableRow(children()->lastChild()); | 155 return toLayoutTableRow(children()->lastChild()); |
156 } | 156 } |
157 | 157 |
158 } // namespace blink | 158 } // namespace blink |
159 | 159 |
160 #endif // LayoutTableRow_h | 160 #endif // LayoutTableRow_h |
OLD | NEW |