1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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/. */
8 * interface for the set of algorithms that determine column and table
12 #ifndef nsITableLayoutStrategy_h_
13 #define nsITableLayoutStrategy_h_
21 } // namespace mozilla
23 class nsITableLayoutStrategy
{
25 using ReflowInput
= mozilla::ReflowInput
;
27 virtual ~nsITableLayoutStrategy() = default;
29 /** Implement nsIFrame::GetMinISize for the table */
30 virtual nscoord
GetMinISize(gfxContext
* aRenderingContext
) = 0;
32 /** Implement nsIFrame::GetPrefISize for the table */
33 virtual nscoord
GetPrefISize(gfxContext
* aRenderingContext
,
34 bool aComputingSize
) = 0;
36 /** Implement nsIFrame::MarkIntrinsicISizesDirty for the table */
37 virtual void MarkIntrinsicISizesDirty() = 0;
40 * Compute final column isizes based on the intrinsic isize data and
41 * the available isize.
43 virtual void ComputeColumnISizes(const ReflowInput
& aReflowInput
) = 0;
46 * Return the type of table layout strategy, without the cost of
47 * a virtual function call
49 enum Type
{ Auto
, Fixed
};
50 Type
GetType() const { return mType
; }
53 explicit nsITableLayoutStrategy(Type aType
) : mType(aType
) {}
59 #endif /* !defined(nsITableLayoutStrategy_h_) */