expanded nsIFrame::List to include nsIListFilter *aFilter param, by default nsnull.

aFilter is useful for determining if a frame should output itself during
a List().  In any event, the children of the frame are always processed.
added nsIListFilter, an interface for any object that wants to act like a filter for frame dumps
added   static NS_LAYOUT nsIListFilter * GetFilter(nsString *aFilterName);
currently, only TableListFilter implements nsIListFilter.
in response to List(...TableListFilter), the frame model is dumped in a way that is useful
for table layout regression testing.  Currently this is controlled by command line switches on the viewer app.
This commit is contained in:
buster%netscape.com 1998-09-02 21:59:54 +00:00
Родитель d851355460
Коммит a8906329f4
39 изменённых файлов: 1266 добавлений и 235 удалений

Просмотреть файл

@ -36,6 +36,9 @@ class nsIStyleContext;
class nsIView;
class nsIWidget;
class nsIReflowCommand;
class nsIListFilter;
class nsAutoString;
class nsString;
struct nsPoint;
struct nsRect;
@ -620,9 +623,10 @@ public:
NS_IMETHOD IsTransparent(PRBool& aTransparent) const = 0;
// Debugging
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const= 0;
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const= 0;
NS_IMETHOD ListTag(FILE* out = stdout) const = 0;
NS_IMETHOD VerifyTree() const = 0;
static NS_LAYOUT nsIListFilter * GetFilter(nsString *aFilterName);
/**
* See if tree verification is enabled. To enable tree verification add
@ -735,4 +739,11 @@ inline nsReflowState::nsReflowState(nsIFrame* aFrame,
minSize.height = 0;
}
/* ----- nsIListFilter definition ----- */
class nsIListFilter
{
public:
virtual PRBool OutputTag(nsAutoString *aTag) const = 0;
};
#endif /* nsIFrame_h___ */

Просмотреть файл

@ -949,7 +949,16 @@ void nsContainerFrame::AdjustOffsetOfEmptyNextInFlows()
/////////////////////////////////////////////////////////////////////////////
// Debugging
NS_METHOD nsContainerFrame::List(FILE* out, PRInt32 aIndent) const
NS_METHOD nsContainerFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
nsIAtom* tag;
nsAutoString tagString;
mContent->GetTag(tag);
if (tag != nsnull)
tag->ToString(tagString);
PRBool outputMe = (PRBool)((nsnull==aFilter) || ((PR_TRUE==aFilter->OutputTag(&tagString)) && (!IsPseudoFrame())));
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
@ -974,24 +983,34 @@ NS_METHOD nsContainerFrame::List(FILE* out, PRInt32 aIndent) const
// Output the rect
out << mRect;
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("<\n", out);
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1);
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
if (PR_TRUE==outputMe)
{
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
fputs(">\n", out);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("<>\n", out);
}
}
return NS_OK;
}

Просмотреть файл

@ -174,7 +174,7 @@ public:
PRBool IsPseudoFrame() const;
// Debugging
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
NS_IMETHOD ListTag(FILE* out = stdout) const;
NS_IMETHOD VerifyTree() const;

Просмотреть файл

