diff --git a/accessible/src/html/HTMLTableAccessible.cpp b/accessible/src/html/HTMLTableAccessible.cpp index 4d6a2b1de1c..bd1607c1460 100644 --- a/accessible/src/html/HTMLTableAccessible.cpp +++ b/accessible/src/html/HTMLTableAccessible.cpp @@ -28,7 +28,7 @@ #include "nsIDOMHTMLTableCellElement.h" #include "nsIDOMHTMLTableElement.h" #include "nsIDOMHTMLTableRowElement.h" -#include "nsIDOMHTMLTableSectionElem.h" +#include "nsIDOMHTMLTableSectionElement.h" #include "nsIDocument.h" #include "nsIMutableArray.h" #include "nsIPresShell.h" diff --git a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-05.js b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-05.js index b01717a20ca..99f8655063c 100644 --- a/browser/devtools/debugger/test/browser_dbg_propertyview-filter-05.js +++ b/browser/devtools/debugger/test/browser_dbg_propertyview-filter-05.js @@ -45,8 +45,8 @@ function testVariablesFiltering() "There should be 0 variables displayed in the test scope"); is(loadScope.querySelectorAll(".variable:not([non-match])").length, 1, "There should be 1 variable displayed in the load scope"); - is(globalScope.querySelectorAll(".variable:not([non-match])").length, 4, - "There should be 4 variables displayed in the global scope"); + is(globalScope.querySelectorAll(".variable:not([non-match])").length, 5, + "There should be 5 variables displayed in the global scope"); is(innerScope.querySelectorAll(".property:not([non-match])").length, 0, "There should be 0 properties displayed in the inner scope"); diff --git a/content/html/content/src/HTMLTableElement.cpp b/content/html/content/src/HTMLTableElement.cpp index b5cc400eb33..810a54ed4fa 100644 --- a/content/html/content/src/HTMLTableElement.cpp +++ b/content/html/content/src/HTMLTableElement.cpp @@ -6,7 +6,7 @@ #include "mozilla/Util.h" #include "mozilla/dom/HTMLTableElement.h" -#include "nsIDOMHTMLTableSectionElem.h" +#include "nsIDOMHTMLTableSectionElement.h" #include "nsAttrValueInlines.h" #include "nsRuleData.h" #include "nsHTMLStyleSheet.h" @@ -117,9 +117,9 @@ NS_INTERFACE_MAP_END if (mParent) { \ /* THead */ \ HTMLTableSectionElement* rowGroup = mParent->GetTHead(); \ - nsCOMPtr rows; \ + nsIHTMLCollection* rows; \ if (rowGroup) { \ - rowGroup->GetRows(getter_AddRefs(rows)); \ + rows = rowGroup->Rows(); \ do { /* gives scoping */ \ _code \ } while (0); \ @@ -129,7 +129,7 @@ NS_INTERFACE_MAP_END _node; _node = _node->GetNextSibling()) { \ if (_node->IsHTML(nsGkAtoms::tbody)) { \ rowGroup = static_cast(_node); \ - rowGroup->GetRows(getter_AddRefs(rows)); \ + rows = rowGroup->Rows(); \ do { /* gives scoping */ \ _code \ } while (0); \ @@ -142,9 +142,9 @@ NS_INTERFACE_MAP_END } while (0); \ /* TFoot */ \ rowGroup = mParent->GetTFoot(); \ - rows = nullptr; \ + rows = nullptr; \ if (rowGroup) { \ - rowGroup->GetRows(getter_AddRefs(rows)); \ + rows = rowGroup->Rows(); \ do { /* gives scoping */ \ _code \ } while (0); \ @@ -540,8 +540,10 @@ HTMLTableElement::GetTHead(nsIDOMHTMLTableSectionElement** aValue) NS_IMETHODIMP HTMLTableElement::SetTHead(nsIDOMHTMLTableSectionElement* aValue) { + HTMLTableSectionElement* section = + static_cast(aValue); ErrorResult rv; - SetTHead(aValue, rv); + SetTHead(section, rv); return rv.ErrorCode(); } @@ -556,8 +558,10 @@ HTMLTableElement::GetTFoot(nsIDOMHTMLTableSectionElement** aValue) NS_IMETHODIMP HTMLTableElement::SetTFoot(nsIDOMHTMLTableSectionElement* aValue) { + HTMLTableSectionElement* section = + static_cast(aValue); ErrorResult rv; - SetTFoot(aValue, rv); + SetTFoot(section, rv); return rv.ErrorCode(); } @@ -821,11 +825,8 @@ HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError) if (newRow) { HTMLTableSectionElement* section = static_cast(rowGroup.get()); - nsCOMPtr rows; - section->GetRows(getter_AddRefs(rows)); - rowGroup->InsertBefore(*newRow, - static_cast(rows.get())->Item(0), - aError); + nsIHTMLCollection* rows = section->Rows(); + rowGroup->InsertBefore(*newRow, rows->Item(0), aError); } } } diff --git a/content/html/content/src/HTMLTableElement.h b/content/html/content/src/HTMLTableElement.h index 5382e9b454c..15087a6769c 100644 --- a/content/html/content/src/HTMLTableElement.h +++ b/content/html/content/src/HTMLTableElement.h @@ -58,19 +58,16 @@ public: { return static_cast(GetChild(nsGkAtoms::thead)); } - void SetTHead(nsIDOMHTMLTableSectionElement* aTHead, ErrorResult& aError) + void SetTHead(HTMLTableSectionElement* aTHead, ErrorResult& aError) { - nsCOMPtr content = do_QueryInterface(aTHead); - if (!content || !content->IsHTML(nsGkAtoms::thead)) { + if (!aTHead->IsHTML(nsGkAtoms::thead)) { aError.Throw(NS_ERROR_DOM_HIERARCHY_REQUEST_ERR); return; } - HTMLTableSectionElement* thead = - static_cast(aTHead); DeleteTHead(); - if (thead) { - nsINode::InsertBefore(*thead, nsINode::GetFirstChild(), aError); + if (aTHead) { + nsINode::InsertBefore(*aTHead, nsINode::GetFirstChild(), aError); } } already_AddRefed CreateTHead(); @@ -79,19 +76,16 @@ public: { return static_cast(GetChild(nsGkAtoms::tfoot)); } - void SetTFoot(nsIDOMHTMLTableSectionElement* aTFoot, ErrorResult& aError) + void SetTFoot(HTMLTableSectionElement* aTFoot, ErrorResult& aError) { - nsCOMPtr content = do_QueryInterface(aTFoot); - if (!content || !content->IsHTML(nsGkAtoms::tfoot)) { + if (!aTFoot->IsHTML(nsGkAtoms::tfoot)) { aError.Throw(NS_ERROR_DOM_HIERARCHY_REQUEST_ERR); return; } - HTMLTableSectionElement* tfoot = - static_cast(aTFoot); DeleteTFoot(); - if (tfoot) { - nsINode::AppendChild(*tfoot, aError); + if (aTFoot) { + nsINode::AppendChild(*aTFoot, aError); } } already_AddRefed CreateTFoot(); diff --git a/content/html/content/src/HTMLTableRowElement.cpp b/content/html/content/src/HTMLTableRowElement.cpp index 1f2a72df5ad..d441834ba9e 100644 --- a/content/html/content/src/HTMLTableRowElement.cpp +++ b/content/html/content/src/HTMLTableRowElement.cpp @@ -7,7 +7,7 @@ #include "mozilla/dom/HTMLTableRowElement.h" #include "nsIDOMHTMLTableElement.h" -#include "nsIDOMHTMLTableSectionElem.h" +#include "nsIDOMHTMLTableSectionElement.h" #include "nsIDOMHTMLTableCellElement.h" #include "nsMappedAttributes.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLTableSectionElement.cpp b/content/html/content/src/HTMLTableSectionElement.cpp index f1e330c2448..d7e717a7a42 100644 --- a/content/html/content/src/HTMLTableSectionElement.cpp +++ b/content/html/content/src/HTMLTableSectionElement.cpp @@ -8,13 +8,9 @@ #include "mozilla/dom/HTMLTableSectionElement.h" #include "nsMappedAttributes.h" #include "nsAttrValueInlines.h" -#include "nsGkAtoms.h" -#include "nsHTMLParts.h" -#include "nsStyleConsts.h" -#include "nsContentList.h" #include "nsRuleData.h" -#include "nsError.h" -#include "nsContentUtils.h" +#include "mozilla/dom/BindingUtils.h" +#include "mozilla/dom/HTMLTableSectionElementBinding.h" NS_IMPL_NS_NEW_HTML_ELEMENT(TableSection) DOMCI_NODE_DATA(HTMLTableSectionElement, mozilla::dom::HTMLTableSectionElement) @@ -24,9 +20,11 @@ namespace dom { // you will see the phrases "rowgroup" and "section" used interchangably -HTMLTableSectionElement::HTMLTableSectionElement(already_AddRefed aNodeInfo) - : nsGenericHTMLElement(aNodeInfo) +JSObject* +HTMLTableSectionElement::WrapNode(JSContext *aCx, JSObject *aScope, + bool *aTriedToWrap) { + return HTMLTableSectionElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); } NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLTableSectionElement) @@ -49,15 +47,76 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLTableSectionElement) NS_IMPL_ELEMENT_CLONE(HTMLTableSectionElement) - -NS_IMPL_STRING_ATTR(HTMLTableSectionElement, Align, align) -NS_IMPL_STRING_ATTR(HTMLTableSectionElement, VAlign, valign) -NS_IMPL_STRING_ATTR(HTMLTableSectionElement, Ch, _char) -NS_IMPL_STRING_ATTR(HTMLTableSectionElement, ChOff, charoff) - +NS_IMETHODIMP +HTMLTableSectionElement::SetAlign(const nsAString& aAlign) +{ + ErrorResult rv; + SetAlign(aAlign, rv); + return rv.ErrorCode(); +} NS_IMETHODIMP -HTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue) +HTMLTableSectionElement::GetAlign(nsAString& aAlign) +{ + nsString align; + GetAlign(align); + aAlign = align; + return NS_OK; +} + +NS_IMETHODIMP +HTMLTableSectionElement::SetVAlign(const nsAString& aVAlign) +{ + ErrorResult rv; + SetVAlign(aVAlign, rv); + return rv.ErrorCode(); +} + +NS_IMETHODIMP +HTMLTableSectionElement::GetVAlign(nsAString& aVAlign) +{ + nsString vAlign; + GetVAlign(vAlign); + aVAlign = vAlign; + return NS_OK; +} + +NS_IMETHODIMP +HTMLTableSectionElement::SetCh(const nsAString& aCh) +{ + ErrorResult rv; + SetCh(aCh, rv); + return rv.ErrorCode(); +} + +NS_IMETHODIMP +HTMLTableSectionElement::GetCh(nsAString& aCh) +{ + nsString ch; + GetCh(ch); + aCh = ch; + return NS_OK; +} + +NS_IMETHODIMP +HTMLTableSectionElement::SetChOff(const nsAString& aChOff) +{ + ErrorResult rv; + SetChOff(aChOff, rv); + return rv.ErrorCode(); +} + +NS_IMETHODIMP +HTMLTableSectionElement::GetChOff(nsAString& aChOff) +{ + nsString chOff; + GetChOff(chOff); + aChOff = chOff; + return NS_OK; +} + +nsIHTMLCollection* +HTMLTableSectionElement::Rows() { if (!mRows) { mRows = new nsContentList(this, @@ -67,29 +126,30 @@ HTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue) false); } - NS_ADDREF(*aValue = mRows); + return mRows; +} + +NS_IMETHODIMP +HTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue) +{ + NS_ADDREF(*aValue = Rows()); return NS_OK; } - -NS_IMETHODIMP -HTMLTableSectionElement::InsertRow(int32_t aIndex, - nsIDOMHTMLElement** aValue) +already_AddRefed +HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError) { - *aValue = nullptr; - if (aIndex < -1) { - return NS_ERROR_DOM_INDEX_SIZE_ERR; + aError.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR); + return nullptr; } - nsCOMPtr rows; - GetRows(getter_AddRefs(rows)); - - uint32_t rowCount; - rows->GetLength(&rowCount); + nsIHTMLCollection* rows = Rows(); + uint32_t rowCount = rows->Length(); if (aIndex > (int32_t)rowCount) { - return NS_ERROR_DOM_INDEX_SIZE_ERR; + aError.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR); + return nullptr; } bool doInsert = (aIndex < int32_t(rowCount)) && (aIndex != -1); @@ -99,53 +159,45 @@ HTMLTableSectionElement::InsertRow(int32_t aIndex, nsContentUtils::NameChanged(mNodeInfo, nsGkAtoms::tr, getter_AddRefs(nodeInfo)); - nsCOMPtr rowContent = NS_NewHTMLTableRowElement(nodeInfo.forget()); + nsRefPtr rowContent = + NS_NewHTMLTableRowElement(nodeInfo.forget()); if (!rowContent) { - return NS_ERROR_OUT_OF_MEMORY; + aError.Throw(NS_ERROR_OUT_OF_MEMORY); + return nullptr; } - nsCOMPtr rowNode(do_QueryInterface(rowContent)); - NS_ASSERTION(rowNode, "Should implement nsIDOMNode!"); - - nsCOMPtr retChild; - - nsresult rv; if (doInsert) { - nsCOMPtr refRow; - rows->Item(aIndex, getter_AddRefs(refRow)); - - rv = InsertBefore(rowNode, refRow, getter_AddRefs(retChild)); - NS_ENSURE_SUCCESS(rv, rv); + nsINode::InsertBefore(*rowContent, rows->Item(aIndex), aError); } else { - rv = AppendChild(rowNode, getter_AddRefs(retChild)); - NS_ENSURE_SUCCESS(rv, rv); + nsINode::AppendChild(*rowContent, aError); } - - if (retChild) { - CallQueryInterface(retChild, aValue); - } - - return NS_OK; + return rowContent.forget(); } NS_IMETHODIMP -HTMLTableSectionElement::DeleteRow(int32_t aValue) +HTMLTableSectionElement::InsertRow(int32_t aIndex, + nsIDOMHTMLElement** aValue) +{ + ErrorResult rv; + nsRefPtr row = InsertRow(aIndex, rv); + return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(row, aValue); +} + +void +HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError) { if (aValue < -1) { - return NS_ERROR_DOM_INDEX_SIZE_ERR; + aError.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR); + return; } - nsCOMPtr rows; - GetRows(getter_AddRefs(rows)); + nsIHTMLCollection* rows = Rows(); - nsresult rv; uint32_t refIndex; if (aValue == -1) { - rv = rows->GetLength(&refIndex); - NS_ENSURE_SUCCESS(rv, rv); - + refIndex = rows->Length(); if (refIndex == 0) { - return NS_OK; + return; } --refIndex; @@ -154,16 +206,21 @@ HTMLTableSectionElement::DeleteRow(int32_t aValue) refIndex = (uint32_t)aValue; } - nsCOMPtr row; - rv = rows->Item(refIndex, getter_AddRefs(row)); - NS_ENSURE_SUCCESS(rv, rv); - + nsINode* row = rows->Item(refIndex); if (!row) { - return NS_ERROR_DOM_INDEX_SIZE_ERR; + aError.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR); + return; } - nsCOMPtr retChild; - return RemoveChild(row, getter_AddRefs(retChild)); + nsINode::RemoveChild(*row, aError); +} + +NS_IMETHODIMP +HTMLTableSectionElement::DeleteRow(int32_t aValue) +{ + ErrorResult rv; + DeleteRow(aValue, rv); + return rv.ErrorCode(); } bool diff --git a/content/html/content/src/HTMLTableSectionElement.h b/content/html/content/src/HTMLTableSectionElement.h index 3f95a7a8068..1f8760de8c8 100644 --- a/content/html/content/src/HTMLTableSectionElement.h +++ b/content/html/content/src/HTMLTableSectionElement.h @@ -6,7 +6,7 @@ #define mozilla_dom_HTMLTableSectionElement_h #include "nsGenericHTMLElement.h" -#include "nsIDOMHTMLTableSectionElem.h" +#include "nsIDOMHTMLTableSectionElement.h" namespace mozilla { namespace dom { @@ -15,7 +15,11 @@ class HTMLTableSectionElement : public nsGenericHTMLElement, public nsIDOMHTMLTableSectionElement { public: - HTMLTableSectionElement(already_AddRefed aNodeInfo); + HTMLTableSectionElement(already_AddRefed aNodeInfo) + : nsGenericHTMLElement(aNodeInfo) + { + SetIsDOMBinding(); + } // nsISupports NS_DECL_ISUPPORTS_INHERITED @@ -32,6 +36,44 @@ public: // nsIDOMHTMLTableSectionElement NS_DECL_NSIDOMHTMLTABLESECTIONELEMENT + nsIHTMLCollection* Rows(); + already_AddRefed + InsertRow(int32_t aIndex, ErrorResult& aError); + void DeleteRow(int32_t aValue, ErrorResult& aError); + + void GetAlign(nsString& aAlign) + { + GetHTMLAttr(nsGkAtoms::align, aAlign); + } + void SetAlign(const nsAString& aAlign, ErrorResult& aError) + { + SetHTMLAttr(nsGkAtoms::align, aAlign, aError); + } + void GetCh(nsString& aCh) + { + GetHTMLAttr(nsGkAtoms::_char, aCh); + } + void SetCh(const nsAString& aCh, ErrorResult& aError) + { + SetHTMLAttr(nsGkAtoms::_char, aCh, aError); + } + void GetChOff(nsString& aChOff) + { + GetHTMLAttr(nsGkAtoms::charoff, aChOff); + } + void SetChOff(const nsAString& aChOff, ErrorResult& aError) + { + SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError); + } + void GetVAlign(nsString& aVAlign) + { + GetHTMLAttr(nsGkAtoms::valign, aVAlign); + } + void SetVAlign(const nsAString& aVAlign, ErrorResult& aError) + { + SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError); + } + virtual bool ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute, const nsAString& aValue, @@ -48,6 +90,8 @@ public: virtual nsIDOMNode* AsDOMNode() { return this; } protected: + JSObject* WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap); + nsRefPtr mRows; }; diff --git a/content/html/content/test/reflect.js b/content/html/content/test/reflect.js index 2d3306d5915..02c667aa032 100644 --- a/content/html/content/test/reflect.js +++ b/content/html/content/test/reflect.js @@ -64,12 +64,9 @@ function reflectString(aParameters) input: [ "accept", "alt", "formTarget", "max", "min", "name", "pattern", "placeholder", "step", "defaultValue" ], link: [ "crossOrigin" ], source: [ "media" ], - tbody: [ "align", "vAlign", "ch" ], td: [ "align", "vAlign", "ch" ], textarea: [ "name", "placeholder" ], - tfoot: [ "align", "vAlign", "ch" ], th: [ "align", "vAlign", "ch" ], - thead: [ "align", "vAlign", "ch" ], tr: [ "align", "vAlign", "ch" ], }; if (!(element.localName in todoAttrs) || todoAttrs[element.localName].indexOf(idlAttr) == -1) { diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 85bf2eb8c2a..c7704e2a496 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -256,7 +256,7 @@ #include "nsIDOMHTMLTableColElement.h" #include "nsIDOMHTMLTableElement.h" #include "nsIDOMHTMLTableRowElement.h" -#include "nsIDOMHTMLTableSectionElem.h" +#include "nsIDOMHTMLTableSectionElement.h" #include "nsIDOMHTMLTextAreaElement.h" #include "nsIDOMHTMLTitleElement.h" #include "nsIDOMHTMLUListElement.h" diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index 6ebeaa59551..1baaafe302c 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -429,6 +429,13 @@ DOMInterfaces = { ] }, +'HTMLTableSectionElement': { + 'hasInstanceInterface': 'nsIDOMHTMLTableSectionElement', + 'resultNotAddRefed': [ + 'rows' + ] +}, + 'HTMLUListElement': { 'headerFile' : 'mozilla/dom/HTMLSharedListElement.h' }, @@ -1117,8 +1124,6 @@ addExternalIface('File') addExternalIface('HitRegionOptions', nativeType='nsISupports') addExternalIface('HTMLHeadElement', nativeType='mozilla::dom::Element') addExternalIface('HTMLCanvasElement', nativeType='mozilla::dom::HTMLCanvasElement') -addExternalIface('HTMLTableSectionElement', - headerFile="nsIDOMHTMLTableSectionElem.h") addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver') addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True) addExternalIface('LockedFile') diff --git a/dom/interfaces/html/Makefile.in b/dom/interfaces/html/Makefile.in index 3cbf57e42c6..b8de12d0484 100644 --- a/dom/interfaces/html/Makefile.in +++ b/dom/interfaces/html/Makefile.in @@ -72,7 +72,7 @@ SDK_XPIDLSRCS = \ nsIDOMHTMLTableColElement.idl \ nsIDOMHTMLTableElement.idl \ nsIDOMHTMLTableRowElement.idl \ - nsIDOMHTMLTableSectionElem.idl \ + nsIDOMHTMLTableSectionElement.idl \ nsIDOMHTMLTextAreaElement.idl \ nsIDOMHTMLTitleElement.idl \ nsIDOMHTMLUListElement.idl \ diff --git a/dom/interfaces/html/nsIDOMHTMLTableSectionElem.idl b/dom/interfaces/html/nsIDOMHTMLTableSectionElement.idl similarity index 100% rename from dom/interfaces/html/nsIDOMHTMLTableSectionElem.idl rename to dom/interfaces/html/nsIDOMHTMLTableSectionElement.idl diff --git a/dom/webidl/HTMLTableElement.webidl b/dom/webidl/HTMLTableElement.webidl index 207e9a6068e..66f31939646 100644 --- a/dom/webidl/HTMLTableElement.webidl +++ b/dom/webidl/HTMLTableElement.webidl @@ -11,8 +11,6 @@ * and create derivative works of this document. */ -interface HTMLTableSectionElement; - interface HTMLTableElement : HTMLElement { attribute HTMLTableCaptionElement? caption; HTMLElement createCaption(); diff --git a/dom/webidl/HTMLTableSectionElement.webidl b/dom/webidl/HTMLTableSectionElement.webidl new file mode 100644 index 00000000000..82428c63574 --- /dev/null +++ b/dom/webidl/HTMLTableSectionElement.webidl @@ -0,0 +1,33 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * http://www.whatwg.org/specs/web-apps/current-work/ + * + * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and + * Opera Software ASA. You are granted a license to use, reproduce + * and create derivative works of this document. + */ + +interface HTMLTableSectionElement : HTMLElement { + readonly attribute HTMLCollection rows; + [Throws] + HTMLElement insertRow(optional long index = -1); + [Throws] + void deleteRow(long index); +/* +}; + +partial interface HTMLTableSectionElement { +*/ + [SetterThrows] + attribute DOMString align; + [SetterThrows] + attribute DOMString ch; + [SetterThrows] + attribute DOMString chOff; + [SetterThrows] + attribute DOMString vAlign; +}; diff --git a/dom/webidl/WebIDL.mk b/dom/webidl/WebIDL.mk index ca59e9577c7..518c75e1822 100644 --- a/dom/webidl/WebIDL.mk +++ b/dom/webidl/WebIDL.mk @@ -75,6 +75,7 @@ webidl_files = \ HTMLSpanElement.webidl \ HTMLTableCaptionElement.webidl \ HTMLTableElement.webidl \ + HTMLTableSectionElement.webidl \ HTMLTitleElement.webidl \ HTMLUListElement.webidl \ ImageData.webidl \ diff --git a/js/xpconnect/src/dom_quickstubs.qsconf b/js/xpconnect/src/dom_quickstubs.qsconf index d8d7b31e6f4..95dd348a7f9 100644 --- a/js/xpconnect/src/dom_quickstubs.qsconf +++ b/js/xpconnect/src/dom_quickstubs.qsconf @@ -195,9 +195,6 @@ members = [ 'nsIDOMHTMLTableRowElement.cells', 'nsIDOMHTMLTableRowElement.deleteCell', 'nsIDOMHTMLTableRowElement.insertCell', - 'nsIDOMHTMLTableSectionElement.rows', - 'nsIDOMHTMLTableSectionElement.insertRow', - 'nsIDOMHTMLTableSectionElement.deleteRow', 'nsIDOMHTMLTextAreaElement.rows', 'nsIDOMHTMLTextAreaElement.name', 'nsIDOMHTMLTextAreaElement.form', @@ -316,9 +313,6 @@ members = [ # a little help. # irregularFilenames = { - # abbreviations - 'nsIDOMHTMLTableSectionElement': 'nsIDOMHTMLTableSectionElem', - # stowaways 'nsIDOMTextMetrics': 'nsIDOMCanvasRenderingContext2D', 'nsIDOMCanvasGradient': 'nsIDOMCanvasRenderingContext2D',