diff --git a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp
index 722561f927d..015932e2e02 100644
--- a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp
+++ b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp
@@ -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)
diff --git a/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp
index 722561f927d..015932e2e02 100644
--- a/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp
+++ b/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp
@@ -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)