forked from mirrors/gecko-dev
Bug 1066940 - Align return type of HTMLFormElement::elements with spec. r=dom-core,webidl,peterv
Differential Revision: https://phabricator.services.mozilla.com/D188246
This commit is contained in:
parent
950a3c620d
commit
1273773f91
5 changed files with 7 additions and 5 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include "nsContentList.h"
|
||||
#include "mozilla/dom/HTMLInputElement.h"
|
||||
#include "mozilla/dom/HTMLTextAreaElement.h"
|
||||
#include "mozilla/dom/HTMLFormControlsCollection.h"
|
||||
#include "nsIFormControl.h"
|
||||
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
|
|
@ -48,7 +49,7 @@ void HTMLFormAccessible::DOMAttributeChanged(int32_t aNameSpaceID,
|
|||
if (aAttribute == nsGkAtoms::autocomplete) {
|
||||
dom::HTMLFormElement* formEl = dom::HTMLFormElement::FromNode(mContent);
|
||||
|
||||
nsIHTMLCollection* controls = formEl->Elements();
|
||||
HTMLFormControlsCollection* controls = formEl->Elements();
|
||||
uint32_t length = controls->Length();
|
||||
for (uint32_t i = 0; i < length; i++) {
|
||||
if (LocalAccessible* acc = mDoc->GetAccessible(controls->Item(i))) {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ class HTMLFormControlsCollection final : public nsIHTMLCollection,
|
|||
nsTArray<RefPtr<nsGenericHTMLFormElement>>& aControls) const;
|
||||
|
||||
// nsWrapperCache
|
||||
using nsWrapperCache::GetWrapper;
|
||||
using nsWrapperCache::GetWrapperPreserveColor;
|
||||
using nsWrapperCache::PreserveWrapper;
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ nsDOMTokenList* HTMLFormElement::RelList() {
|
|||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLFormElement)
|
||||
|
||||
nsIHTMLCollection* HTMLFormElement::Elements() { return mControls; }
|
||||
HTMLFormControlsCollection* HTMLFormElement::Elements() { return mControls; }
|
||||
|
||||
void HTMLFormElement::BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValue* aValue, bool aNotify) {
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ class HTMLFormElement final : public nsGenericHTMLElement,
|
|||
|
||||
// it's only out-of-line because the class definition is not available in the
|
||||
// header
|
||||
nsIHTMLCollection* Elements();
|
||||
HTMLFormControlsCollection* Elements();
|
||||
|
||||
int32_t Length();
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ interface HTMLFormElement : HTMLElement {
|
|||
[PutForwards=value]
|
||||
readonly attribute DOMTokenList relList;
|
||||
|
||||
[Constant]
|
||||
readonly attribute HTMLCollection elements;
|
||||
[SameObject]
|
||||
readonly attribute HTMLFormControlsCollection elements;
|
||||
[Pure]
|
||||
readonly attribute long length;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue