diff --git a/content/html/content/src/HTMLTableElement.cpp b/content/html/content/src/HTMLTableElement.cpp
index 8737357da33a..eb73744963af 100644
--- a/content/html/content/src/HTMLTableElement.cpp
+++ b/content/html/content/src/HTMLTableElement.cpp
@@ -344,219 +344,6 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableElement)
// in fact, they are integers or they are meaningless. so we store them
// here as ints.
-NS_IMETHODIMP
-HTMLTableElement::SetAlign(const nsAString& aAlign)
-{
- ErrorResult rv;
- SetAlign(aAlign, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetAlign(nsAString& aAlign)
-{
- nsString align;
- GetAlign(align);
- aAlign = align;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetBgColor(const nsAString& aBgColor)
-{
- ErrorResult rv;
- SetBgColor(aBgColor, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetBgColor(nsAString& aBgColor)
-{
- nsString bgColor;
- GetBgColor(bgColor);
- aBgColor = bgColor;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetBorder(const nsAString& aBorder)
-{
- ErrorResult rv;
- SetBorder(aBorder, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetBorder(nsAString& aBorder)
-{
- nsString border;
- GetBorder(border);
- aBorder = border;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetCellPadding(const nsAString& aCellPadding)
-{
- ErrorResult rv;
- SetCellPadding(aCellPadding, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetCellPadding(nsAString& aCellPadding)
-{
- nsString cellPadding;
- GetCellPadding(cellPadding);
- aCellPadding = cellPadding;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetCellSpacing(const nsAString& aCellSpacing)
-{
- ErrorResult rv;
- SetCellSpacing(aCellSpacing, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetCellSpacing(nsAString& aCellSpacing)
-{
- nsString cellSpacing;
- GetCellSpacing(cellSpacing);
- aCellSpacing = cellSpacing;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetFrame(const nsAString& aFrame)
-{
- ErrorResult rv;
- SetFrame(aFrame, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetFrame(nsAString& aFrame)
-{
- nsString frame;
- GetFrame(frame);
- aFrame = frame;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetRules(const nsAString& aRules)
-{
- ErrorResult rv;
- SetRules(aRules, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetRules(nsAString& aRules)
-{
- nsString rules;
- GetRules(rules);
- aRules = rules;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetSummary(const nsAString& aSummary)
-{
- ErrorResult rv;
- SetSummary(aSummary, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetSummary(nsAString& aSummary)
-{
- nsString summary;
- GetSummary(summary);
- aSummary = summary;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetWidth(const nsAString& aWidth)
-{
- ErrorResult rv;
- SetWidth(aWidth, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetWidth(nsAString& aWidth)
-{
- nsString width;
- GetWidth(width);
- aWidth = width;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetCaption(nsIDOMHTMLTableCaptionElement** aValue)
-{
- nsCOMPtr caption = GetCaption();
- caption.forget(aValue);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetCaption(nsIDOMHTMLTableCaptionElement* aValue)
-{
- HTMLTableCaptionElement* caption =
- static_cast(aValue);
- SetCaption(caption);
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetTHead(nsIDOMHTMLTableSectionElement** aValue)
-{
- NS_IF_ADDREF(*aValue = GetTHead());
-
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetTHead(nsIDOMHTMLTableSectionElement* aValue)
-{
- HTMLTableSectionElement* section =
- static_cast(aValue);
- ErrorResult rv;
- SetTHead(section, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetTFoot(nsIDOMHTMLTableSectionElement** aValue)
-{
- NS_IF_ADDREF(*aValue = GetTFoot());
-
- return NS_OK;
-}
-
-NS_IMETHODIMP
-HTMLTableElement::SetTFoot(nsIDOMHTMLTableSectionElement* aValue)
-{
- HTMLTableSectionElement* section =
- static_cast(aValue);
- ErrorResult rv;
- SetTFoot(section, rv);
- return rv.ErrorCode();
-}
-
-NS_IMETHODIMP
-HTMLTableElement::GetRows(nsIDOMHTMLCollection** aValue)
-{
- NS_ADDREF(*aValue = Rows());
- return NS_OK;
-}
-
nsIHTMLCollection*
HTMLTableElement::Rows()
{
@@ -567,13 +354,6 @@ HTMLTableElement::Rows()
return mRows;
}
-NS_IMETHODIMP
-HTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue)
-{
- NS_ADDREF(*aValue = TBodies());
- return NS_OK;
-}
-
nsIHTMLCollection*
HTMLTableElement::TBodies()
{
@@ -610,14 +390,7 @@ HTMLTableElement::CreateTHead()
return head.forget();
}
-NS_IMETHODIMP
-HTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue)
-{
- nsRefPtr thead = CreateTHead();
- return thead ? CallQueryInterface(thead, aValue) : NS_OK;
-}
-
-NS_IMETHODIMP
+void
HTMLTableElement::DeleteTHead()
{
HTMLTableSectionElement* tHead = GetTHead();
@@ -626,8 +399,6 @@ HTMLTableElement::DeleteTHead()
nsINode::RemoveChild(*tHead, rv);
MOZ_ASSERT(!rv.Failed());
}
-
- return NS_OK;
}
already_AddRefed
@@ -650,14 +421,7 @@ HTMLTableElement::CreateTFoot()
return foot.forget();
}
-NS_IMETHODIMP
-HTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue)
-{
- nsRefPtr tfoot = CreateTFoot();
- return tfoot ? CallQueryInterface(tfoot, aValue) : NS_OK;
-}
-
-NS_IMETHODIMP
+void
HTMLTableElement::DeleteTFoot()
{
HTMLTableSectionElement* tFoot = GetTFoot();
@@ -666,8 +430,6 @@ HTMLTableElement::DeleteTFoot()
nsINode::RemoveChild(*tFoot, rv);
MOZ_ASSERT(!rv.Failed());
}
-
- return NS_OK;
}
already_AddRefed
@@ -690,14 +452,7 @@ HTMLTableElement::CreateCaption()
return caption.forget();
}
-NS_IMETHODIMP
-HTMLTableElement::CreateCaption(nsIDOMHTMLElement** aValue)
-{
- nsRefPtr caption = CreateCaption();
- return caption ? CallQueryInterface(caption, aValue) : NS_OK;
-}
-
-NS_IMETHODIMP
+void
HTMLTableElement::DeleteCaption()
{
HTMLTableCaptionElement* caption = GetCaption();
@@ -706,8 +461,6 @@ HTMLTableElement::DeleteCaption()
nsINode::RemoveChild(*caption, rv);
MOZ_ASSERT(!rv.Failed());
}
-
- return NS_OK;
}
already_AddRefed
@@ -743,7 +496,7 @@ already_AddRefed
HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
{
/* get the ref row at aIndex
- if there is one,
+ if there is one,
get its parent
insert the new row just before the ref row
else
@@ -848,14 +601,6 @@ HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
return newRow.forget();
}
-NS_IMETHODIMP
-HTMLTableElement::InsertRow(int32_t aIndex, nsIDOMHTMLElement** aValue)
-{
- ErrorResult rv;
- nsRefPtr newRow = InsertRow(aIndex, rv);
- return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(newRow, aValue);
-}
-
void
HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
{
@@ -886,14 +631,6 @@ HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
row->RemoveFromParent();
}
-NS_IMETHODIMP
-HTMLTableElement::DeleteRow(int32_t aValue)
-{
- ErrorResult rv;
- DeleteRow(aValue, rv);
- return rv.ErrorCode();
-}
-
static const nsAttrValue::EnumTable kFrameTable[] = {
{ "void", NS_STYLE_TABLE_FRAME_NONE },
{ "above", NS_STYLE_TABLE_FRAME_ABOVE },
diff --git a/content/html/content/src/HTMLTableElement.h b/content/html/content/src/HTMLTableElement.h
index 0f158fe3c064..623c730374ba 100644
--- a/content/html/content/src/HTMLTableElement.h
+++ b/content/html/content/src/HTMLTableElement.h
@@ -39,9 +39,6 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
- // nsIDOMHTMLTableElement
- NS_DECL_NSIDOMHTMLTABLEELEMENT
-
HTMLTableCaptionElement* GetCaption() const
{
return static_cast(GetChild(nsGkAtoms::caption));
@@ -54,8 +51,13 @@ public:
nsINode::AppendChild(*aCaption, rv);
}
}
+
+ void DeleteTFoot();
+
already_AddRefed CreateCaption();
+ void DeleteCaption();
+
HTMLTableSectionElement* GetTHead() const
{
return static_cast(GetChild(nsGkAtoms::thead));
@@ -74,6 +76,8 @@ public:
}
already_AddRefed CreateTHead();
+ void DeleteTHead();
+
HTMLTableSectionElement* GetTFoot() const
{
return static_cast(GetChild(nsGkAtoms::tfoot));
diff --git a/dom/interfaces/html/nsIDOMHTMLTableElement.idl b/dom/interfaces/html/nsIDOMHTMLTableElement.idl
index f88e0359d9aa..4d16be2fee4b 100644
--- a/dom/interfaces/html/nsIDOMHTMLTableElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLTableElement.idl
@@ -19,39 +19,4 @@
[scriptable, uuid(1a7bf1f1-5d6c-4200-9ceb-455874322315)]
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
{
- // Modified in DOM Level 2:
- attribute nsIDOMHTMLTableCaptionElement caption;
- // raises(DOMException) on setting
-
- // Modified in DOM Level 2:
- attribute nsIDOMHTMLTableSectionElement tHead;
- // raises(DOMException) on setting
-
- // Modified in DOM Level 2:
- attribute nsIDOMHTMLTableSectionElement tFoot;
- // raises(DOMException) on setting
-
- readonly attribute nsIDOMHTMLCollection rows;
- readonly attribute nsIDOMHTMLCollection tBodies;
- attribute DOMString align;
- attribute DOMString bgColor;
- attribute DOMString border;
- attribute DOMString cellPadding;
- attribute DOMString cellSpacing;
- attribute DOMString frame;
- attribute DOMString rules;
- attribute DOMString summary;
- attribute DOMString width;
- nsIDOMHTMLElement createTHead();
- void deleteTHead();
- nsIDOMHTMLElement createTFoot();
- void deleteTFoot();
- nsIDOMHTMLElement createCaption();
- void deleteCaption();
- // Modified in DOM Level 2:
- nsIDOMHTMLElement insertRow(in long index)
- raises(DOMException);
- // Modified in DOM Level 2:
- void deleteRow(in long index)
- raises(DOMException);
};