| 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, 2010 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 for (unsigned i = 0; i < effCol; i++) | 253 for (unsigned i = 0; i < effCol; i++) |
| 254 c += m_columns[i].span; | 254 c += m_columns[i].span; |
| 255 return c; | 255 return c; |
| 256 } | 256 } |
| 257 | 257 |
| 258 LayoutUnit borderSpacingInRowDirection() const | 258 LayoutUnit borderSpacingInRowDirection() const |
| 259 { | 259 { |
| 260 if (unsigned effectiveColumnCount = numEffCols()) | 260 if (unsigned effectiveColumnCount = numEffCols()) |
| 261 return static_cast<LayoutUnit>(effectiveColumnCount + 1) * hBorderSp
acing(); | 261 return static_cast<LayoutUnit>(effectiveColumnCount + 1) * hBorderSp
acing(); |
| 262 | 262 |
| 263 return 0; | 263 return LayoutUnit(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 // The collapsing border model dissallows paddings on table, which is why we | 266 // The collapsing border model dissallows paddings on table, which is why we |
| 267 // override those functions. | 267 // override those functions. |
| 268 // See http://www.w3.org/TR/CSS2/tables.html#collapsing-borders. | 268 // See http://www.w3.org/TR/CSS2/tables.html#collapsing-borders. |
| 269 LayoutUnit paddingTop() const override; | 269 LayoutUnit paddingTop() const override; |
| 270 LayoutUnit paddingBottom() const override; | 270 LayoutUnit paddingBottom() const override; |
| 271 LayoutUnit paddingLeft() const override; | 271 LayoutUnit paddingLeft() const override; |
| 272 LayoutUnit paddingRight() const override; | 272 LayoutUnit paddingRight() const override; |
| 273 | 273 |
| 274 // Override paddingStart/End to return pixel values to match behavor of Layo
utTableCell. | 274 // Override paddingStart/End to return pixel values to match behavor of Layo
utTableCell. |
| 275 LayoutUnit paddingEnd() const override { return static_cast<int>(LayoutBlock
::paddingEnd()); } | 275 LayoutUnit paddingEnd() const override { return LayoutUnit(static_cast<int>(
LayoutBlock::paddingEnd())); } |
| 276 LayoutUnit paddingStart() const override { return static_cast<int>(LayoutBlo
ck::paddingStart()); } | 276 LayoutUnit paddingStart() const override { return LayoutUnit(static_cast<int
>(LayoutBlock::paddingStart())); } |
| 277 | 277 |
| 278 LayoutUnit bordersPaddingAndSpacingInRowDirection() const | 278 LayoutUnit bordersPaddingAndSpacingInRowDirection() const |
| 279 { | 279 { |
| 280 // 'border-spacing' only applies to separate borders (see 17.6.1 The sep
arated borders model). | 280 // 'border-spacing' only applies to separate borders (see 17.6.1 The sep
arated borders model). |
| 281 return borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() :
(paddingStart() + paddingEnd() + borderSpacingInRowDirection())); | 281 return borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() :
(paddingStart() + paddingEnd() + borderSpacingInRowDirection())); |
| 282 } | 282 } |
| 283 | 283 |
| 284 // Return the first column or column-group. | 284 // Return the first column or column-group. |
| 285 LayoutTableCol* firstColumn() const; | 285 LayoutTableCol* firstColumn() const; |
| 286 | 286 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 if (m_firstBody) | 496 if (m_firstBody) |
| 497 return m_firstBody; | 497 return m_firstBody; |
| 498 return m_foot; | 498 return m_foot; |
| 499 } | 499 } |
| 500 | 500 |
| 501 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 501 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
| 502 | 502 |
| 503 } // namespace blink | 503 } // namespace blink |
| 504 | 504 |
| 505 #endif // LayoutTable_h | 505 #endif // LayoutTable_h |
| OLD | NEW |