Closed
Bug 913920
Opened 11 years ago
Closed 11 years ago
Implement HTMLFormControlsCollection
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
(Depends on 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
202.32 KB,
patch
|
dzbarsky
:
review+
|
Details | Diff | Splinter Review |
10.20 KB,
patch
|
dzbarsky
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Updated•11 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #810713 -
Flags: review?(dzbarsky)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #810714 -
Flags: review?(dzbarsky)
Comment 3•11 years ago
|
||
Comment on attachment 810713 [details] [diff] [review] Part a: Rename nsFormControlList and move it to its own files Review of attachment 810713 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/html/content/src/HTMLFormControlsCollection.cpp @@ +75,2 @@ > { > SetIsDOMBinding(); If you're doing this can you also change the colon to be on the next line? Seems odd otherwise. ::: content/html/content/src/HTMLFormElement.cpp @@ +979,2 @@ > { > NS_ASSERTION(aElement1 != aElement2, "Comparing a form control to itself"); Why are you changing these?
Attachment #810713 -
Flags: review?(dzbarsky) → review+
Comment 4•11 years ago
|
||
Comment on attachment 810714 [details] [diff] [review] Part b: Implement HTMLFormControlsCollection and use it for HTMLFormElement.elements Review of attachment 810714 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/html/content/src/HTMLFormControlsCollection.cpp @@ +375,5 @@ > + if (nsCOMPtr<Element> element = do_QueryInterface(item)) { > + aResult.SetValue().SetAsElement() = element; > + return; > + } > + if (nsCOMPtr<nsINodeList> nodelist = do_QueryInterface(item)) { This seems a little sad, but I guess you have to implement nsIHTMLCollection? ::: content/html/content/test/test_formelements.html @@ +50,5 @@ > is(names[7], "y", "Entry 8") > is(names[8], "z", "Entry 9") > is(names[9], "something", "Entry 10") > +is(names[10], "namedItem", "Entry 11") > +is(names[11], "item", "Entry 12") OOC, what determines the order here?
Attachment #810714 -
Flags: review?(dzbarsky) → review+
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to David Zbarsky (:dzbarsky) from comment #4) > Comment on attachment 810714 [details] [diff] [review] > Part b: Implement HTMLFormControlsCollection and use it for > HTMLFormElement.elements > > Review of attachment 810714 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: content/html/content/src/HTMLFormControlsCollection.cpp > @@ +375,5 @@ > > + if (nsCOMPtr<Element> element = do_QueryInterface(item)) { > > + aResult.SetValue().SetAsElement() = element; > > + return; > > + } > > + if (nsCOMPtr<nsINodeList> nodelist = do_QueryInterface(item)) { > > This seems a little sad, but I guess you have to implement nsIHTMLCollection? > > ::: content/html/content/test/test_formelements.html > @@ +50,5 @@ > > is(names[7], "y", "Entry 8") > > is(names[8], "z", "Entry 9") > > is(names[9], "something", "Entry 10") > > +is(names[10], "namedItem", "Entry 11") > > +is(names[11], "item", "Entry 12") > > OOC, what determines the order here? I think it walks the proto chain, and then... something.
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d1ff09ace32b https://hg.mozilla.org/mozilla-central/rev/0779196218d2
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to David Zbarsky (:dzbarsky) from comment #3) > Comment on attachment 810713 [details] [diff] [review] > Part a: Rename nsFormControlList and move it to its own files > > Review of attachment 810713 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: content/html/content/src/HTMLFormElement.cpp > @@ +979,2 @@ > > { > > NS_ASSERTION(aElement1 != aElement2, "Comparing a form control to itself"); > > Why are you changing these? Seems like I never answered this; because those functions are called from both HTMLFormElement.cpp and HTMLFormControlsCollection.cpp now.
Target Milestone: mozilla27 → ---
Comment 8•11 years ago
|
||
Reverting the target milestone as I believe it was removed by error. (and Ms2ger not on IRC to double-check). Remove it again if I'm mistaken.
Target Milestone: --- → mozilla27
Comment 9•10 years ago
|
||
Doc updated: https://developer.mozilla.org/en-US/Firefox/Releases/27 https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection.namedItem
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•