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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 { | 116 { |
117 if (style()->isHorizontalWritingMode()) | 117 if (style()->isHorizontalWritingMode()) |
118 return style()->isFlippedBlocksWritingMode() ? outerBorderBefore() :
outerBorderAfter(); | 118 return style()->isFlippedBlocksWritingMode() ? outerBorderBefore() :
outerBorderAfter(); |
119 return style()->isLeftToRightDirection() ? outerBorderEnd() : outerBorde
rStart(); | 119 return style()->isLeftToRightDirection() ? outerBorderEnd() : outerBorde
rStart(); |
120 } | 120 } |
121 | 121 |
122 int calcBorderStart() const; | 122 int calcBorderStart() const; |
123 int calcBorderEnd() const; | 123 int calcBorderEnd() const; |
124 void recalcBordersInRowDirection(); | 124 void recalcBordersInRowDirection(); |
125 | 125 |
126 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov
erride; | 126 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = nullp
tr) override; |
127 virtual void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObje
ct* beforeChild = 0) override; | 127 virtual void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObje
ct* beforeChild = nullptr) override; |
128 | 128 |
129 struct ColumnStruct { | 129 struct ColumnStruct { |
130 explicit ColumnStruct(unsigned initialSpan = 1) | 130 explicit ColumnStruct(unsigned initialSpan = 1) |
131 : span(initialSpan) | 131 : span(initialSpan) |
132 { | 132 { |
133 } | 133 } |
134 | 134 |
135 unsigned span; | 135 unsigned span; |
136 }; | 136 }; |
137 | 137 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 LayoutUnit bordersPaddingAndSpacingInRowDirection() const | 207 LayoutUnit bordersPaddingAndSpacingInRowDirection() const |
208 { | 208 { |
209 // 'border-spacing' only applies to separate borders (see 17.6.1 The sep
arated borders model). | 209 // 'border-spacing' only applies to separate borders (see 17.6.1 The sep
arated borders model). |
210 return borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() :
(paddingStart() + paddingEnd() + borderSpacingInRowDirection())); | 210 return borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() :
(paddingStart() + paddingEnd() + borderSpacingInRowDirection())); |
211 } | 211 } |
212 | 212 |
213 // Return the first column or column-group. | 213 // Return the first column or column-group. |
214 LayoutTableCol* firstColumn() const; | 214 LayoutTableCol* firstColumn() const; |
215 | 215 |
216 LayoutTableCol* colElement(unsigned col, bool* startEdge = 0, bool* endEdge
= 0) const | 216 LayoutTableCol* colElement(unsigned col, bool* startEdge = nullptr, bool* en
dEdge = nullptr) const |
217 { | 217 { |
218 // The common case is to not have columns, make that case fast. | 218 // The common case is to not have columns, make that case fast. |
219 if (!m_hasColElements) | 219 if (!m_hasColElements) |
220 return 0; | 220 return nullptr; |
221 return slowColElement(col, startEdge, endEdge); | 221 return slowColElement(col, startEdge, endEdge); |
222 } | 222 } |
223 | 223 |
224 bool needsSectionRecalc() const { return m_needsSectionRecalc; } | 224 bool needsSectionRecalc() const { return m_needsSectionRecalc; } |
225 void setNeedsSectionRecalc() | 225 void setNeedsSectionRecalc() |
226 { | 226 { |
227 if (documentBeingDestroyed()) | 227 if (documentBeingDestroyed()) |
228 return; | 228 return; |
229 m_needsSectionRecalc = true; | 229 m_needsSectionRecalc = true; |
230 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh
anged); | 230 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh
anged); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 if (m_firstBody) | 366 if (m_firstBody) |
367 return m_firstBody; | 367 return m_firstBody; |
368 return m_foot; | 368 return m_foot; |
369 } | 369 } |
370 | 370 |
371 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 371 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
372 | 372 |
373 } // namespace blink | 373 } // namespace blink |
374 | 374 |
375 #endif // LayoutTable_h | 375 #endif // LayoutTable_h |
OLD | NEW |