sync to nsIStyledContent API change

add table style rule to table cell


git-svn-id: svn://10.0.0.236/trunk@32802 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl%netscape.com
1999-05-26 23:47:19 +00:00
parent 09dc1f3a12
commit 57eef2000d
2 changed files with 64 additions and 2 deletions

View File

@@ -108,7 +108,7 @@ public:
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
NS_IMPL_IHTMLCONTENT_USING_GENERIC2(mInner)
protected:
nsresult GetRow(nsIDOMHTMLTableRowElement** aRow);
@@ -272,6 +272,37 @@ nsHTMLTableCellElement::SetCellIndex(PRInt32 aCellIndex)
return NS_OK;
}
NS_IMETHODIMP
nsHTMLTableCellElement::GetContentStyleRules(nsISupportsArray* aRules)
{
// get table, add its rules too
nsIContent* row = nsnull; // XXX can we safely presume structure or do we need to QI on the way up?
if (NS_SUCCEEDED(GetParent(row)) && row) {
nsIContent* section = nsnull;
if (NS_SUCCEEDED(row->GetParent(section)) && section) {
nsIContent* table = nsnull;
if (NS_SUCCEEDED(section->GetParent(table)) && table) {
nsIStyledContent* styledTable = nsnull;
if (NS_SUCCEEDED(table->QueryInterface(kIStyledContentIID, (void**)&styledTable))) {
styledTable->GetContentStyleRules(aRules);
NS_RELEASE(styledTable);
}
NS_RELEASE(table);
}
NS_RELEASE(section);
}
NS_RELEASE(row);
}
return mInner.GetContentStyleRules(aRules);
}
NS_IMETHODIMP
nsHTMLTableCellElement::GetInlineStyleRules(nsISupportsArray* aRules)
{
return mInner.GetInlineStyleRules(aRules);
}
NS_IMPL_STRING_ATTR(nsHTMLTableCellElement, Abbr, abbr)
NS_IMPL_STRING_ATTR(nsHTMLTableCellElement, Align, align)
NS_IMPL_STRING_ATTR(nsHTMLTableCellElement, Axis, axis)