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 05:38:33 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
// vim:cindent:ts=4:et:sw=4:
|
2012-05-21 11:12:37 +00: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 17:57:09 +00: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 05:38:33 +00:00
|
|
|
/*
|
|
|
|
* interface for the set of algorithms that determine column and table
|
|
|
|
* widths
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsITableLayoutStrategy_h_
|
|
|
|
#define nsITableLayoutStrategy_h_
|
1998-04-30 17:57:09 +00: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 05:38:33 +00:00
|
|
|
#include "nsCoord.h"
|
1998-04-30 17:57:09 +00:00
|
|
|
|
2011-04-08 01:04:40 +00:00
|
|
|
class nsRenderingContext;
|
1998-10-02 04:10:00 +00:00
|
|
|
struct nsHTMLReflowState;
|
1998-04-30 17:57:09 +00:00
|
|
|
|
|
|
|
class nsITableLayoutStrategy
|
|
|
|
{
|
|
|
|
public:
|
2007-04-23 14:21:53 +00:00
|
|
|
virtual ~nsITableLayoutStrategy() {}
|
1998-04-30 17:57:09 +00: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 05:38:33 +00:00
|
|
|
/** Implement nsIFrame::GetMinWidth for the table */
|
2011-04-08 01:04:40 +00:00
|
|
|
virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) = 0;
|
1998-07-16 23:23:31 +00: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 05:38:33 +00:00
|
|
|
/** Implement nsIFrame::GetPrefWidth for the table */
|
2011-04-08 01:04:40 +00:00
|
|
|
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext,
|
2011-09-29 06:19:26 +00:00
|
|
|
bool aComputingSize) = 0;
|
1998-08-31 21:23:28 +00: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 05:38:33 +00:00
|
|
|
/** Implement nsIFrame::MarkIntrinsicWidthsDirty for the table */
|
|
|
|
virtual void MarkIntrinsicWidthsDirty() = 0;
|
1998-04-30 17:57:09 +00: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 05:38:33 +00: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 17:14:35 +00: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:
|
|
|
|
nsITableLayoutStrategy(Type aType) : mType(aType) {}
|
|
|
|
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 05:38:33 +00:00
|
|
|
};
|
1998-05-08 21:12:12 +00: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 05:38:33 +00:00
|
|
|
#endif /* !defined(nsITableLayoutStrategy_h_) */
|