зеркало из https://github.com/mozilla/gecko-dev.git
Bug 893117: Remove xpidl for nsIDOMHTMLTableElement r=peterv
This commit is contained in:
Родитель
c45c4b87d0
Коммит
5a436a45ff
|
@ -344,219 +344,6 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableElement)
|
||||||
// in fact, they are integers or they are meaningless. so we store them
|
// in fact, they are integers or they are meaningless. so we store them
|
||||||
// here as ints.
|
// 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<nsIDOMHTMLTableCaptionElement> caption = GetCaption();
|
|
||||||
caption.forget(aValue);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetCaption(nsIDOMHTMLTableCaptionElement* aValue)
|
|
||||||
{
|
|
||||||
HTMLTableCaptionElement* caption =
|
|
||||||
static_cast<HTMLTableCaptionElement*>(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<HTMLTableSectionElement*>(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<HTMLTableSectionElement*>(aValue);
|
|
||||||
ErrorResult rv;
|
|
||||||
SetTFoot(section, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetRows(nsIDOMHTMLCollection** aValue)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aValue = Rows());
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIHTMLCollection*
|
nsIHTMLCollection*
|
||||||
HTMLTableElement::Rows()
|
HTMLTableElement::Rows()
|
||||||
{
|
{
|
||||||
|
@ -567,13 +354,6 @@ HTMLTableElement::Rows()
|
||||||
return mRows;
|
return mRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aValue = TBodies());
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIHTMLCollection*
|
nsIHTMLCollection*
|
||||||
HTMLTableElement::TBodies()
|
HTMLTableElement::TBodies()
|
||||||
{
|
{
|
||||||
|
@ -610,14 +390,7 @@ HTMLTableElement::CreateTHead()
|
||||||
return head.forget();
|
return head.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
nsRefPtr<nsGenericHTMLElement> thead = CreateTHead();
|
|
||||||
return thead ? CallQueryInterface(thead, aValue) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteTHead()
|
HTMLTableElement::DeleteTHead()
|
||||||
{
|
{
|
||||||
HTMLTableSectionElement* tHead = GetTHead();
|
HTMLTableSectionElement* tHead = GetTHead();
|
||||||
|
@ -626,8 +399,6 @@ HTMLTableElement::DeleteTHead()
|
||||||
nsINode::RemoveChild(*tHead, rv);
|
nsINode::RemoveChild(*tHead, rv);
|
||||||
MOZ_ASSERT(!rv.Failed());
|
MOZ_ASSERT(!rv.Failed());
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
|
@ -650,14 +421,7 @@ HTMLTableElement::CreateTFoot()
|
||||||
return foot.forget();
|
return foot.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
nsRefPtr<nsGenericHTMLElement> tfoot = CreateTFoot();
|
|
||||||
return tfoot ? CallQueryInterface(tfoot, aValue) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteTFoot()
|
HTMLTableElement::DeleteTFoot()
|
||||||
{
|
{
|
||||||
HTMLTableSectionElement* tFoot = GetTFoot();
|
HTMLTableSectionElement* tFoot = GetTFoot();
|
||||||
|
@ -666,8 +430,6 @@ HTMLTableElement::DeleteTFoot()
|
||||||
nsINode::RemoveChild(*tFoot, rv);
|
nsINode::RemoveChild(*tFoot, rv);
|
||||||
MOZ_ASSERT(!rv.Failed());
|
MOZ_ASSERT(!rv.Failed());
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
|
@ -690,14 +452,7 @@ HTMLTableElement::CreateCaption()
|
||||||
return caption.forget();
|
return caption.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLTableElement::CreateCaption(nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
nsRefPtr<nsGenericHTMLElement> caption = CreateCaption();
|
|
||||||
return caption ? CallQueryInterface(caption, aValue) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteCaption()
|
HTMLTableElement::DeleteCaption()
|
||||||
{
|
{
|
||||||
HTMLTableCaptionElement* caption = GetCaption();
|
HTMLTableCaptionElement* caption = GetCaption();
|
||||||
|
@ -706,8 +461,6 @@ HTMLTableElement::DeleteCaption()
|
||||||
nsINode::RemoveChild(*caption, rv);
|
nsINode::RemoveChild(*caption, rv);
|
||||||
MOZ_ASSERT(!rv.Failed());
|
MOZ_ASSERT(!rv.Failed());
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
|
@ -848,14 +601,6 @@ HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
||||||
return newRow.forget();
|
return newRow.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::InsertRow(int32_t aIndex, nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
nsRefPtr<nsGenericHTMLElement> newRow = InsertRow(aIndex, rv);
|
|
||||||
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(newRow, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
|
@ -886,14 +631,6 @@ HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
||||||
row->RemoveFromParent();
|
row->RemoveFromParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteRow(int32_t aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
DeleteRow(aValue, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
static const nsAttrValue::EnumTable kFrameTable[] = {
|
static const nsAttrValue::EnumTable kFrameTable[] = {
|
||||||
{ "void", NS_STYLE_TABLE_FRAME_NONE },
|
{ "void", NS_STYLE_TABLE_FRAME_NONE },
|
||||||
{ "above", NS_STYLE_TABLE_FRAME_ABOVE },
|
{ "above", NS_STYLE_TABLE_FRAME_ABOVE },
|
||||||
|
|
|
@ -39,9 +39,6 @@ public:
|
||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLTableElement
|
|
||||||
NS_DECL_NSIDOMHTMLTABLEELEMENT
|
|
||||||
|
|
||||||
HTMLTableCaptionElement* GetCaption() const
|
HTMLTableCaptionElement* GetCaption() const
|
||||||
{
|
{
|
||||||
return static_cast<HTMLTableCaptionElement*>(GetChild(nsGkAtoms::caption));
|
return static_cast<HTMLTableCaptionElement*>(GetChild(nsGkAtoms::caption));
|
||||||
|
@ -54,8 +51,13 @@ public:
|
||||||
nsINode::AppendChild(*aCaption, rv);
|
nsINode::AppendChild(*aCaption, rv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DeleteTFoot();
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement> CreateCaption();
|
already_AddRefed<nsGenericHTMLElement> CreateCaption();
|
||||||
|
|
||||||
|
void DeleteCaption();
|
||||||
|
|
||||||
HTMLTableSectionElement* GetTHead() const
|
HTMLTableSectionElement* GetTHead() const
|
||||||
{
|
{
|
||||||
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::thead));
|
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::thead));
|
||||||
|
@ -74,6 +76,8 @@ public:
|
||||||
}
|
}
|
||||||
already_AddRefed<nsGenericHTMLElement> CreateTHead();
|
already_AddRefed<nsGenericHTMLElement> CreateTHead();
|
||||||
|
|
||||||
|
void DeleteTHead();
|
||||||
|
|
||||||
HTMLTableSectionElement* GetTFoot() const
|
HTMLTableSectionElement* GetTFoot() const
|
||||||
{
|
{
|
||||||
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::tfoot));
|
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::tfoot));
|
||||||
|
|
|
@ -19,39 +19,4 @@
|
||||||
[scriptable, uuid(1a7bf1f1-5d6c-4200-9ceb-455874322315)]
|
[scriptable, uuid(1a7bf1f1-5d6c-4200-9ceb-455874322315)]
|
||||||
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
|
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);
|
|
||||||
};
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче