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, 2007, 2009 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. All rights
reserved. |
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 |
11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
12 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
13 * | 13 * |
14 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 * Library General Public License for more details. | 17 * Library General Public License for more details. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 unsigned col() const | 70 unsigned col() const |
71 { | 71 { |
72 ASSERT(m_column != unsetColumnIndex); | 72 ASSERT(m_column != unsetColumnIndex); |
73 return m_column; | 73 return m_column; |
74 } | 74 } |
75 | 75 |
76 RenderTableRow* row() const { return toRenderTableRow(parent()); } | 76 RenderTableRow* row() const { return toRenderTableRow(parent()); } |
77 RenderTableSection* section() const { return toRenderTableSection(parent()->
parent()); } | 77 RenderTableSection* section() const { return toRenderTableSection(parent()->
parent()); } |
78 RenderTable* table() const { return toRenderTable(parent()->parent()->parent
()); } | 78 RenderTable* table() const { return toRenderTable(parent()->parent()->parent
()); } |
79 | 79 |
| 80 RenderTableCell* previousCell() const; |
| 81 RenderTableCell* nextCell() const; |
| 82 |
80 unsigned rowIndex() const | 83 unsigned rowIndex() const |
81 { | 84 { |
82 // This function shouldn't be called on a detached cell. | 85 // This function shouldn't be called on a detached cell. |
83 ASSERT(row()); | 86 ASSERT(row()); |
84 return row()->rowIndex(); | 87 return row()->rowIndex(); |
85 } | 88 } |
86 | 89 |
87 Length styleOrColLogicalWidth() const | 90 Length styleOrColLogicalWidth() const |
88 { | 91 { |
89 Length styleWidth = style()->logicalWidth(); | 92 Length styleWidth = style()->logicalWidth(); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 CollapsedBorderValue computeCollapsedBeforeBorder(IncludeBorderColorOrNot =
IncludeBorderColor) const; | 273 CollapsedBorderValue computeCollapsedBeforeBorder(IncludeBorderColorOrNot =
IncludeBorderColor) const; |
271 CollapsedBorderValue computeCollapsedAfterBorder(IncludeBorderColorOrNot = I
ncludeBorderColor) const; | 274 CollapsedBorderValue computeCollapsedAfterBorder(IncludeBorderColorOrNot = I
ncludeBorderColor) const; |
272 | 275 |
273 Length logicalWidthFromColumns(RenderTableCol* firstColForThisCell, Length w
idthFromStyle) const; | 276 Length logicalWidthFromColumns(RenderTableCol* firstColForThisCell, Length w
idthFromStyle) const; |
274 | 277 |
275 void updateColAndRowSpanFlags(); | 278 void updateColAndRowSpanFlags(); |
276 | 279 |
277 unsigned parseRowSpanFromDOM() const; | 280 unsigned parseRowSpanFromDOM() const; |
278 unsigned parseColSpanFromDOM() const; | 281 unsigned parseColSpanFromDOM() const; |
279 | 282 |
| 283 void nextSibling() const WTF_DELETED_FUNCTION; |
| 284 void previousSibling() const WTF_DELETED_FUNCTION; |
| 285 |
280 // Note MSVC will only pack members if they have identical types, hence we u
se unsigned instead of bool here. | 286 // Note MSVC will only pack members if they have identical types, hence we u
se unsigned instead of bool here. |
281 unsigned m_column : 29; | 287 unsigned m_column : 29; |
282 unsigned m_cellWidthChanged : 1; | 288 unsigned m_cellWidthChanged : 1; |
283 unsigned m_hasColSpan: 1; | 289 unsigned m_hasColSpan: 1; |
284 unsigned m_hasRowSpan: 1; | 290 unsigned m_hasRowSpan: 1; |
285 int m_intrinsicPaddingBefore; | 291 int m_intrinsicPaddingBefore; |
286 int m_intrinsicPaddingAfter; | 292 int m_intrinsicPaddingAfter; |
287 }; | 293 }; |
288 | 294 |
289 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCell, isTableCell()); | 295 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCell, isTableCell()); |
290 | 296 |
| 297 inline RenderTableCell* RenderTableCell::previousCell() const |
| 298 { |
| 299 return toRenderTableCell(RenderObject::previousSibling()); |
| 300 } |
| 301 |
| 302 inline RenderTableCell* RenderTableCell::nextCell() const |
| 303 { |
| 304 return toRenderTableCell(RenderObject::nextSibling()); |
| 305 } |
| 306 |
| 307 inline RenderTableCell* RenderTableRow::firstCell() const |
| 308 { |
| 309 ASSERT(children() == virtualChildren()); |
| 310 return toRenderTableCell(children()->firstChild()); |
| 311 } |
| 312 |
| 313 inline RenderTableCell* RenderTableRow::lastCell() const |
| 314 { |
| 315 ASSERT(children() == virtualChildren()); |
| 316 return toRenderTableCell(children()->lastChild()); |
| 317 } |
| 318 |
291 } // namespace WebCore | 319 } // namespace WebCore |
292 | 320 |
293 #endif // RenderTableCell_h | 321 #endif // RenderTableCell_h |
OLD | NEW |