@ -99,6 +99,70 @@ NS_LAYOUT PRBool nsIFrame::GetShowFrameBorders()
return gShowFrameBorders;
}
////////////////////////////////////////////////
// Debug Listing Helper Class
////////////////////////////////////////////////
class TableListFilter : public nsIListFilter
{
private:
static char* kTagTable[];
public:
TableListFilter()
{};
virtual ~TableListFilter()
{};
virtual PRBool OutputTag(nsAutoString *aTag) const
{
PRBool result = PR_FALSE;
if (nsnull!=aTag && 0!=aTag->Length())
{
for (PRInt32 i=0; ; i++)
{
const char *tableTag = kTagTable[i];
if (nsnull==tableTag)
break;
if (aTag->EqualsIgnoreCase(tableTag))
{
result = PR_TRUE;
break;
}
}
}
return result;
};
};
char* TableListFilter::kTagTable[] = {
"table",
"tbody", "thead", "tfoot",
"tr", "td", "th",
"colgroup", "col",
//"caption", captions are left out because there's no caption frame
// to hang a decent output method on.
""
};
NS_LAYOUT nsIListFilter * nsIFrame::GetFilter(nsString *aFilterName)
{
nsIListFilter *result = nsnull;
if (nsnull!=aFilterName)
{
if (aFilterName->EqualsIgnoreCase("table"))
{
static nsIListFilter * tableListFilter;
if (nsnull==tableListFilter)
tableListFilter = new TableListFilter();
result = tableListFilter;
}
}
return result;
}
/**
* Note: the log module is created during library initialization which
* means that you cannot perform logging before then.
@ -1389,7 +1453,18 @@ NS_METHOD nsFrame::IsTransparent(PRBool& aTransparent) const
}
// Debugging
NS_METHOD nsFrame::List(FILE* out, PRInt32 aIndent) const
NS_METHOD nsFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
nsIAtom* tag;
nsAutoString tagString;
mContent->GetTag(tag);
if (tag != nsnull)
{
tag->ToString(tagString);
NS_RELEASE(tag);
}
if ((nsnull==aFilter) || (PR_TRUE==aFilter->OutputTag(&tagString)))
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
@ -1405,6 +1480,7 @@ NS_METHOD nsFrame::List(FILE* out, PRInt32 aIndent) const
fprintf(out, " [state=%08x]", mState);
}
fputs("<>\n", out);
}
return NS_OK;
}

Просмотреть файл

@ -201,7 +201,7 @@ public:
NS_IMETHOD GetNextSibling(nsIFrame*& aNextSibling) const;
NS_IMETHOD SetNextSibling(nsIFrame* aNextSibling);
NS_IMETHOD IsTransparent(PRBool& aTransparent) const;
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
NS_IMETHOD ListTag(FILE* out = stdout) const;
NS_IMETHOD VerifyTree() const;

Просмотреть файл

@ -77,6 +77,8 @@
// XXX Tuneup: if mNoWrap is true and we are given a ResizeReflow we
// can just return because there's nothing to do!; this is true in
// nsCSSInlineFrame too!
// Except that noWrap is ignored if the containers width is too small
// (like a table cell with a fixed width.)
//----------------------------------------------------------------------
// XXX It's really important that blocks strip out extra whitespace;
@ -144,7 +146,7 @@ public:
NS_IMETHOD DidReflow(nsIPresContext& aPresContext,
nsDidReflowStatus aStatus);
#endif
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
NS_IMETHOD List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter = nsnull) const;
NS_IMETHOD ListTag(FILE* out) const;
NS_IMETHOD VerifyTree() const;
// XXX implement regular reflow method too!
@ -302,7 +304,8 @@ struct LineData {
~LineData();
void List(FILE* out, PRInt32 aIndent) const;
void List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter = nsnull,
PRBool aOutputMe=PR_TRUE) const;
nsIFrame* LastChild() const;
@ -432,23 +435,31 @@ LineData::StateToString(char* aBuf, PRInt32 aBufSize) const
}
void
LineData::List(FILE* out, PRInt32 aIndent) const
LineData::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter,
PRBool aOutputMe) const
{
// if a filter is present, only output this frame if the filter says we should
PRInt32 i;
if (PR_TRUE==aOutputMe)
{
for (i = aIndent; --i >= 0; ) fputs(" ", out);
char cbuf[100];
fprintf(out, "line %p: count=%d state=%s {%d,%d,%d,%d} ibm=%d obm=%d <\n",
this, mChildCount, StateToString(cbuf, sizeof(cbuf)),
mBounds.x, mBounds.y, mBounds.width, mBounds.height,
mInnerBottomMargin, mOuterBottomMargin);
}
nsIFrame* frame = mFirstChild;
PRInt32 n = mChildCount;
while (--n >= 0) {
frame->List(out, aIndent + 1);
frame->List(out, aIndent + 1, aFilter);
frame->GetNextSibling(frame);
}
if (PR_TRUE==aOutputMe)
{
for (i = aIndent; --i >= 0; ) fputs(" ", out);
if (nsnull != mFloaters) {
@ -457,6 +468,7 @@ LineData::List(FILE* out, PRInt32 aIndent) const
}
fputs(">\n", out);
}
}
nsIFrame*
LineData::LastChild() const
@ -1053,10 +1065,22 @@ nsCSSBlockFrame::ListTag(FILE* out) const
}
NS_METHOD
nsCSSBlockFrame::List(FILE* out, PRInt32 aIndent) const
nsCSSBlockFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
PRInt32 i;
// if a filter is present, only output this frame if the filter says we should
nsIAtom* tag;
nsAutoString tagString;
mContent->GetTag(tag);
if (tag != nsnull)
{
tag->ToString(tagString);
NS_RELEASE(tag);
}
PRInt32 i;
PRBool outputMe = (PRBool)((nsnull==aFilter) || ((PR_TRUE==aFilter->OutputTag(&tagString)) && (!IsPseudoFrame())));
if (PR_TRUE==outputMe)
{
// Indent
for (i = aIndent; --i >= 0; ) fputs(" ", out);
@ -1094,24 +1118,33 @@ nsCSSBlockFrame::List(FILE* out, PRInt32 aIndent) const
fputs(">", out);
}
#endif
}
// Output the children, one line at a time
if (nsnull != mLines) {
if (PR_TRUE==outputMe)
fputs("<\n", out);
aIndent++;
LineData* line = mLines;
while (nsnull != line) {
line->List(out, aIndent);
line->List(out, aIndent, aFilter, outputMe);
line = line->mNext;
}
aIndent--;
if (PR_TRUE==outputMe)
{
for (i = aIndent; --i >= 0; ) fputs(" ", out);
fputs(">", out);
}
}
else {
if (PR_TRUE==outputMe)
fputs("<>", out);
}
if (PR_TRUE==outputMe)
{
// Output the text-runs
if (nsnull != mTextRuns) {
fputs(" text-runs=<\n", out);
@ -1120,6 +1153,7 @@ nsCSSBlockFrame::List(FILE* out, PRInt32 aIndent) const
fputs(">", out);
}
fputs("\n", out);
}
return NS_OK;
}

Просмотреть файл

@ -36,6 +36,9 @@ class nsIStyleContext;
class nsIView;
class nsIWidget;
class nsIReflowCommand;
class nsIListFilter;
class nsAutoString;
class nsString;
struct nsPoint;
struct nsRect;
@ -620,9 +623,10 @@ public:
NS_IMETHOD IsTransparent(PRBool& aTransparent) const = 0;
// Debugging
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const= 0;
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const= 0;
NS_IMETHOD ListTag(FILE* out = stdout) const = 0;
NS_IMETHOD VerifyTree() const = 0;
static NS_LAYOUT nsIListFilter * GetFilter(nsString *aFilterName);
/**
* See if tree verification is enabled. To enable tree verification add
@ -735,4 +739,11 @@ inline nsReflowState::nsReflowState(nsIFrame* aFrame,
minSize.height = 0;
}
/* ----- nsIListFilter definition ----- */
class nsIListFilter
{
public:
virtual PRBool OutputTag(nsAutoString *aTag) const = 0;
};
#endif /* nsIFrame_h___ */

