| 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 12 matching lines...) Expand all Loading... |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef LayoutTable_h | 25 #ifndef LayoutTable_h |
| 26 #define LayoutTable_h | 26 #define LayoutTable_h |
| 27 | 27 |
| 28 #include "core/CSSPropertyNames.h" | 28 #include "core/CSSPropertyNames.h" |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "core/layout/LayoutBlock.h" | 30 #include "core/layout/LayoutBlock.h" |
| 31 #include "core/style/CollapsedBorderValue.h" | 31 #include "core/style/CollapsedBorderValue.h" |
| 32 #include "wtf/Vector.h" | 32 #include "wtf/Vector.h" |
| 33 #include <memory> |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 class LayoutTableCol; | 37 class LayoutTableCol; |
| 37 class LayoutTableCaption; | 38 class LayoutTableCaption; |
| 38 class LayoutTableCell; | 39 class LayoutTableCell; |
| 39 class LayoutTableSection; | 40 class LayoutTableSection; |
| 40 class TableLayoutAlgorithm; | 41 class TableLayoutAlgorithm; |
| 41 | 42 |
| 42 enum SkipEmptySectionsValue { DoNotSkipEmptySections, SkipEmptySections }; | 43 enum SkipEmptySectionsValue { DoNotSkipEmptySections, SkipEmptySections }; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 // | 468 // |
| 468 // CSS 2.1 defines 2 types of table layouts toggled with 'table-layout': | 469 // CSS 2.1 defines 2 types of table layouts toggled with 'table-layout': |
| 469 // fixed (TableLayoutAlgorithmFixed) and auto (TableLayoutAlgorithmAuto). | 470 // fixed (TableLayoutAlgorithmFixed) and auto (TableLayoutAlgorithmAuto). |
| 470 // See http://www.w3.org/TR/CSS21/tables.html#width-layout. | 471 // See http://www.w3.org/TR/CSS21/tables.html#width-layout. |
| 471 // | 472 // |
| 472 // The layout algorithm is delegated to TableLayoutAlgorithm. This enables | 473 // The layout algorithm is delegated to TableLayoutAlgorithm. This enables |
| 473 // changing 'table-layout' without having to reattach the <table>. | 474 // changing 'table-layout' without having to reattach the <table>. |
| 474 // | 475 // |
| 475 // As the algorithm is dependent on the style, this field is nullptr before | 476 // As the algorithm is dependent on the style, this field is nullptr before |
| 476 // the first style is applied in styleDidChange(). | 477 // the first style is applied in styleDidChange(). |
| 477 OwnPtr<TableLayoutAlgorithm> m_tableLayout; | 478 std::unique_ptr<TableLayoutAlgorithm> m_tableLayout; |
| 478 | 479 |
| 479 // A sorted list of all unique border values that we want to paint. | 480 // A sorted list of all unique border values that we want to paint. |
| 480 // | 481 // |
| 481 // Collapsed borders are SUPER EXPENSIVE to compute. The reason is that we | 482 // Collapsed borders are SUPER EXPENSIVE to compute. The reason is that we |
| 482 // need to compare a cells border against all the adjoining cells, rows, | 483 // need to compare a cells border against all the adjoining cells, rows, |
| 483 // row groups, column, column groups and table. Thus we cache them in this | 484 // row groups, column, column groups and table. Thus we cache them in this |
| 484 // field. | 485 // field. |
| 485 CollapsedBorderValues m_collapsedBorders; | 486 CollapsedBorderValues m_collapsedBorders; |
| 486 bool m_collapsedBordersValid : 1; | 487 bool m_collapsedBordersValid : 1; |
| 487 | 488 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 514 if (m_firstBody) | 515 if (m_firstBody) |
| 515 return m_firstBody; | 516 return m_firstBody; |
| 516 return m_foot; | 517 return m_foot; |
| 517 } | 518 } |
| 518 | 519 |
| 519 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 520 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
| 520 | 521 |
| 521 } // namespace blink | 522 } // namespace blink |
| 522 | 523 |
| 523 #endif // LayoutTable_h | 524 #endif // LayoutTable_h |
| OLD | NEW |