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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void layoutRows(); | 124 void layoutRows(); |
125 void computeOverflowFromCells(); | 125 void computeOverflowFromCells(); |
126 | 126 |
127 LayoutTable* table() const { return toLayoutTable(parent()); } | 127 LayoutTable* table() const { return toLayoutTable(parent()); } |
128 | 128 |
129 typedef Vector<LayoutTableCell*, 2> SpanningLayoutTableCells; | 129 typedef Vector<LayoutTableCell*, 2> SpanningLayoutTableCells; |
130 | 130 |
131 // CellStruct represents the cells that occupy an (N, M) position in the | 131 // CellStruct represents the cells that occupy an (N, M) position in the |
132 // table grid. | 132 // table grid. |
133 struct CellStruct { | 133 struct CellStruct { |
134 ALLOW_ONLY_INLINE_ALLOCATION(); | 134 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
135 public: | 135 public: |
136 // All the cells that fills this grid "slot". | 136 // All the cells that fills this grid "slot". |
137 // Due to colspan / rowpsan, it is possible to have overlapping cells | 137 // Due to colspan / rowpsan, it is possible to have overlapping cells |
138 // (see class comment about an example). | 138 // (see class comment about an example). |
139 // This Vector is sorted in DOM order. | 139 // This Vector is sorted in DOM order. |
140 Vector<LayoutTableCell*, 1> cells; | 140 Vector<LayoutTableCell*, 1> cells; |
141 bool inColSpan; // true for columns after the first in a colspan | 141 bool inColSpan; // true for columns after the first in a colspan |
142 | 142 |
143 CellStruct() | 143 CellStruct() |
144 : inColSpan(false) | 144 : inColSpan(false) |
(...skipping 20 matching lines...) Expand all Loading... |
165 { | 165 { |
166 return hasCells() ? cells[cells.size() - 1] : 0; | 166 return hasCells() ? cells[cells.size() - 1] : 0; |
167 } | 167 } |
168 | 168 |
169 bool hasCells() const { return cells.size() > 0; } | 169 bool hasCells() const { return cells.size() > 0; } |
170 }; | 170 }; |
171 | 171 |
172 typedef Vector<CellStruct> Row; | 172 typedef Vector<CellStruct> Row; |
173 | 173 |
174 struct RowStruct { | 174 struct RowStruct { |
175 ALLOW_ONLY_INLINE_ALLOCATION(); | 175 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
176 public: | 176 public: |
177 RowStruct() | 177 RowStruct() |
178 : rowLayoutObject(nullptr) | 178 : rowLayoutObject(nullptr) |
179 , baseline(-1) | 179 , baseline(-1) |
180 { | 180 { |
181 } | 181 } |
182 | 182 |
183 Row row; | 183 Row row; |
184 LayoutTableRow* rowLayoutObject; | 184 LayoutTableRow* rowLayoutObject; |
185 LayoutUnit baseline; | 185 LayoutUnit baseline; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 // It is held at LayoutTableSection level to spare memory consumption by tab
le cells. | 408 // It is held at LayoutTableSection level to spare memory consumption by tab
le cells. |
409 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i
nt>, CollapsedBorderValue>; | 409 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i
nt>, CollapsedBorderValue>; |
410 CellsCollapsedBordersMap m_cellsCollapsedBorders; | 410 CellsCollapsedBordersMap m_cellsCollapsedBorders; |
411 }; | 411 }; |
412 | 412 |
413 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); | 413 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); |
414 | 414 |
415 } // namespace blink | 415 } // namespace blink |
416 | 416 |
417 #endif // LayoutTableSection_h | 417 #endif // LayoutTableSection_h |
OLD | NEW |