Closed Bug 463486 Opened 16 years ago Closed 15 years ago

Form history shouldn't remember the default values of unmodified fields.

Categories

(Toolkit :: Form Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: Dolske, Assigned: Dolske)

References

Details

(Keywords: fixed1.9.1, verified1.9.0.11)

Attachments

(1 file)

Default/unmodified form field values shouldn't be remembered by form manager. If the user didn't enter the text, it seems odd to remember it. This may also help cut down the volume of form data that's remembered.

For example, take a form like:

<form action="http://example.com">
  <input name="name-A" value="value-A">
  <button type='submit'>Submit</button>
</form>

Submitting this (without changing the input's value) will add name-A/value-A to the form history.

Inputs have a .defaultValue property that we can check to see if the field was changed from the default value.
Assignee: nobody → dolske
Summary: Form history shouldn't remember unmodified fields. → Form history shouldn't remember the default values of unmodified fields.
Target Milestone: --- → mozilla1.9.2a1
Attached patch Patch v.1Splinter Review
Simple change, added complete tests for what satchel does upon form submission (since there were none).
Attachment #365717 - Flags: review?(gavin.sharp)
Attachment #365717 - Flags: review?(gavin.sharp) → review+
Comment on attachment 365717 [details] [diff] [review]
Patch v.1

>diff --git a/toolkit/components/satchel/test/test_form_submission.html b/toolkit/components/satchel/test/test_form_submission.html

>+    is(numSubmittedForms, 12, "Ensuring all forms were submitted.");;

;; o_O
Comment on attachment 365717 [details] [diff] [review]
Patch v.1

I'd like to get this in 3.0.9 too, since it further helps reduce the volume of form history we store, and increment usage counts for form data the use isn't actually entering.
Attachment #365717 - Flags: approval1.9.1?
Attachment #365717 - Flags: approval1.9.0.9?
Pushed http://hg.mozilla.org/mozilla-central/rev/c7d82a90eca1
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment on attachment 365717 [details] [diff] [review]
Patch v.1

a191=beltzner
Attachment #365717 - Flags: approval1.9.1? → approval1.9.1+
Comment on attachment 365717 [details] [diff] [review]
Patch v.1

1.9.0.9 is in code-freeze (and was before we inserted FF3.0.8), moving request to next release.
Attachment #365717 - Flags: approval1.9.0.9? → approval1.9.0.10?
Attachment #365717 - Flags: approval1.9.0.10? → approval1.9.0.10+
Comment on attachment 365717 [details] [diff] [review]
Patch v.1

Hello, tests!

Approved for 1.9.0.10. a=ss
Checked into 1.9.0.10:

Checking in toolkit/components/satchel/src/nsStorageFormHistory.cpp;
  new revision: 1.25; previous revision: 1.24
Checking in toolkit/components/satchel/test/test_form_submission.html;
  new revision: 1.2; previous revision: 1.1
Keywords: fixed1.9.0.10
Verified for 1.9.0.11.
Depends on: 1642570
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: