| 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 24 matching lines...) Expand all Loading... |
| 35 class LayoutTableRow final : public RenderBox { | 35 class LayoutTableRow final : public RenderBox { |
| 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 RenderObjectChildList* children() const { return &m_children; } | 45 const LayoutObjectChildList* children() const { return &m_children; } |
| 46 RenderObjectChildList* 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 RenderObject*
); | 52 static LayoutTableRow* createAnonymousWithParentRenderer(const LayoutObject*
); |
| 53 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare
nt) const override | 53 virtual RenderBox* 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 24 matching lines...) Expand all Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 const BorderValue& borderAdjoiningStartCell(const LayoutTableCell*) const; | 90 const BorderValue& borderAdjoiningStartCell(const LayoutTableCell*) const; |
| 91 const BorderValue& borderAdjoiningEndCell(const LayoutTableCell*) const; | 91 const BorderValue& borderAdjoiningEndCell(const LayoutTableCell*) const; |
| 92 | 92 |
| 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 RenderObjectChildList* virtualChildren() override { return children(
); } | 98 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } |
| 99 virtual const RenderObjectChildList* 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(RenderObjectType type) const override { return type ==
RenderObjectTableRow || RenderBox::isOfType(type); } | 103 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectTableRow || RenderBox::isOfType(type); } |
| 104 | 104 |
| 105 virtual void willBeRemovedFromTree() override; | 105 virtual void willBeRemovedFromTree() override; |
| 106 | 106 |
| 107 virtual void addChild(RenderObject* child, RenderObject* 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; |
| 114 | 114 |
| 115 if (hasOverflowClip()) | 115 if (hasOverflowClip()) |
| 116 return OverflowClipLayer; | 116 return OverflowClipLayer; |
| 117 | 117 |
| 118 return NoLayer; | 118 return NoLayer; |
| 119 } | 119 } |
| 120 | 120 |
| 121 virtual void paint(const PaintInfo&, const LayoutPoint&) override; | 121 virtual void paint(const PaintInfo&, const LayoutPoint&) override; |
| 122 | 122 |
| 123 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; | 123 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; |
| 124 | 124 |
| 125 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; | 125 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; |
| 126 | 126 |
| 127 void nextSibling() const = delete; | 127 void nextSibling() const = delete; |
| 128 void previousSibling() const = delete; | 128 void previousSibling() const = delete; |
| 129 | 129 |
| 130 RenderObjectChildList m_children; | 130 LayoutObjectChildList m_children; |
| 131 unsigned m_rowIndex : 31; | 131 unsigned m_rowIndex : 31; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 DEFINE_RENDER_OBJECT_TYPE_CASTS(LayoutTableRow, isTableRow()); | 134 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableRow, isTableRow()); |
| 135 | 135 |
| 136 inline LayoutTableRow* LayoutTableRow::previousRow() const | 136 inline LayoutTableRow* LayoutTableRow::previousRow() const |
| 137 { | 137 { |
| 138 return toLayoutTableRow(RenderObject::previousSibling()); | 138 return toLayoutTableRow(LayoutObject::previousSibling()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 inline LayoutTableRow* LayoutTableRow::nextRow() const | 141 inline LayoutTableRow* LayoutTableRow::nextRow() const |
| 142 { | 142 { |
| 143 return toLayoutTableRow(RenderObject::nextSibling()); | 143 return toLayoutTableRow(LayoutObject::nextSibling()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 inline LayoutTableRow* LayoutTableSection::firstRow() const | 146 inline LayoutTableRow* LayoutTableSection::firstRow() const |
| 147 { | 147 { |
| 148 ASSERT(children() == virtualChildren()); | 148 ASSERT(children() == virtualChildren()); |
| 149 return toLayoutTableRow(children()->firstChild()); | 149 return toLayoutTableRow(children()->firstChild()); |
| 150 } | 150 } |
| 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 |