Просмотреть файл

@ -92,7 +92,12 @@ public:
const nsReflowState& aReflowState,
nscoord aMaxWidth);
// these accessors are mostly for debugging purposes
nscoord GetTableMinWidth() const;
nscoord GetTableMaxWidth() const;
nscoord GetTableFixedWidth() const;
nscoord GetCOLSAttribute() const;
nscoord GetNumCols() const;
protected:
@ -253,8 +258,22 @@ protected:
};
// these accessors are mostly for debugging purposes
inline nscoord BasicTableLayoutStrategy::GetTableMinWidth() const
{ return mMinTableWidth; };
inline nscoord BasicTableLayoutStrategy::GetTableMaxWidth() const
{ return mMaxTableWidth; };
inline nscoord BasicTableLayoutStrategy::GetTableFixedWidth() const
{ return mFixedTableWidth; };
inline nscoord BasicTableLayoutStrategy::GetCOLSAttribute() const
{ return mCols; };
inline nscoord BasicTableLayoutStrategy::GetNumCols() const
{ return mNumCols; };
#endif

Просмотреть файл

@ -53,6 +53,26 @@ public:
*/
virtual nscoord GetTableMaxWidth() const = 0;
/** return the computed minimum possible size of the table.
* this is the sum of the minimum sizes of the content taking into account table
* attributes, but NOT factoring in the available size the table is laying out into.
* the actual table width in a given situation will depend on the available size
* provided by the parent (especially for percent-width tables.)
*/
virtual nscoord GetTableMinWidth() const = 0;
/** return the portion of the table width that is specified as "fixed" aka
* the amount of table width that does not vary with available width or other
* inputs to the table balancing algorithm.
*/
virtual nscoord GetTableFixedWidth() const = 0;
/** return the value of the COLS attribute, used for balancing column widths */
virtual nscoord GetCOLSAttribute() const = 0;
/** return the total number of columns in the table */
virtual nscoord GetNumCols() const = 0;
};
#endif

Просмотреть файл

