mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 20:22:00 +00:00
Added SetTableForChildren to set the children's table instance variable
This commit is contained in:
parent
96fa28d30f
commit
1a06b73ae4
@ -99,8 +99,23 @@ nsTablePart* nsTableContent::GetTable ()
|
||||
return mTable;
|
||||
}
|
||||
|
||||
void nsTableContent::SetTableForChildren(nsTablePart *aTable)
|
||||
{
|
||||
if (aTable != nsnull)
|
||||
{
|
||||
PRInt32 count = ChildCount();
|
||||
for (PRInt32 index = 0; index < count; index++)
|
||||
SetTableForTableContent(ChildAt(index),aTable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void nsTableContent::SetTable (nsTablePart *aTable)
|
||||
{
|
||||
// Check to see if the current table was null, if it was, then call
|
||||
// method to reset children
|
||||
if (mTable == nsnull)
|
||||
SetTableForChildren(aTable);
|
||||
mTable = aTable;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
* within a table.
|
||||
*
|
||||
* @author sclark
|
||||
* @version $Revision: 3.2 $
|
||||
* @version $Revision: 3.3 $
|
||||
* @see
|
||||
*/
|
||||
class nsTableContent : public nsHTMLContainer, public nsITableContent
|
||||
@ -77,6 +77,13 @@ public:
|
||||
**/
|
||||
void SetTable (nsTablePart *aTable);
|
||||
|
||||
|
||||
/** Set the children of this piece of content to
|
||||
* be aTable
|
||||
**/
|
||||
void SetTableForChildren(nsTablePart *aTable);
|
||||
|
||||
|
||||
/** @see nsITableContent::IsImplicit */
|
||||
virtual PRBool IsImplicit () const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user