2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1998-04-14 00:24:54 +04:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/NPL/
|
1998-04-14 00:24:54 +04:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1998-04-14 00:24:54 +04:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:40:37 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1998-04-14 00:24:54 +04:00
|
|
|
#ifndef nsTableRowFrame_h__
|
|
|
|
#define nsTableRowFrame_h__
|
|
|
|
|
|
|
|
#include "nscore.h"
|
1998-10-20 21:45:07 +04:00
|
|
|
#include "nsHTMLContainerFrame.h"
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-05-22 03:43:18 +04:00
|
|
|
class nsTableFrame;
|
1998-06-05 06:36:25 +04:00
|
|
|
class nsTableCellFrame;
|
1999-08-28 04:43:53 +04:00
|
|
|
|
2001-01-25 18:55:51 +03:00
|
|
|
#ifdef DEBUG_TABLE_REFLOW_TIMING
|
|
|
|
class nsReflowTimer;
|
|
|
|
#endif
|
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
#define NS_ROW_NEED_SPECIAL_REFLOW 0x20000000
|
2001-09-19 16:35:19 +04:00
|
|
|
#define NS_ROW_FRAME_PAINT_SKIP_ROW 0x00000001
|
|
|
|
#define NS_ROW_FRAME_PAINT_SKIP_CELLS 0x00000002
|
1999-10-24 03:08:30 +04:00
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
/**
|
1998-04-15 01:45:28 +04:00
|
|
|
* nsTableRowFrame is the frame that maps table rows
|
|
|
|
* (HTML tag TR). This class cannot be reused
|
|
|
|
* outside of an nsTableRowGroupFrame. It assumes that its parent is an nsTableRowGroupFrame,
|
|
|
|
* and its children are nsTableCellFrames.
|
|
|
|
*
|
|
|
|
* @see nsTableFrame
|
|
|
|
* @see nsTableRowGroupFrame
|
|
|
|
* @see nsTableCellFrame
|
1998-04-14 00:24:54 +04:00
|
|
|
*/
|
1998-10-20 21:45:07 +04:00
|
|
|
class nsTableRowFrame : public nsHTMLContainerFrame
|
1998-04-14 00:24:54 +04:00
|
|
|
{
|
|
|
|
public:
|
2001-01-25 18:55:51 +03:00
|
|
|
virtual ~nsTableRowFrame();
|
|
|
|
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD Init(nsIPresContext* aPresContext,
|
1999-02-25 08:31:15 +03:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aContext,
|
|
|
|
nsIFrame* aPrevInFlow);
|
|
|
|
|
2001-10-23 02:21:19 +04:00
|
|
|
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aChildList);
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD AppendFrames(nsIPresContext* aPresContext,
|
1999-08-03 06:41:27 +04:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList);
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD InsertFrames(nsIPresContext* aPresContext,
|
1999-08-03 06:41:27 +04:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD RemoveFrame(nsIPresContext* aPresContext,
|
1999-08-03 06:41:27 +04:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
|
|
|
|
1998-04-15 01:45:28 +04:00
|
|
|
/** instantiate a new instance of nsTableRowFrame.
|
1998-09-15 21:58:24 +04:00
|
|
|
* @param aResult the new object is returned in this out-param
|
|
|
|
* @param aContent the table object to map
|
|
|
|
* @param aParent the parent of the new frame
|
1998-04-15 01:45:28 +04:00
|
|
|
*
|
|
|
|
* @return NS_OK if the frame was properly allocated, otherwise an error code
|
|
|
|
*/
|
1998-09-15 21:58:24 +04:00
|
|
|
friend nsresult
|
1999-12-05 02:49:50 +03:00
|
|
|
NS_NewTableRowFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
|
1998-09-16 21:19:20 +04:00
|
|
|
|
1998-04-15 01:45:28 +04:00
|
|
|
/** @see nsIFrame::Paint */
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD Paint(nsIPresContext* aPresContext,
|
1998-04-17 05:41:24 +04:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
1998-12-18 18:54:23 +03:00
|
|
|
const nsRect& aDirtyRect,
|
2001-09-19 16:35:19 +04:00
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
PRUint32 aFlags = 0);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-04-15 01:45:28 +04:00
|
|
|
|
|
|
|
/** ask all children to paint themselves, without clipping (for cells with rowspan>1)
|
|
|
|
* @see nsIFrame::Paint
|
|
|
|
*/
|
1999-11-24 09:03:41 +03:00
|
|
|
virtual void PaintChildren(nsIPresContext* aPresContext,
|
1998-04-14 00:24:54 +04:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
1998-12-18 18:54:23 +03:00
|
|
|
const nsRect& aDirtyRect,
|
2001-09-19 16:35:19 +04:00
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
PRUint32 aFlags = 0);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2001-03-13 09:38:59 +03:00
|
|
|
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext,
|
|
|
|
const nsPoint& aPoint,
|
2000-03-22 05:43:08 +03:00
|
|
|
nsFramePaintLayer aWhichLayer,
|
2001-03-13 09:38:59 +03:00
|
|
|
nsIFrame** aFrame);
|
2000-03-22 05:43:08 +03:00
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
nsTableCellFrame* GetFirstCell() ;
|
|
|
|
|
1998-05-25 21:31:49 +04:00
|
|
|
/** calls Reflow for all of its child cells.
|
1998-04-15 01:45:28 +04:00
|
|
|
* Cells with rowspan=1 are all set to the same height and stacked horizontally.
|
|
|
|
* <P> Cells are not split unless absolutely necessary.
|
|
|
|
* <P> Cells are resized in nsTableFrame::BalanceColumnWidths
|
|
|
|
* and nsTableFrame::ShrinkWrapChildren
|
|
|
|
*
|
|
|
|
* @param aDesiredSize width set to width of the sum of the cells, height set to
|
|
|
|
* height of cells with rowspan=1.
|
|
|
|
*
|
1998-05-25 21:31:49 +04:00
|
|
|
* @see nsIFrame::Reflow
|
1998-04-15 01:45:28 +04:00
|
|
|
* @see nsTableFrame::BalanceColumnWidths
|
|
|
|
* @see nsTableFrame::ShrinkWrapChildren
|
|
|
|
*/
|
2001-03-13 09:38:59 +03:00
|
|
|
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
1998-10-02 08:10:00 +04:00
|
|
|
const nsHTMLReflowState& aReflowState,
|
2001-03-13 09:38:59 +03:00
|
|
|
nsReflowStatus& aStatus);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2001-03-13 09:38:59 +03:00
|
|
|
virtual void DidResize(nsIPresContext* aPresContext,
|
1998-11-20 04:01:25 +03:00
|
|
|
const nsHTMLReflowState& aReflowState);
|
1998-07-03 00:35:23 +04:00
|
|
|
|
1999-02-24 08:54:31 +03:00
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
|
|
|
* @see nsLayoutAtoms::tableRowFrame
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
|
|
|
|
1999-09-01 05:02:16 +04:00
|
|
|
#ifdef DEBUG
|
1999-11-02 01:12:45 +03:00
|
|
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
2001-03-13 09:38:59 +03:00
|
|
|
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer,
|
|
|
|
PRUint32* aResult) const;
|
1999-09-01 05:02:16 +04:00
|
|
|
#endif
|
2000-05-26 02:40:21 +04:00
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
void UpdateHeight(nscoord aHeight,
|
|
|
|
nscoord aAscent,
|
|
|
|
nscoord aDescent,
|
|
|
|
nsTableFrame* aTableFrame = nsnull,
|
|
|
|
nsTableCellFrame* aCellFrame = nsnull);
|
2000-05-26 02:40:21 +04:00
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
void ResetHeight(nscoord aRowStyleHeight);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
// calculate the height, considering content height of the
|
|
|
|
// cells and the style height of the row and cells, excluding pct heights
|
|
|
|
nscoord CalcHeight(const nsHTMLReflowState& aReflowState);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2000-06-05 12:25:11 +04:00
|
|
|
// Support for cells with 'vertical-align: baseline'.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* returns the max-ascent amongst all the cells that have
|
2000-07-28 13:19:26 +04:00
|
|
|
* 'vertical-align: baseline', *including* cells with rowspans.
|
2000-06-05 12:25:11 +04:00
|
|
|
* returns 0 if we don't have any cell with 'vertical-align: baseline'
|
|
|
|
*/
|
|
|
|
nscoord GetMaxCellAscent() const;
|
|
|
|
|
|
|
|
#if 0 // nobody uses this
|
|
|
|
/**
|
|
|
|
* returns the max-descent amongst all the cells that have
|
2000-07-28 13:19:26 +04:00
|
|
|
* 'vertical-align: baseline', *ignoring* any cell with rowspans.
|
2000-06-05 12:25:11 +04:00
|
|
|
* returns 0 if we don't have any cell with 'vertical-align: baseline'
|
|
|
|
*/
|
|
|
|
nscoord GetMaxCellDescent() const;
|
|
|
|
#endif
|
|
|
|
|
1998-06-17 20:38:24 +04:00
|
|
|
/** returns the ordinal position of this row in its table */
|
|
|
|
virtual PRInt32 GetRowIndex() const;
|
|
|
|
|
|
|
|
/** set this row's starting row index */
|
1998-12-16 07:31:38 +03:00
|
|
|
void SetRowIndex (int aRowIndex);
|
1998-06-17 20:38:24 +04:00
|
|
|
|
2000-01-22 04:16:50 +03:00
|
|
|
virtual PRBool Contains(nsIPresContext* aPresContext, const nsPoint& aPoint);
|
1998-11-07 03:36:37 +03:00
|
|
|
|
2001-04-16 18:51:52 +04:00
|
|
|
/** used by row group frame code */
|
|
|
|
nscoord ReflowCellFrame(nsIPresContext* aPresContext,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsTableCellFrame* aCellFrame,
|
|
|
|
nscoord aAvailableHeight,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
2001-03-13 09:38:59 +03:00
|
|
|
void InsertCellFrame(nsTableCellFrame* aFrame,
|
|
|
|
nsTableCellFrame* aPrevSibling);
|
1999-02-22 06:28:00 +03:00
|
|
|
|
2001-04-16 18:51:52 +04:00
|
|
|
void InsertCellFrame(nsTableCellFrame* aFrame,
|
|
|
|
PRInt32 aColIndex);
|
|
|
|
|
|
|
|
void RemoveCellFrame(nsTableCellFrame* aFrame);
|
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
nsresult CalculateCellActualSize(nsIFrame* aRowFrame,
|
|
|
|
nscoord& aDesiredWidth,
|
|
|
|
nscoord& aDesiredHeight,
|
|
|
|
nscoord aAvailWidth);
|
2000-02-03 17:04:49 +03:00
|
|
|
|
2001-08-06 18:48:09 +04:00
|
|
|
PRBool IsFirstInserted() const;
|
|
|
|
void SetFirstInserted(PRBool aValue);
|
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
PRBool NeedSpecialReflow() const;
|
|
|
|
void SetNeedSpecialReflow(PRBool aValue);
|
|
|
|
|
|
|
|
PRBool GetContentHeight() const;
|
|
|
|
void SetContentHeight(nscoord aTwipValue);
|
|
|
|
|
|
|
|
PRBool HasStyleHeight() const;
|
|
|
|
|
|
|
|
PRBool HasFixedHeight() const;
|
|
|
|
void SetHasFixedHeight(PRBool aValue);
|
|
|
|
|
|
|
|
PRBool HasPctHeight() const;
|
|
|
|
void SetHasPctHeight(PRBool aValue);
|
|
|
|
|
|
|
|
nscoord GetFixedHeight() const;
|
|
|
|
void SetFixedHeight(nscoord aValue);
|
|
|
|
|
|
|
|
float GetPctHeight() const;
|
|
|
|
void SetPctHeight(float aPctValue);
|
|
|
|
|
|
|
|
nscoord GetHeight(nscoord aBasis = 0) const;
|
|
|
|
|
|
|
|
nsTableRowFrame* GetNextRow() const;
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
protected:
|
|
|
|
|
1998-04-15 01:45:28 +04:00
|
|
|
/** protected constructor.
|
|
|
|
* @see NewFrame
|
|
|
|
*/
|
1998-12-03 09:31:43 +03:00
|
|
|
nsTableRowFrame();
|
1998-04-23 21:29:07 +04:00
|
|
|
|
1998-10-20 21:45:07 +04:00
|
|
|
/** implement abstract method on nsHTMLContainerFrame */
|
|
|
|
virtual PRIntn GetSkipSides() const;
|
|
|
|
|
1998-10-14 20:32:45 +04:00
|
|
|
/** Incremental Reflow attempts to do column balancing with the minimum number of reflow
|
|
|
|
* commands to child elements. This is done by processing the reflow command,
|
|
|
|
* rebalancing column widths (if necessary), then comparing the resulting column widths
|
|
|
|
* to the prior column widths and reflowing only those cells that require a reflow.
|
|
|
|
*
|
|
|
|
* @see Reflow
|
|
|
|
*/
|
2001-03-13 09:38:59 +03:00
|
|
|
NS_IMETHOD IncrementalReflow(nsIPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsTableFrame& aTableFrame,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
|
|
|
NS_IMETHOD IR_TargetIsChild(nsIPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsTableFrame& aTableFrame,
|
|
|
|
nsReflowStatus& aStatus,
|
|
|
|
nsIFrame* aNextFrame);
|
|
|
|
|
|
|
|
NS_IMETHOD IR_TargetIsMe(nsIPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsTableFrame& aTableFrame,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
|
|
|
NS_IMETHOD IR_StyleChanged(nsIPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsTableFrame& aTableFrame,
|
|
|
|
nsReflowStatus& aStatus);
|
1999-08-03 06:41:27 +04:00
|
|
|
|
1998-06-24 23:13:19 +04:00
|
|
|
// row-specific methods
|
|
|
|
|
2001-03-13 09:38:59 +03:00
|
|
|
nscoord ComputeCellXOffset(const nsHTMLReflowState& aState,
|
|
|
|
nsIFrame* aKidFrame,
|
|
|
|
const nsMargin& aKidMargin) const;
|
1998-04-23 21:29:07 +04:00
|
|
|
/**
|
2001-03-13 09:38:59 +03:00
|
|
|
* Called for incremental/dirty and resize reflows. If aDirtyOnly is true then
|
|
|
|
* only reflow dirty cells.
|
1998-04-23 21:29:07 +04:00
|
|
|
*/
|
2001-03-13 09:38:59 +03:00
|
|
|
NS_IMETHOD ReflowChildren(nsIPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsTableFrame& aTableFrame,
|
|
|
|
nsReflowStatus& aStatus,
|
|
|
|
PRBool aDirtyOnly = PR_FALSE);
|
1999-08-22 00:16:32 +04:00
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
private:
|
1999-10-24 03:08:30 +04:00
|
|
|
struct RowBits {
|
2001-11-05 03:15:51 +03:00
|
|
|
unsigned mRowIndex:29;
|
|
|
|
unsigned mHasFixedHeight:1; // set if the dominating style height on the row or any cell is pixel based
|
|
|
|
unsigned mHasPctHeight:1; // set if the dominating style height on the row or any cell is pct based
|
|
|
|
unsigned mFirstInserted:1; // if true, then it was the top most newly inserted row
|
|
|
|
} mBits;
|
1999-10-24 03:08:30 +04:00
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
nscoord mContentHeight; // the desired height based on the content of the tallest cell in the row
|
|
|
|
nscoord mStyleHeight; // the height based on a style pct on either the row or any cell if mHasPctHeight
|
|
|
|
// is set, otherwise the height based on a style pixel height on the row or any
|
|
|
|
// cell if mHasFixedHeight is set
|
2000-06-05 12:25:11 +04:00
|
|
|
|
|
|
|
// max-ascent and max-descent amongst all cells that have 'vertical-align: baseline'
|
|
|
|
nscoord mMaxCellAscent; // does include cells with rowspan > 1
|
|
|
|
nscoord mMaxCellDescent; // does *not* include cells with rowspan > 1
|
2001-01-25 18:55:51 +03:00
|
|
|
|
|
|
|
#ifdef DEBUG_TABLE_REFLOW_TIMING
|
|
|
|
public:
|
|
|
|
nsReflowTimer* mTimer;
|
|
|
|
#endif
|
1998-04-14 00:24:54 +04:00
|
|
|
};
|
|
|
|
|
1998-06-17 20:38:24 +04:00
|
|
|
inline PRInt32 nsTableRowFrame::GetRowIndex() const
|
|
|
|
{
|
1999-10-24 03:08:30 +04:00
|
|
|
return PRInt32(mBits.mRowIndex);
|
1998-06-17 20:38:24 +04:00
|
|
|
}
|
|
|
|
|
1998-12-16 07:31:38 +03:00
|
|
|
inline void nsTableRowFrame::SetRowIndex (int aRowIndex)
|
|
|
|
{
|
1999-10-31 06:15:52 +03:00
|
|
|
mBits.mRowIndex = aRowIndex;
|
1998-12-16 07:31:38 +03:00
|
|
|
}
|
|
|
|
|
2001-08-06 18:48:09 +04:00
|
|
|
inline PRBool nsTableRowFrame::IsFirstInserted() const
|
|
|
|
{
|
|
|
|
return PRBool(mBits.mFirstInserted);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void nsTableRowFrame::SetFirstInserted(PRBool aValue)
|
|
|
|
{
|
|
|
|
mBits.mFirstInserted = aValue;
|
|
|
|
}
|
|
|
|
|
2001-11-05 03:15:51 +03:00
|
|
|
inline PRBool nsTableRowFrame::HasStyleHeight() const
|
|
|
|
{
|
|
|
|
return (PRBool)mBits.mHasFixedHeight || (PRBool)mBits.mHasPctHeight;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline PRBool nsTableRowFrame::HasFixedHeight() const
|
|
|
|
{
|
|
|
|
return (PRBool)mBits.mHasFixedHeight;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void nsTableRowFrame::SetHasFixedHeight(PRBool aValue)
|
|
|
|
{
|
|
|
|
mBits.mHasFixedHeight = aValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline PRBool nsTableRowFrame::HasPctHeight() const
|
|
|
|
{
|
|
|
|
return (PRBool)mBits.mHasPctHeight;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void nsTableRowFrame::SetHasPctHeight(PRBool aValue)
|
|
|
|
{
|
|
|
|
mBits.mHasPctHeight = aValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline nscoord nsTableRowFrame::GetContentHeight() const
|
|
|
|
{
|
|
|
|
return mContentHeight;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void nsTableRowFrame::SetContentHeight(nscoord aValue)
|
|
|
|
{
|
|
|
|
mContentHeight = aValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline nscoord nsTableRowFrame::GetFixedHeight() const
|
|
|
|
{
|
|
|
|
if (mBits.mHasFixedHeight && !mBits.mHasPctHeight)
|
|
|
|
return mStyleHeight;
|
|
|
|
else
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float nsTableRowFrame::GetPctHeight() const
|
|
|
|
{
|
|
|
|
if (mBits.mHasPctHeight)
|
|
|
|
return (float)mStyleHeight / 100.0f;
|
|
|
|
else
|
|
|
|
return 0.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline PRBool nsTableRowFrame::NeedSpecialReflow() const
|
|
|
|
{
|
|
|
|
return (mState & NS_ROW_NEED_SPECIAL_REFLOW) == NS_ROW_NEED_SPECIAL_REFLOW;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void nsTableRowFrame::SetNeedSpecialReflow(PRBool aValue)
|
|
|
|
{
|
|
|
|
if (aValue) {
|
|
|
|
mState |= NS_ROW_NEED_SPECIAL_REFLOW;
|
|
|
|
} else {
|
|
|
|
mState &= ~NS_ROW_NEED_SPECIAL_REFLOW;
|
|
|
|
}
|
|
|
|
}
|
1998-04-14 00:24:54 +04:00
|
|
|
#endif
|