2018-11-30 22:52:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
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
|
|
|
// 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
|
2015-04-19 02:01:24 +03:00
|
|
|
* isizes
|
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
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|
|
|
|
2017-06-09 22:14:53 +03:00
|
|
|
class gfxContext;
|
2016-07-21 13:36:34 +03:00
|
|
|
namespace mozilla {
|
2016-07-21 13:36:35 +03:00
|
|
|
struct ReflowInput;
|
2016-07-21 13:36:34 +03:00
|
|
|
} // namespace mozilla
|
2018-11-30 13:46:48 +03:00
|
|
|
|
1998-04-30 21:57:09 +04:00
|
|
|
class nsITableLayoutStrategy {
|
|
|
|
public:
|
2016-07-21 13:36:35 +03:00
|
|
|
using ReflowInput = mozilla::ReflowInput;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2007-04-23 18:21:53 +04:00
|
|
|
virtual ~nsITableLayoutStrategy() {}
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2014-07-24 21:03:25 +04:00
|
|
|
/** Implement nsIFrame::GetMinISize for the table */
|
2017-06-09 22:14:53 +03:00
|
|
|
virtual nscoord GetMinISize(gfxContext* aRenderingContext) = 0;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2014-07-24 21:03:25 +04:00
|
|
|
/** Implement nsIFrame::GetPrefISize for the table */
|
2017-06-09 22:14:53 +03:00
|
|
|
virtual nscoord GetPrefISize(gfxContext* aRenderingContext,
|
2011-09-29 10:19:26 +04:00
|
|
|
bool aComputingSize) = 0;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2014-07-24 21:03:26 +04:00
|
|
|
/** Implement nsIFrame::MarkIntrinsicISizesDirty for the table */
|
|
|
|
virtual void MarkIntrinsicISizesDirty() = 0;
|
2018-11-30 13:46:48 +03: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
|
|
|
/**
|
2015-04-19 02:01:24 +03:00
|
|
|
* Compute final column isizes based on the intrinsic isize data and
|
|
|
|
* the available isize.
|
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
|
|
|
*/
|
2016-07-21 13:36:39 +03:00
|
|
|
virtual void ComputeColumnISizes(const ReflowInput& aReflowInput) = 0;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
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; }
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2008-09-24 21:14:35 +04:00
|
|
|
protected:
|
2014-09-01 07:36:37 +04:00
|
|
|
explicit nsITableLayoutStrategy(Type aType) : mType(aType) {}
|
2018-11-30 13:46:48 +03:00
|
|
|
|
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_) */
|