Closed Bug 913920 Opened 11 years ago Closed 11 years ago

Implement HTMLFormControlsCollection

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

(Depends on 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

No description provided.
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 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+
(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.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
(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 → ---
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
Depends on: 1096628
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: