| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 explicit LayoutTable(Element*); | 108 explicit LayoutTable(Element*); |
| 109 ~LayoutTable() override; | 109 ~LayoutTable() override; |
| 110 | 110 |
| 111 // Per CSS 3 writing-mode: "The first and second values of the 'border-spaci
ng' property represent spacing between columns | 111 // Per CSS 3 writing-mode: "The first and second values of the 'border-spaci
ng' property represent spacing between columns |
| 112 // and rows respectively, not necessarily the horizontal and vertical spacin
g respectively". | 112 // and rows respectively, not necessarily the horizontal and vertical spacin
g respectively". |
| 113 int hBorderSpacing() const { return m_hSpacing; } | 113 int hBorderSpacing() const { return m_hSpacing; } |
| 114 int vBorderSpacing() const { return m_vSpacing; } | 114 int vBorderSpacing() const { return m_vSpacing; } |
| 115 | 115 |
| 116 bool collapseBorders() const { return style()->borderCollapse(); } | 116 bool collapseBorders() const { return style()->borderCollapse(); } |
| 117 | 117 |
| 118 int borderStart() const override { return m_borderStart; } | 118 LayoutUnit borderStart() const override { return m_borderStart; } |
| 119 int borderEnd() const override { return m_borderEnd; } | 119 LayoutUnit borderEnd() const override { return m_borderEnd; } |
| 120 int borderBefore() const override; | 120 LayoutUnit borderBefore() const override; |
| 121 int borderAfter() const override; | 121 LayoutUnit borderAfter() const override; |
| 122 | 122 |
| 123 int borderLeft() const override | 123 LayoutUnit borderLeft() const override |
| 124 { | 124 { |
| 125 if (style()->isHorizontalWritingMode()) | 125 if (style()->isHorizontalWritingMode()) |
| 126 return style()->isLeftToRightDirection() ? borderStart() : borderEnd
(); | 126 return style()->isLeftToRightDirection() ? borderStart() : borderEnd
(); |
| 127 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borderBef
ore(); | 127 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borderBef
ore(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 int borderRight() const override | 130 LayoutUnit borderRight() const override |
| 131 { | 131 { |
| 132 if (style()->isHorizontalWritingMode()) | 132 if (style()->isHorizontalWritingMode()) |
| 133 return style()->isLeftToRightDirection() ? borderEnd() : borderStart
(); | 133 return style()->isLeftToRightDirection() ? borderEnd() : borderStart
(); |
| 134 return style()->isFlippedBlocksWritingMode() ? borderBefore() : borderAf
ter(); | 134 return style()->isFlippedBlocksWritingMode() ? borderBefore() : borderAf
ter(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 int borderTop() const override | 137 LayoutUnit borderTop() const override |
| 138 { | 138 { |
| 139 if (style()->isHorizontalWritingMode()) | 139 if (style()->isHorizontalWritingMode()) |
| 140 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borde
rBefore(); | 140 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borde
rBefore(); |
| 141 return style()->isLeftToRightDirection() ? borderStart() : borderEnd(); | 141 return style()->isLeftToRightDirection() ? borderStart() : borderEnd(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 int borderBottom() const override | 144 LayoutUnit borderBottom() const override |
| 145 { | 145 { |
| 146 if (style()->isHorizontalWritingMode()) | 146 if (style()->isHorizontalWritingMode()) |
| 147 return style()->isFlippedBlocksWritingMode() ? borderBefore() : bord
erAfter(); | 147 return style()->isFlippedBlocksWritingMode() ? borderBefore() : bord
erAfter(); |
| 148 return style()->isLeftToRightDirection() ? borderEnd() : borderStart(); | 148 return style()->isLeftToRightDirection() ? borderEnd() : borderStart(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 int outerBorderBefore() const; | 151 int outerBorderBefore() const; |
| 152 int outerBorderAfter() const; | 152 int outerBorderAfter() const; |
| 153 int outerBorderStart() const; | 153 int outerBorderStart() const; |
| 154 int outerBorderEnd() const; | 154 int outerBorderEnd() const; |
| (...skipping 341 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 |