| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 // The collapsing border model dissallows paddings on table, which is why we | 293 // The collapsing border model dissallows paddings on table, which is why we |
| 294 // override those functions. | 294 // override those functions. |
| 295 // See http://www.w3.org/TR/CSS2/tables.html#collapsing-borders. | 295 // See http://www.w3.org/TR/CSS2/tables.html#collapsing-borders. |
| 296 LayoutUnit paddingTop() const override; | 296 LayoutUnit paddingTop() const override; |
| 297 LayoutUnit paddingBottom() const override; | 297 LayoutUnit paddingBottom() const override; |
| 298 LayoutUnit paddingLeft() const override; | 298 LayoutUnit paddingLeft() const override; |
| 299 LayoutUnit paddingRight() const override; | 299 LayoutUnit paddingRight() const override; |
| 300 | 300 |
| 301 // Override paddingStart/End to return pixel values to match behavor of Layo
utTableCell. | 301 // Override paddingStart/End to return pixel values to match behavor of Layo
utTableCell. |
| 302 LayoutUnit paddingEnd() const override { return LayoutUnit(static_cast<int>(
LayoutBlock::paddingEnd())); } | 302 LayoutUnit paddingEnd() const override { return LayoutUnit(LayoutBlock::padd
ingEnd().toInt()); } |
| 303 LayoutUnit paddingStart() const override { return LayoutUnit(static_cast<int
>(LayoutBlock::paddingStart())); } | 303 LayoutUnit paddingStart() const override { return LayoutUnit(LayoutBlock::pa
ddingStart().toInt()); } |
| 304 | 304 |
| 305 LayoutUnit bordersPaddingAndSpacingInRowDirection() const | 305 LayoutUnit bordersPaddingAndSpacingInRowDirection() const |
| 306 { | 306 { |
| 307 // 'border-spacing' only applies to separate borders (see 17.6.1 The sep
arated borders model). | 307 // 'border-spacing' only applies to separate borders (see 17.6.1 The sep
arated borders model). |
| 308 return borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() :
(paddingStart() + paddingEnd() + borderSpacingInRowDirection())); | 308 return borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() :
(paddingStart() + paddingEnd() + borderSpacingInRowDirection())); |
| 309 } | 309 } |
| 310 | 310 |
| 311 // Return the first column or column-group. | 311 // Return the first column or column-group. |
| 312 LayoutTableCol* firstColumn() const; | 312 LayoutTableCol* firstColumn() const; |
| 313 | 313 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 if (m_firstBody) | 516 if (m_firstBody) |
| 517 return m_firstBody; | 517 return m_firstBody; |
| 518 return m_foot; | 518 return m_foot; |
| 519 } | 519 } |
| 520 | 520 |
| 521 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 521 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
| 522 | 522 |
| 523 } // namespace blink | 523 } // namespace blink |
| 524 | 524 |
| 525 #endif // LayoutTable_h | 525 #endif // LayoutTable_h |
| OLD | NEW |