1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/tables/FixedTableLayoutStrategy.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +// vim:cindent:ts=4:et:sw=4: 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +/* 1.11 + * Algorithms that determine column and table widths used for CSS2's 1.12 + * 'table-layout: fixed'. 1.13 + */ 1.14 + 1.15 +#ifndef FixedTableLayoutStrategy_h_ 1.16 +#define FixedTableLayoutStrategy_h_ 1.17 + 1.18 +#include "mozilla/Attributes.h" 1.19 +#include "nsITableLayoutStrategy.h" 1.20 + 1.21 +class nsTableFrame; 1.22 + 1.23 +class FixedTableLayoutStrategy : public nsITableLayoutStrategy 1.24 +{ 1.25 +public: 1.26 + FixedTableLayoutStrategy(nsTableFrame *aTableFrame); 1.27 + virtual ~FixedTableLayoutStrategy(); 1.28 + 1.29 + // nsITableLayoutStrategy implementation 1.30 + virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE; 1.31 + virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext, 1.32 + bool aComputingSize) MOZ_OVERRIDE; 1.33 + virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE; 1.34 + virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE; 1.35 + 1.36 +private: 1.37 + nsTableFrame *mTableFrame; 1.38 + nscoord mMinWidth; 1.39 + nscoord mLastCalcWidth; 1.40 +}; 1.41 + 1.42 +#endif /* !defined(FixedTableLayoutStrategy_h_) */