| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2002 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002 Dirk Mueller (mueller@kde.org) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License. | 8 * version 2 of the License. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "platform/Length.h" | 26 #include "platform/Length.h" |
| 27 #include "wtf/Vector.h" | 27 #include "wtf/Vector.h" |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 class LayoutTable; | 31 class LayoutTable; |
| 32 class LayoutTableCell; | 32 class LayoutTableCell; |
| 33 | 33 |
| 34 enum CellsToProcess { | 34 enum CellsToProcess { |
| 35 AllCells, | 35 AllCells, |
| 36 NonEmptyCells | 36 NonEmptyCells, |
| 37 EmptyCells |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 enum DistributionMode { | 40 enum DistributionMode { |
| 40 ExtraWidth, | 41 ExtraWidth, |
| 41 InitialWidth, | 42 InitialWidth, |
| 42 LeftoverWidth | 43 LeftoverWidth |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 enum DistributionDirection { | 46 enum DistributionDirection { |
| 46 StartToEnd, | 47 StartToEnd, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 68 void insertSpanCell(LayoutTableCell*); | 69 void insertSpanCell(LayoutTableCell*); |
| 69 | 70 |
| 70 struct Layout { | 71 struct Layout { |
| 71 Layout() | 72 Layout() |
| 72 : minLogicalWidth(0) | 73 : minLogicalWidth(0) |
| 73 , maxLogicalWidth(0) | 74 , maxLogicalWidth(0) |
| 74 , effectiveMinLogicalWidth(0) | 75 , effectiveMinLogicalWidth(0) |
| 75 , effectiveMaxLogicalWidth(0) | 76 , effectiveMaxLogicalWidth(0) |
| 76 , computedLogicalWidth(0) | 77 , computedLogicalWidth(0) |
| 77 , emptyCellsOnly(true) | 78 , emptyCellsOnly(true) |
| 79 , columnHasNoCells(true) |
| 78 { | 80 { |
| 79 } | 81 } |
| 80 | 82 |
| 81 Length logicalWidth; | 83 Length logicalWidth; |
| 82 Length effectiveLogicalWidth; | 84 Length effectiveLogicalWidth; |
| 83 int minLogicalWidth; | 85 int minLogicalWidth; |
| 84 int maxLogicalWidth; | 86 int maxLogicalWidth; |
| 85 int effectiveMinLogicalWidth; | 87 int effectiveMinLogicalWidth; |
| 86 int effectiveMaxLogicalWidth; | 88 int effectiveMaxLogicalWidth; |
| 87 int computedLogicalWidth; | 89 int computedLogicalWidth; |
| 88 bool emptyCellsOnly; | 90 bool emptyCellsOnly; |
| 91 bool columnHasNoCells; |
| 92 int clampedEffectiveMaxLogicalWidth() { return std::max<int>(1, effectiv
eMaxLogicalWidth); } |
| 89 }; | 93 }; |
| 90 | 94 |
| 91 Vector<Layout, 4> m_layoutStruct; | 95 Vector<Layout, 4> m_layoutStruct; |
| 92 Vector<LayoutTableCell*, 4> m_spanCells; | 96 Vector<LayoutTableCell*, 4> m_spanCells; |
| 93 bool m_hasPercent : 1; | 97 bool m_hasPercent : 1; |
| 94 mutable bool m_effectiveLogicalWidthDirty : 1; | 98 mutable bool m_effectiveLogicalWidthDirty : 1; |
| 95 }; | 99 }; |
| 96 | 100 |
| 97 } // namespace blink | 101 } // namespace blink |
| 98 | 102 |
| 99 #endif // TableLayoutAlgorithmAuto | 103 #endif // TableLayoutAlgorithmAuto |
| OLD | NEW |