2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
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-13 20:24:54 +00:00
|
|
|
#ifndef nsTableCellFrame_h__
|
|
|
|
#define nsTableCellFrame_h__
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2012-08-08 13:05:17 +00:00
|
|
|
#include "celldata.h"
|
1999-02-11 01:16:28 +00:00
|
|
|
#include "nsITableCellLayout.h"
|
1998-04-13 20:24:54 +00:00
|
|
|
#include "nscore.h"
|
2011-12-27 20:18:48 +00:00
|
|
|
#include "nsContainerFrame.h"
|
2003-02-22 00:32:13 +00:00
|
|
|
#include "nsStyleContext.h"
|
2001-12-07 14:51:12 +00:00
|
|
|
#include "nsIPercentHeightObserver.h"
|
2007-01-30 00:06:41 +00:00
|
|
|
#include "nsGkAtoms.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 "nsLayoutUtils.h"
|
2009-02-05 09:09:50 +00:00
|
|
|
#include "nsTArray.h"
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-11-11 19:56:02 +00:00
|
|
|
class nsTableFrame;
|
1998-06-23 23:23:21 +00:00
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* nsTableCellFrame
|
|
|
|
* data structure to maintain information about a single table cell's frame
|
|
|
|
*
|
1999-02-11 01:16:28 +00:00
|
|
|
* NOTE: frames are not ref counted. We expose addref and release here
|
|
|
|
* so we can change that decsion in the future. Users of nsITableCellLayout
|
|
|
|
* should refcount correctly as if this object is being ref counted, though
|
|
|
|
* no actual support is under the hood.
|
|
|
|
*
|
1998-04-13 20:24:54 +00:00
|
|
|
* @author sclark
|
|
|
|
*/
|
2011-12-27 20:18:48 +00:00
|
|
|
class nsTableCellFrame : public nsContainerFrame,
|
2010-04-27 16:15:01 +00:00
|
|
|
public nsITableCellLayout,
|
2001-12-07 14:51:12 +00:00
|
|
|
public nsIPercentHeightObserver
|
1998-04-13 20:24:54 +00:00
|
|
|
{
|
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsTableCellFrame)
|
2009-01-12 19:20:59 +00:00
|
|
|
NS_DECL_QUERYFRAME
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
1999-02-11 01:16:28 +00:00
|
|
|
|
1999-10-08 18:52:19 +00:00
|
|
|
// default constructor supplied by the compiler
|
1998-12-03 20:19:01 +00:00
|
|
|
|
2014-09-01 03:36:37 +00:00
|
|
|
explicit nsTableCellFrame(nsStyleContext* aContext);
|
1999-10-17 03:30:11 +00:00
|
|
|
~nsTableCellFrame();
|
|
|
|
|
2014-05-24 22:20:40 +00:00
|
|
|
virtual void Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
1999-02-25 05:31:15 +00:00
|
|
|
|
2014-03-10 22:41:17 +00:00
|
|
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
|
|
|
|
2001-08-17 03:13:07 +00:00
|
|
|
#ifdef ACCESSIBILITY
|
2012-09-28 21:53:44 +00:00
|
|
|
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
2001-08-17 03:13:07 +00:00
|
|
|
#endif
|
2001-05-17 23:52:32 +00:00
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
2014-02-18 08:36:33 +00:00
|
|
|
nsIAtom* aAttribute,
|
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
2000-01-04 05:31:56 +00:00
|
|
|
|
2008-10-26 10:11:34 +00:00
|
|
|
/** @see nsIFrame::DidSetStyleContext */
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
|
2010-04-27 16:15:01 +00:00
|
|
|
|
2014-05-28 19:36:59 +00:00
|
|
|
#ifdef DEBUG
|
|
|
|
// Our anonymous block frame is the content insertion frame so these
|
|
|
|
// methods should never be called:
|
2014-05-28 19:36:58 +00:00
|
|
|
virtual void AppendFrames(ChildListID aListID,
|
2014-05-28 19:36:58 +00:00
|
|
|
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
2014-05-28 19:36:58 +00:00
|
|
|
virtual void InsertFrames(ChildListID aListID,
|
2014-05-28 19:36:58 +00:00
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
2014-05-28 19:36:58 +00:00
|
|
|
virtual void RemoveFrame(ChildListID aListID,
|
2014-05-28 19:36:58 +00:00
|
|
|
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
2014-05-28 19:36:59 +00:00
|
|
|
#endif
|
1999-08-01 22:21:03 +00:00
|
|
|
|
2014-05-24 22:20:39 +00:00
|
|
|
virtual nsContainerFrame* GetContentInsertionFrame() MOZ_OVERRIDE {
|
2011-08-24 20:54:30 +00:00
|
|
|
return GetFirstPrincipalChild()->GetContentInsertionFrame();
|
2004-07-18 12:02:53 +00:00
|
|
|
}
|
|
|
|
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual nsMargin GetUsedMargin() const MOZ_OVERRIDE;
|
2006-12-13 23:04:57 +00:00
|
|
|
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual void NotifyPercentHeight(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;
|
2001-12-07 14:51:12 +00:00
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual bool NeedsToObserve(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;
|
1998-12-21 06:38:18 +00:00
|
|
|
|
2005-11-04 02:38:33 +00:00
|
|
|
/** instantiate a new instance of nsTableRowFrame.
|
|
|
|
* @param aPresShell the pres shell for this frame
|
1998-09-15 17:58:24 +00:00
|
|
|
*
|
2005-11-04 02:38:33 +00:00
|
|
|
* @return the frame that was created
|
1998-09-15 17:58:24 +00:00
|
|
|
*/
|
2006-03-26 21:30:36 +00:00
|
|
|
friend nsIFrame* NS_NewTableCellFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
2010-04-27 16:15:01 +00:00
|
|
|
|
2011-04-08 01:04:40 +00:00
|
|
|
void PaintCellBackground(nsRenderingContext& aRenderingContext,
|
2009-09-12 22:44:18 +00:00
|
|
|
const nsRect& aDirtyRect, nsPoint aPt,
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t aFlags);
|
2000-03-22 02:43:08 +00:00
|
|
|
|
2013-12-13 17:42:43 +00:00
|
|
|
|
|
|
|
virtual nsresult ProcessBorders(nsTableFrame* aFrame,
|
|
|
|
nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsDisplayListSet& aLists);
|
|
|
|
|
2014-07-24 17:03:25 +00:00
|
|
|
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
|
|
|
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
2014-07-24 17:03:26 +00:00
|
|
|
virtual IntrinsicISizeOffsetData
|
|
|
|
IntrinsicISizeOffsets(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
|
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
|
|
|
|
2014-05-13 00:47:52 +00:00
|
|
|
virtual void Reflow(nsPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-02-24 05:54:31 +00:00
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
|
|
|
* @see nsLayoutAtoms::tableCellFrame
|
|
|
|
*/
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
1999-02-24 05:54:31 +00:00
|
|
|
|
2014-01-05 23:31:14 +00:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
1999-09-01 01:02:16 +00:00
|
|
|
#endif
|
1999-08-31 03:09:40 +00:00
|
|
|
|
2007-01-27 22:22:24 +00:00
|
|
|
void VerticallyAlignChild(nscoord aMaxAscent);
|
2000-06-05 08:25:11 +00:00
|
|
|
|
2010-08-31 16:05:12 +00:00
|
|
|
/*
|
|
|
|
* Get the value of vertical-align adjusted for CSS 2's rules for a
|
|
|
|
* table cell, which means the result is always
|
|
|
|
* NS_STYLE_VERTICAL_ALIGN_{TOP,MIDDLE,BOTTOM,BASELINE}.
|
|
|
|
*/
|
2013-12-13 17:42:43 +00:00
|
|
|
virtual uint8_t GetVerticalAlign() const;
|
2010-08-31 16:05:12 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool HasVerticalAlignBaseline() const {
|
2010-08-31 16:05:12 +00:00
|
|
|
return GetVerticalAlign() == NS_STYLE_VERTICAL_ALIGN_BASELINE;
|
|
|
|
}
|
2010-04-27 16:15:01 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool CellHasVisibleContent(nscoord height,
|
2008-09-13 14:38:29 +00:00
|
|
|
nsTableFrame* tableFrame,
|
|
|
|
nsIFrame* kidFrame);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2007-01-23 04:06:56 +00:00
|
|
|
/**
|
|
|
|
* Get the first-line baseline of the cell relative to its top border
|
|
|
|
* edge, as if the cell were vertically aligned to the top of the row.
|
|
|
|
*/
|
|
|
|
nscoord GetCellBaseline() const;
|
|
|
|
|
1999-02-21 19:55:22 +00:00
|
|
|
/**
|
|
|
|
* return the cell's specified row span. this is what was specified in the
|
|
|
|
* content model or in the style info, and is always >= 1.
|
|
|
|
* to get the effective row span (the actual value that applies), use GetEffectiveRowSpan()
|
|
|
|
* @see nsTableFrame::GetEffectiveRowSpan()
|
|
|
|
*/
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual int32_t GetRowSpan();
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-07-11 00:00:31 +00:00
|
|
|
// there is no set row index because row index depends on the cell's parent row only
|
|
|
|
|
1999-08-01 16:20:14 +00:00
|
|
|
/*---------------- nsITableCellLayout methods ------------------------*/
|
|
|
|
|
1999-02-21 19:55:22 +00:00
|
|
|
/**
|
|
|
|
* return the cell's starting row index (starting at 0 for the first row).
|
|
|
|
* for continued cell frames the row index is that of the cell's first-in-flow
|
1999-08-04 02:04:45 +00:00
|
|
|
* and the column index (starting at 0 for the first column
|
1999-02-21 19:55:22 +00:00
|
|
|
*/
|
2013-05-14 16:33:23 +00:00
|
|
|
NS_IMETHOD GetCellIndexes(int32_t &aRowIndex, int32_t &aColIndex) MOZ_OVERRIDE;
|
1999-08-04 02:04:45 +00:00
|
|
|
|
|
|
|
/** return the mapped cell's row index (starting at 0 for the first row) */
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual nsresult GetRowIndex(int32_t &aRowIndex) const MOZ_OVERRIDE;
|
1998-07-11 00:00:31 +00:00
|
|
|
|
1999-02-21 19:55:22 +00:00
|
|
|
/**
|
|
|
|
* return the cell's specified col span. this is what was specified in the
|
|
|
|
* content model or in the style info, and is always >= 1.
|
|
|
|
* to get the effective col span (the actual value that applies), use GetEffectiveColSpan()
|
|
|
|
* @see nsTableFrame::GetEffectiveColSpan()
|
|
|
|
*/
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual int32_t GetColSpan();
|
2010-04-27 16:15:01 +00:00
|
|
|
|
1999-02-21 19:55:22 +00:00
|
|
|
/** return the cell's column index (starting at 0 for the first column) */
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual nsresult GetColIndex(int32_t &aColIndex) const MOZ_OVERRIDE;
|
2012-08-22 15:56:38 +00:00
|
|
|
void SetColIndex(int32_t aColIndex);
|
1998-04-23 17:29:07 +00:00
|
|
|
|
1998-07-11 00:00:31 +00:00
|
|
|
/** return the available width given to this frame during its last reflow */
|
2007-01-23 04:06:56 +00:00
|
|
|
inline nscoord GetPriorAvailWidth();
|
2010-04-27 16:15:01 +00:00
|
|
|
|
1998-07-11 00:00:31 +00:00
|
|
|
/** set the available width given to this frame during its last reflow */
|
2007-01-23 04:06:56 +00:00
|
|
|
inline void SetPriorAvailWidth(nscoord aPriorAvailWidth);
|
1998-07-02 17:40:56 +00:00
|
|
|
|
1998-07-11 00:00:31 +00:00
|
|
|
/** return the desired size returned by this frame during its last reflow */
|
2014-07-24 08:30:07 +00:00
|
|
|
inline mozilla::LogicalSize GetDesiredSize();
|
1998-07-11 00:00:31 +00:00
|
|
|
|
|
|
|
/** set the desired size returned by this frame during its last reflow */
|
2007-01-23 04:06:56 +00:00
|
|
|
inline void SetDesiredSize(const nsHTMLReflowMetrics & aDesiredSize);
|
1998-07-11 00:00:31 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool GetContentEmpty();
|
|
|
|
void SetContentEmpty(bool aContentEmpty);
|
1998-12-10 19:57:42 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool HasPctOverHeight();
|
|
|
|
void SetHasPctOverHeight(bool aValue);
|
2001-11-28 00:50:08 +00:00
|
|
|
|
2001-11-05 00:15:51 +00:00
|
|
|
nsTableCellFrame* GetNextCell() const;
|
|
|
|
|
2007-02-07 07:46:44 +00:00
|
|
|
virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const;
|
2002-02-19 15:48:28 +00:00
|
|
|
|
2011-04-08 01:04:40 +00:00
|
|
|
virtual void PaintBackground(nsRenderingContext& aRenderingContext,
|
2006-01-26 02:29:17 +00:00
|
|
|
const nsRect& aDirtyRect,
|
2009-09-12 22:44:18 +00:00
|
|
|
nsPoint aPt,
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t aFlags);
|
2006-01-26 02:29:17 +00:00
|
|
|
|
2011-04-08 01:04:40 +00:00
|
|
|
void DecorateForSelection(nsRenderingContext& aRenderingContext,
|
2006-01-26 02:29:17 +00:00
|
|
|
nsPoint aPt);
|
2010-04-27 16:15:01 +00:00
|
|
|
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual bool UpdateOverflow() MOZ_OVERRIDE;
|
2013-03-08 02:18:45 +00:00
|
|
|
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
|
2013-03-08 02:18:45 +00:00
|
|
|
{
|
|
|
|
return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
|
|
|
|
}
|
2012-08-29 05:39:31 +00:00
|
|
|
|
2012-08-29 05:48:45 +00:00
|
|
|
virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
|
|
|
|
virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
|
|
|
|
virtual void InvalidateFrameForRemoval() MOZ_OVERRIDE { InvalidateFrameSubtree(); }
|
2011-06-15 21:03:49 +00:00
|
|
|
|
1998-10-20 17:45:07 +00:00
|
|
|
protected:
|
2014-06-28 10:13:13 +00:00
|
|
|
virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState= nullptr) const MOZ_OVERRIDE;
|
1998-10-20 17:45:07 +00:00
|
|
|
|
2005-03-18 02:15:44 +00:00
|
|
|
/**
|
2010-10-07 04:25:46 +00:00
|
|
|
* GetBorderOverflow says how far the cell's own borders extend
|
|
|
|
* outside its own bounds. In the separated borders model this should
|
|
|
|
* just be zero (as it is for most frames), but in the collapsed
|
2005-03-18 02:15:44 +00:00
|
|
|
* borders model (for which nsBCTableCellFrame overrides this virtual
|
2010-10-07 04:25:46 +00:00
|
|
|
* method), it considers the extents of the collapsed border.
|
2005-03-18 02:15:44 +00:00
|
|
|
*/
|
2010-10-07 04:25:46 +00:00
|
|
|
virtual nsMargin GetBorderOverflow();
|
2005-03-18 02:15:44 +00:00
|
|
|
|
2000-11-15 16:01:26 +00:00
|
|
|
friend class nsTableRowFrame;
|
1999-01-03 19:22:40 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t mColIndex; // the starting column for this cell
|
1998-07-02 17:40:56 +00:00
|
|
|
|
2001-11-30 15:05:51 +00:00
|
|
|
nscoord mPriorAvailWidth; // the avail width during the last reflow
|
2014-07-24 08:30:07 +00:00
|
|
|
mozilla::LogicalSize mDesiredSize; // the last desired inline and block size
|
1998-12-21 06:38:18 +00:00
|
|
|
};
|
1998-06-11 00:13:18 +00:00
|
|
|
|
1998-07-02 17:40:56 +00:00
|
|
|
inline nscoord nsTableCellFrame::GetPriorAvailWidth()
|
|
|
|
{ return mPriorAvailWidth;}
|
|
|
|
|
|
|
|
inline void nsTableCellFrame::SetPriorAvailWidth(nscoord aPriorAvailWidth)
|
|
|
|
{ mPriorAvailWidth = aPriorAvailWidth;}
|
|
|
|
|
2014-07-24 08:30:07 +00:00
|
|
|
inline mozilla::LogicalSize nsTableCellFrame::GetDesiredSize()
|
1998-07-11 00:00:31 +00:00
|
|
|
{ return mDesiredSize; }
|
|
|
|
|
1998-10-01 04:46:11 +00:00
|
|
|
inline void nsTableCellFrame::SetDesiredSize(const nsHTMLReflowMetrics & aDesiredSize)
|
2010-04-27 16:15:01 +00:00
|
|
|
{
|
2014-07-24 08:30:07 +00:00
|
|
|
mozilla::WritingMode wm = aDesiredSize.GetWritingMode();
|
|
|
|
mDesiredSize = aDesiredSize.Size(wm).ConvertTo(GetWritingMode(), wm);
|
1998-07-11 00:00:31 +00:00
|
|
|
}
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
inline bool nsTableCellFrame::GetContentEmpty()
|
1999-10-08 18:52:19 +00:00
|
|
|
{
|
2001-11-05 00:15:51 +00:00
|
|
|
return (mState & NS_TABLE_CELL_CONTENT_EMPTY) ==
|
|
|
|
NS_TABLE_CELL_CONTENT_EMPTY;
|
1999-10-08 18:52:19 +00:00
|
|
|
}
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
inline void nsTableCellFrame::SetContentEmpty(bool aContentEmpty)
|
1999-10-08 18:52:19 +00:00
|
|
|
{
|
1999-10-15 03:14:59 +00:00
|
|
|
if (aContentEmpty) {
|
2001-11-05 00:15:51 +00:00
|
|
|
mState |= NS_TABLE_CELL_CONTENT_EMPTY;
|
1999-10-15 03:14:59 +00:00
|
|
|
} else {
|
2001-11-05 00:15:51 +00:00
|
|
|
mState &= ~NS_TABLE_CELL_CONTENT_EMPTY;
|
1999-10-15 03:14:59 +00:00
|
|
|
}
|
1999-10-08 18:52:19 +00:00
|
|
|
}
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
inline bool nsTableCellFrame::HasPctOverHeight()
|
2001-11-28 00:50:08 +00:00
|
|
|
{
|
2001-12-07 14:51:12 +00:00
|
|
|
return (mState & NS_TABLE_CELL_HAS_PCT_OVER_HEIGHT) ==
|
|
|
|
NS_TABLE_CELL_HAS_PCT_OVER_HEIGHT;
|
2001-11-28 00:50:08 +00:00
|
|
|
}
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
inline void nsTableCellFrame::SetHasPctOverHeight(bool aValue)
|
2001-11-28 00:50:08 +00:00
|
|
|
{
|
|
|
|
if (aValue) {
|
2001-12-07 14:51:12 +00:00
|
|
|
mState |= NS_TABLE_CELL_HAS_PCT_OVER_HEIGHT;
|
2001-11-28 00:50:08 +00:00
|
|
|
} else {
|
2001-12-07 14:51:12 +00:00
|
|
|
mState &= ~NS_TABLE_CELL_HAS_PCT_OVER_HEIGHT;
|
2001-11-28 00:50:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-02-19 15:48:28 +00:00
|
|
|
// nsBCTableCellFrame
|
2014-08-05 17:33:55 +00:00
|
|
|
class nsBCTableCellFrame MOZ_FINAL : public nsTableCellFrame
|
2002-02-19 15:48:28 +00:00
|
|
|
{
|
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
2002-02-19 15:48:28 +00:00
|
|
|
|
2014-09-01 03:36:37 +00:00
|
|
|
explicit nsBCTableCellFrame(nsStyleContext* aContext);
|
2002-02-19 15:48:28 +00:00
|
|
|
|
|
|
|
~nsBCTableCellFrame();
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
2002-02-19 15:48:28 +00:00
|
|
|
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE;
|
2014-05-05 17:55:54 +00:00
|
|
|
virtual bool GetBorderRadii(const nsSize& aFrameSize,
|
|
|
|
const nsSize& aBorderArea,
|
2014-06-28 10:13:13 +00:00
|
|
|
Sides aSkipSides,
|
2014-05-05 17:55:54 +00:00
|
|
|
nscoord aRadii[8]) const MOZ_OVERRIDE;
|
2006-12-13 23:04:57 +00:00
|
|
|
|
2005-04-07 18:04:38 +00:00
|
|
|
// Get the *inner half of the border only*, in twips.
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const MOZ_OVERRIDE;
|
2002-02-19 15:48:28 +00:00
|
|
|
|
2005-04-07 18:04:38 +00:00
|
|
|
// Get the *inner half of the border only*, in pixels.
|
2010-04-27 16:15:02 +00:00
|
|
|
BCPixelSize GetBorderWidth(mozilla::css::Side aSide) const;
|
2005-04-07 18:04:38 +00:00
|
|
|
|
|
|
|
// Set the full (both halves) width of the border
|
2010-04-27 16:15:02 +00:00
|
|
|
void SetBorderWidth(mozilla::css::Side aSide, BCPixelSize aPixelValue);
|
2002-02-19 15:48:28 +00:00
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual nsMargin GetBorderOverflow() MOZ_OVERRIDE;
|
2005-03-18 02:15:44 +00:00
|
|
|
|
2014-01-05 23:31:14 +00:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
2002-02-19 15:48:28 +00:00
|
|
|
#endif
|
|
|
|
|
2011-04-08 01:04:40 +00:00
|
|
|
virtual void PaintBackground(nsRenderingContext& aRenderingContext,
|
2006-01-26 02:29:17 +00:00
|
|
|
const nsRect& aDirtyRect,
|
2009-09-12 22:44:18 +00:00
|
|
|
nsPoint aPt,
|
2012-09-14 16:10:08 +00:00
|
|
|
uint32_t aFlags) MOZ_OVERRIDE;
|
2002-03-07 15:23:08 +00:00
|
|
|
|
2002-02-19 15:48:28 +00:00
|
|
|
private:
|
2010-04-27 16:15:01 +00:00
|
|
|
|
2005-04-07 18:04:38 +00:00
|
|
|
// These are the entire width of the border (the cell edge contains only
|
|
|
|
// the inner half, per the macros in nsTablePainter.h).
|
|
|
|
BCPixelSize mTopBorder;
|
|
|
|
BCPixelSize mRightBorder;
|
|
|
|
BCPixelSize mBottomBorder;
|
|
|
|
BCPixelSize mLeftBorder;
|
2002-02-19 15:48:28 +00:00
|
|
|
};
|
|
|
|
|
1998-10-14 22:23:26 +00:00
|
|
|
#endif
|