FixedTableLayoutStrategy.h (1237B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 // vim:cindent:ts=2:et:sw=2: 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 isizes used for CSS2's 9 * 'table-layout: fixed'. 10 */ 11 12 #ifndef FixedTableLayoutStrategy_h_ 13 #define FixedTableLayoutStrategy_h_ 14 15 #include "nsITableLayoutStrategy.h" 16 17 class nsTableFrame; 18 19 class FixedTableLayoutStrategy : public nsITableLayoutStrategy { 20 public: 21 explicit FixedTableLayoutStrategy(nsTableFrame* aTableFrame); 22 virtual ~FixedTableLayoutStrategy(); 23 24 // nsITableLayoutStrategy implementation 25 virtual nscoord GetMinISize(gfxContext* aRenderingContext) override; 26 virtual nscoord GetPrefISize(gfxContext* aRenderingContext, 27 bool aComputingSize) override; 28 virtual void MarkIntrinsicISizesDirty() override; 29 virtual void ComputeColumnISizes(const ReflowInput& aReflowInput) override; 30 31 private: 32 nsTableFrame* mTableFrame; 33 nscoord mMinISize; 34 nscoord mLastCalcISize; 35 }; 36 37 #endif /* !defined(FixedTableLayoutStrategy_h_) */