@ -1030,8 +1030,73 @@ void nsTableCellFrame::RecalcLayoutData(nsTableFrame* aTableFrame,
mCalculated = NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableCellFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a cell
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("td");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}
#if 0 //QQQ
void nsTableCellFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
nsIAtom* tag;
nsAutoString tagString;
mContent->GetTag(tag);
if (tag != nsnull)
tag->ToString(tagString);
if ((nsnull==aFilter) || (PR_TRUE==aFilter->OutputTag(&tagString)))
{
PRInt32 indent;
@ -1075,5 +1140,30 @@ void nsTableCellFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter)
}
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
if (PR_TRUE==outputMe)
{
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
}
}
}
#endif

Просмотреть файл

@ -185,6 +185,8 @@ private:
void CalculateMargins(nsTableFrame* aTableFrame,
nsVoidArray* aBoundaryCells[4]);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor.

Просмотреть файл

@ -97,3 +97,40 @@ nsresult nsTableColFrame::NewFrame(nsIFrame** aInstancePtrResult,
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableColFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a cell
if (nsnull==aFilter)
return nsFrame::List(out, aIndent, aFilter);
nsAutoString tagString("col");
if (PR_TRUE==aFilter->OutputTag(&tagString))
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
return NS_OK;
}

Просмотреть файл

@ -77,6 +77,8 @@ public:
/** convenience method, calls into cellmap */
PRInt32 Count() const;
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
nsTableColFrame(nsIContent* aContent, nsIFrame* aParentFrame);

Просмотреть файл

