2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org)
3 * (C) 2002 Dirk Mueller (mueller@kde.org)
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef AutoTableLayout_h
22 #define AutoTableLayout_h
24 #include "LayoutTypes.h"
26 #include "TableLayout.h"
27 #include <wtf/Vector.h>
32 class RenderTableCell;
34 class AutoTableLayout : public TableLayout {
36 AutoTableLayout(RenderTable*);
39 virtual void computePreferredLogicalWidths(LayoutUnit& minWidth, LayoutUnit& maxWidth);
40 virtual void layout();
44 void recalcColumn(unsigned effCol);
46 int calcEffectiveLogicalWidth();
48 void insertSpanCell(RenderTableCell*);
54 , effectiveMinLogicalWidth(0)
55 , effectiveMaxLogicalWidth(0)
56 , computedLogicalWidth(0)
57 , emptyCellsOnly(true)
62 Length effectiveLogicalWidth;
65 int effectiveMinLogicalWidth;
66 int effectiveMaxLogicalWidth;
67 int computedLogicalWidth;
71 Vector<Layout, 4> m_layoutStruct;
72 Vector<RenderTableCell*, 4> m_spanCells;
73 bool m_hasPercent : 1;
74 mutable bool m_effectiveLogicalWidthDirty : 1;
77 } // namespace WebCore
79 #endif // AutoTableLayout_h