| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 void computeOverflow(); | 122 void computeOverflow(); |
| 123 | 123 |
| 124 const char* name() const override { return "LayoutTableRow"; } | 124 const char* name() const override { return "LayoutTableRow"; } |
| 125 | 125 |
| 126 // Whether a row has opaque background depends on many factors, e.g. border
spacing, | 126 // Whether a row has opaque background depends on many factors, e.g. border
spacing, |
| 127 // border collapsing, missing cells, etc. | 127 // border collapsing, missing cells, etc. |
| 128 // For simplicity, just conservatively assume all table rows are not opaque. | 128 // For simplicity, just conservatively assume all table rows are not opaque. |
| 129 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov
erride { return false; } | 129 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov
erride { return false; } |
| 130 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r
eturn false; } | 130 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r
eturn false; } |
| 131 | 131 |
| 132 void setHasPaginationStrut(int strut) { m_hasPaginationStrut = strut; } |
| 133 bool hasPaginationStrut() { return m_hasPaginationStrut; } |
| 132 private: | 134 private: |
| 133 void addOverflowFromCell(const LayoutTableCell*); | 135 void addOverflowFromCell(const LayoutTableCell*); |
| 134 | 136 |
| 135 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectTableRow || LayoutTableBoxComponent::isOfType(type); } | 137 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectTableRow || LayoutTableBoxComponent::isOfType(type); } |
| 136 | 138 |
| 137 void willBeRemovedFromTree() override; | 139 void willBeRemovedFromTree() override; |
| 138 | 140 |
| 139 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over
ride; | 141 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over
ride; |
| 140 void layout() override; | 142 void layout() override; |
| 141 | 143 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 154 | 156 |
| 155 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; | 157 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; |
| 156 | 158 |
| 157 void nextSibling() const = delete; | 159 void nextSibling() const = delete; |
| 158 void previousSibling() const = delete; | 160 void previousSibling() const = delete; |
| 159 | 161 |
| 160 // This field should never be read directly. It should be read through | 162 // This field should never be read directly. It should be read through |
| 161 // rowIndex() above instead. This is to ensure that we never read this | 163 // rowIndex() above instead. This is to ensure that we never read this |
| 162 // value before it is set. | 164 // value before it is set. |
| 163 unsigned m_rowIndex : 31; | 165 unsigned m_rowIndex : 31; |
| 166 bool m_hasPaginationStrut : 1; |
| 164 }; | 167 }; |
| 165 | 168 |
| 166 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableRow, isTableRow()); | 169 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableRow, isTableRow()); |
| 167 | 170 |
| 168 inline LayoutTableRow* LayoutTableRow::previousRow() const | 171 inline LayoutTableRow* LayoutTableRow::previousRow() const |
| 169 { | 172 { |
| 170 return toLayoutTableRow(LayoutObject::previousSibling()); | 173 return toLayoutTableRow(LayoutObject::previousSibling()); |
| 171 } | 174 } |
| 172 | 175 |
| 173 inline LayoutTableRow* LayoutTableRow::nextRow() const | 176 inline LayoutTableRow* LayoutTableRow::nextRow() const |
| 174 { | 177 { |
| 175 return toLayoutTableRow(LayoutObject::nextSibling()); | 178 return toLayoutTableRow(LayoutObject::nextSibling()); |
| 176 } | 179 } |
| 177 | 180 |
| 178 inline LayoutTableRow* LayoutTableSection::firstRow() const | 181 inline LayoutTableRow* LayoutTableSection::firstRow() const |
| 179 { | 182 { |
| 180 return toLayoutTableRow(firstChild()); | 183 return toLayoutTableRow(firstChild()); |
| 181 } | 184 } |
| 182 | 185 |
| 183 inline LayoutTableRow* LayoutTableSection::lastRow() const | 186 inline LayoutTableRow* LayoutTableSection::lastRow() const |
| 184 { | 187 { |
| 185 return toLayoutTableRow(lastChild()); | 188 return toLayoutTableRow(lastChild()); |
| 186 } | 189 } |
| 187 | 190 |
| 188 } // namespace blink | 191 } // namespace blink |
| 189 | 192 |
| 190 #endif // LayoutTableRow_h | 193 #endif // LayoutTableRow_h |
| OLD | NEW |