@ -256,4 +256,61 @@ nsresult nsTableColGroupFrame::NewFrame(nsIFrame** aInstancePtrResult,
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableColGroupFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a colgroup
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("colgroup");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -60,6 +60,8 @@ public:
virtual void SetStartColumnIndex (PRInt32 aIndex);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
nsTableColGroupFrame(nsIContent* aContent, nsIFrame* aParentFrame);

Просмотреть файл

@ -3463,3 +3463,70 @@ PRBool nsTableFrame::TableIsAutoWidth(nsTableFrame *aTableFrame,
return result;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a table
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("table");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
if (nsnull!=mTableLayoutStrategy)
{
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
fprintf(out, "min=%d, max=%d, fixed=%d, cols=%d, numCols=%d\n",
mTableLayoutStrategy->GetTableMinWidth(),
mTableLayoutStrategy->GetTableMaxWidth(),
mTableLayoutStrategy->GetTableFixedWidth(),
mTableLayoutStrategy->GetCOLSAttribute(),
mTableLayoutStrategy->GetNumCols()
);
}
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -233,6 +233,8 @@ public:
virtual void AddColumnFrame (nsTableColFrame *aColFrame);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor.

Просмотреть файл

@ -866,3 +866,61 @@ nsresult nsTableOuterFrame::NewFrame(nsIFrame** aInstancePtrResult,
*aInstancePtrResult = it;
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableOuterFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a tbody
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("tbody");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -65,6 +65,8 @@ public:
nsIStyleContext* aStyleContext,
nsIFrame*& aContinuingFrame);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor

Просмотреть файл

@ -1005,3 +1005,61 @@ nsresult nsTableRowFrame::NewFrame( nsIFrame** aInstancePtrResult,
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableRowFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a row
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("tr");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -111,6 +111,8 @@ public:
/** set this row's starting row index */
virtual void SetRowIndex (int aRowIndex);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor.

Просмотреть файл

@ -1210,45 +1210,68 @@ nsresult nsTableRowGroupFrame::NewFrame(nsIFrame** aInstancePtrResult,
return NS_OK;
}
// For Debugging ONLY
NS_METHOD nsTableRowGroupFrame::MoveTo(nscoord aX, nscoord aY)
/* ----- debugging methods ----- */
NS_METHOD nsTableRowGroupFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
if ((aX != mRect.x) || (aY != mRect.y)) {
mRect.x = aX;
mRect.y = aY;
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a tbody
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsIView* view;
GetView(view);
nsAutoString tagString("tbody");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Let the view know
if (nsnull != view) {
// Position view relative to it's parent, not relative to our
// parent frame (our parent frame may not have a view).
nsIView* parentWithView;
nsPoint origin;
GetOffsetFromView(origin, parentWithView);
view->SetPosition(origin.x, origin.y);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}
NS_METHOD nsTableRowGroupFrame::SizeTo(nscoord aWidth, nscoord aHeight)
{
mRect.width = aWidth;
mRect.height = aHeight;
nsIView* view;
GetView(view);
// Let the view know
if (nsnull != view) {
view->SetDimensions(aWidth, aHeight);
}
return NS_OK;
}

Просмотреть файл

@ -94,9 +94,8 @@ public:
/** return the number of contained rows */
PRInt32 GetRowCount ();
// For DEBUGGING Purposes Only
NS_IMETHOD MoveTo(nscoord aX, nscoord aY);
NS_IMETHOD SizeTo(nscoord aWidth, nscoord aHeight);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:

Просмотреть файл

@ -92,7 +92,12 @@ public:
const nsReflowState& aReflowState,
nscoord aMaxWidth);
// these accessors are mostly for debugging purposes
nscoord GetTableMinWidth() const;
nscoord GetTableMaxWidth() const;
nscoord GetTableFixedWidth() const;
nscoord GetCOLSAttribute() const;
nscoord GetNumCols() const;
protected:
@ -253,8 +258,22 @@ protected:
};
// these accessors are mostly for debugging purposes
inline nscoord BasicTableLayoutStrategy::GetTableMinWidth() const
{ return mMinTableWidth; };
inline nscoord BasicTableLayoutStrategy::GetTableMaxWidth() const
{ return mMaxTableWidth; };
inline nscoord BasicTableLayoutStrategy::GetTableFixedWidth() const
{ return mFixedTableWidth; };
inline nscoord BasicTableLayoutStrategy::GetCOLSAttribute() const
{ return mCols; };
inline nscoord BasicTableLayoutStrategy::GetNumCols() const
{ return mNumCols; };
#endif

Просмотреть файл

@ -53,6 +53,26 @@ public:
*/
virtual nscoord GetTableMaxWidth() const = 0;
/** return the computed minimum possible size of the table.
* this is the sum of the minimum sizes of the content taking into account table
* attributes, but NOT factoring in the available size the table is laying out into.
* the actual table width in a given situation will depend on the available size
* provided by the parent (especially for percent-width tables.)
*/
virtual nscoord GetTableMinWidth() const = 0;
/** return the portion of the table width that is specified as "fixed" aka
* the amount of table width that does not vary with available width or other
* inputs to the table balancing algorithm.
*/
virtual nscoord GetTableFixedWidth() const = 0;
/** return the value of the COLS attribute, used for balancing column widths */
virtual nscoord GetCOLSAttribute() const = 0;
/** return the total number of columns in the table */
virtual nscoord GetNumCols() const = 0;
};
#endif

Просмотреть файл

@ -1030,8 +1030,73 @@ void nsTableCellFrame::RecalcLayoutData(nsTableFrame* aTableFrame,
mCalculated = NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableCellFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a cell
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("td");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}
#if 0 //QQQ
void nsTableCellFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
nsIAtom* tag;
nsAutoString tagString;
mContent->GetTag(tag);
if (tag != nsnull)
tag->ToString(tagString);
if ((nsnull==aFilter) || (PR_TRUE==aFilter->OutputTag(&tagString)))
{
PRInt32 indent;
@ -1075,5 +1140,30 @@ void nsTableCellFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter)
}
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
if (PR_TRUE==outputMe)
{
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
}
}
}
#endif

Просмотреть файл

@ -185,6 +185,8 @@ private:
void CalculateMargins(nsTableFrame* aTableFrame,
nsVoidArray* aBoundaryCells[4]);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor.

Просмотреть файл

@ -97,3 +97,40 @@ nsresult nsTableColFrame::NewFrame(nsIFrame** aInstancePtrResult,
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableColFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a cell
if (nsnull==aFilter)
return nsFrame::List(out, aIndent, aFilter);
nsAutoString tagString("col");
if (PR_TRUE==aFilter->OutputTag(&tagString))
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
return NS_OK;
}

Просмотреть файл

@ -77,6 +77,8 @@ public:
/** convenience method, calls into cellmap */
PRInt32 Count() const;
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
nsTableColFrame(nsIContent* aContent, nsIFrame* aParentFrame);

Просмотреть файл

