layout/tables/FixedTableLayoutStrategy.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:587abf69194f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // vim:cindent:ts=4:et:sw=4:
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 /*
8 * Algorithms that determine column and table widths used for CSS2's
9 * 'table-layout: fixed'.
10 */
11
12 #ifndef FixedTableLayoutStrategy_h_
13 #define FixedTableLayoutStrategy_h_
14
15 #include "mozilla/Attributes.h"
16 #include "nsITableLayoutStrategy.h"
17
18 class nsTableFrame;
19
20 class FixedTableLayoutStrategy : public nsITableLayoutStrategy
21 {
22 public:
23 FixedTableLayoutStrategy(nsTableFrame *aTableFrame);
24 virtual ~FixedTableLayoutStrategy();
25
26 // nsITableLayoutStrategy implementation
27 virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
28 virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext,
29 bool aComputingSize) MOZ_OVERRIDE;
30 virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
31 virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;
32
33 private:
34 nsTableFrame *mTableFrame;
35 nscoord mMinWidth;
36 nscoord mLastCalcWidth;
37 };
38
39 #endif /* !defined(FixedTableLayoutStrategy_h_) */

mercurial