Last Comment Bug 707448 - Cleanup nsHTMLFormElement::DoSubmitOrReset a bit
: Cleanup nsHTMLFormElement::DoSubmitOrReset a bit
Status: RESOLVED FIXED
[qa-]
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-03 09:49 PST by :Ms2ger (⌚ UTC+1/+2)
Modified: 2011-12-18 07:10 PST (History)
1 user (show)
Ms2ger: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (1.40 KB, patch)
2011-12-03 09:49 PST, :Ms2ger (⌚ UTC+1/+2)
mounir: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2011-12-03 09:49:32 PST
Created attachment 578845 [details] [diff] [review]
Patch v1

The assigning to rv is kind of silly.
Comment 1 Mounir Lamouri (:mounir) 2011-12-04 13:26:55 PST
Comment on attachment 578845 [details] [diff] [review]
Patch v1

Review of attachment 578845 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks :)

::: content/html/content/src/nsHTMLFormElement.cpp
@@ +691,2 @@
>    }
> +  return NS_OK;

nit: you could add a warning/error/assertion if we get there: we should only get NS_FORM_RESET and NS_FORM_SUBMIT messages.

@@ +696,5 @@
>  nsHTMLFormElement::DoReset()
>  {
>    // JBK walk the elements[] array instead of form frame controls - bug 34297
>    PRUint32 numElements = GetElementCount();
> +  for (PRUint32 elementX = 0; elementX < numElements; elementX++) {

nit: while changing this line, change |elementX++| to |++elementX|.
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2011-12-18 07:10:34 PST
https://hg.mozilla.org/mozilla-central/rev/fa6dc855be00

Note You need to log in before you can comment on or make changes to this bug.