Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
// vim:cindent:ts=4:et:sw=4:
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1998-04-30 21:57:09 +04:00
|
|
|
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
/*
|
|
|
|
* interface for the set of algorithms that determine column and table
|
|
|
|
* widths
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsITableLayoutStrategy_h_
|
|
|
|
#define nsITableLayoutStrategy_h_
|
1998-04-30 21:57:09 +04:00
|
|
|
|
|
|
|
#include "nscore.h"
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
#include "nsCoord.h"
|
1998-04-30 21:57:09 +04:00
|
|
|
|
2011-04-08 05:04:40 +04:00
|
|
|
class nsRenderingContext;
|
1998-10-02 08:10:00 +04:00
|
|
|
struct nsHTMLReflowState;
|
1998-04-30 21:57:09 +04:00
|
|
|
|
|
|
|
class nsITableLayoutStrategy
|
|
|
|
{
|
|
|
|
public:
|
2007-04-23 18:21:53 +04:00
|
|
|
virtual ~nsITableLayoutStrategy() {}
|
1998-04-30 21:57:09 +04:00
|
|
|
|
2014-07-24 21:03:25 +04:00
|
|
|
/** Implement nsIFrame::GetMinISize for the table */
|
|
|
|
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) = 0;
|
1998-07-17 03:23:31 +04:00
|
|
|
|
2014-07-24 21:03:25 +04:00
|
|
|
/** Implement nsIFrame::GetPrefISize for the table */
|
|
|
|
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
|
2011-09-29 10:19:26 +04:00
|
|
|
bool aComputingSize) = 0;
|
1998-09-01 01:23:28 +04:00
|
|
|
|
2014-07-24 21:03:26 +04:00
|
|
|
/** Implement nsIFrame::MarkIntrinsicISizesDirty for the table */
|
|
|
|
virtual void MarkIntrinsicISizesDirty() = 0;
|
1998-04-30 21:57:09 +04:00
|
|
|
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
/**
|
|
|
|
* Compute final column widths based on the intrinsic width data and
|
|
|
|
* the available width.
|
|
|
|
*/
|
|
|
|
virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) = 0;
|
2008-09-24 21:14:35 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the type of table layout strategy, without the cost of
|
|
|
|
* a virtual function call
|
|
|
|
*/
|
|
|
|
enum Type { Auto, Fixed };
|
|
|
|
Type GetType() const { return mType; }
|
|
|
|
|
|
|
|
protected:
|
2014-09-01 07:36:37 +04:00
|
|
|
explicit nsITableLayoutStrategy(Type aType) : mType(aType) {}
|
2008-09-24 21:14:35 +04:00
|
|
|
private:
|
|
|
|
Type mType;
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
};
|
1998-05-09 01:12:12 +04:00
|
|
|
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
#endif /* !defined(nsITableLayoutStrategy_h_) */
|