@ -256,4 +256,61 @@ nsresult nsTableColGroupFrame::NewFrame(nsIFrame** aInstancePtrResult,
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableColGroupFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a colgroup
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("colgroup");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -60,6 +60,8 @@ public:
virtual void SetStartColumnIndex (PRInt32 aIndex);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
nsTableColGroupFrame(nsIContent* aContent, nsIFrame* aParentFrame);

Просмотреть файл

@ -3463,3 +3463,70 @@ PRBool nsTableFrame::TableIsAutoWidth(nsTableFrame *aTableFrame,
return result;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a table
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("table");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
if (nsnull!=mTableLayoutStrategy)
{
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
fprintf(out, "min=%d, max=%d, fixed=%d, cols=%d, numCols=%d\n",
mTableLayoutStrategy->GetTableMinWidth(),
mTableLayoutStrategy->GetTableMaxWidth(),
mTableLayoutStrategy->GetTableFixedWidth(),
mTableLayoutStrategy->GetCOLSAttribute(),
mTableLayoutStrategy->GetNumCols()
);
}
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -233,6 +233,8 @@ public:
virtual void AddColumnFrame (nsTableColFrame *aColFrame);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor.

Просмотреть файл

@ -866,3 +866,61 @@ nsresult nsTableOuterFrame::NewFrame(nsIFrame** aInstancePtrResult,
*aInstancePtrResult = it;
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableOuterFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a tbody
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("tbody");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -65,6 +65,8 @@ public:
nsIStyleContext* aStyleContext,
nsIFrame*& aContinuingFrame);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor

Просмотреть файл

@ -1005,3 +1005,61 @@ nsresult nsTableRowFrame::NewFrame( nsIFrame** aInstancePtrResult,
return NS_OK;
}
/* ----- debugging methods ----- */
NS_METHOD nsTableRowFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a row
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsAutoString tagString("tr");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}

Просмотреть файл

@ -111,6 +111,8 @@ public:
/** set this row's starting row index */
virtual void SetRowIndex (int aRowIndex);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected:
/** protected constructor.

Просмотреть файл

@ -1210,45 +1210,68 @@ nsresult nsTableRowGroupFrame::NewFrame(nsIFrame** aInstancePtrResult,
return NS_OK;
}
// For Debugging ONLY
NS_METHOD nsTableRowGroupFrame::MoveTo(nscoord aX, nscoord aY)
/* ----- debugging methods ----- */
NS_METHOD nsTableRowGroupFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
{
if ((aX != mRect.x) || (aY != mRect.y)) {
mRect.x = aX;
mRect.y = aY;
// if a filter is present, only output this frame if the filter says we should
// since this could be any "tag" with the right display type, we'll
// just pretend it's a tbody
if (nsnull==aFilter)
return nsContainerFrame::List(out, aIndent, aFilter);
nsIView* view;
GetView(view);
nsAutoString tagString("tbody");
PRBool outputMe = aFilter->OutputTag(&tagString);
if (PR_TRUE==outputMe)
{
// Indent
for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out);
// Let the view know
if (nsnull != view) {
// Position view relative to it's parent, not relative to our
// parent frame (our parent frame may not have a view).
nsIView* parentWithView;
nsPoint origin;
GetOffsetFromView(origin, parentWithView);
view->SetPosition(origin.x, origin.y);
// Output the tag and rect
nsIAtom* tag;
mContent->GetTag(tag);
if (tag != nsnull) {
nsAutoString buf;
tag->ToString(buf);
fputs(buf, out);
NS_RELEASE(tag);
}
PRInt32 contentIndex;
GetContentIndex(contentIndex);
fprintf(out, "(%d)", contentIndex);
out << mRect;
if (0 != mState) {
fprintf(out, " [state=%08x]", mState);
}
fputs("\n", out);
}
// Output the children
if (mChildCount > 0) {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) {
child->List(out, aIndent + 1, aFilter);
}
} else {
if (PR_TRUE==outputMe)
{
if (0 != mState) {
fprintf(out, " [state=%08x]\n", mState);
}
}
}
return NS_OK;
}
NS_METHOD nsTableRowGroupFrame::SizeTo(nscoord aWidth, nscoord aHeight)
{
mRect.width = aWidth;
mRect.height = aHeight;
nsIView* view;
GetView(view);
// Let the view know
if (nsnull != view) {
view->SetDimensions(aWidth, aHeight);
}
return NS_OK;
}

Просмотреть файл

@ -94,9 +94,8 @@ public:
/** return the number of contained rows */
PRInt32 GetRowCount ();
// For DEBUGGING Purposes Only
NS_IMETHOD MoveTo(nscoord aX, nscoord aY);
NS_IMETHOD SizeTo(nscoord aWidth, nscoord aHeight);
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0, nsIListFilter *aFilter = nsnull) const;
protected: