Bug 91209 - Form state restore: Need to identify a form by its content
Summary: Form state restore: Need to identify a form by its content
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on: 89962 91480 91594
Blocks: 23346
  Show dependency treegraph
 
Reported: 2012-07-13 02:51 PDT by Kent Tamura
Modified: 2012-07-19 21:48 PDT (History)
1 user (show)

See Also:


Attachments
Patch (9.50 KB, patch)
2012-07-19 01:14 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2012-07-13 02:51:25 PDT
We'd like to resolve http://code.google.com/p/chromium/issues/detail?id=34351#c10 .

Suppose that the content of page-A is the following at frist:
----------------------------------------------------------------
<form action="PostAction" method="POST">
  <input type="hidden" naem="task" value="AAA">
  <input name="aaa_input1">
  <input name="aaa_input2>
</form>

<form action="PostAction" method="POST">
  <input type="hidden" naem="task" value="BBB">
  <input name="bbb_input1">
  <input name="bbb_input2>
</form>

<form action="PostAction" method="POST">
  <input type="hidden" naem="task" value="CCC">
  <input name="ccc_input1">
  <input name="ccc_input2>
</form>
----------------------------------------------------------------

1. Edit some fields
2. Navigate to another page
3. Browser cache for page-A was cleared, and the page-A is updated to the following:

----------------------------------------------------------------
<form action="PostAction" method="POST">
  <input type="hidden" naem="task" value="AAA">
  <input name="aaa_input1">
  <input name="aaa_input2>
</form>

<form action="PostAction" method="POST">
  <input type="hidden" naem="task" value="CCC">
  <input name="ccc_input1">
  <input name="ccc_input2>
</form>
----------------------------------------------------------------

In the current algorithm, we tries to restore form control states for the ex-2nd form to the current 2nd form.
In order to fix this issue, we need to identify a form by its content.
Comment 1 Kent Tamura 2012-07-19 01:14:00 PDT
Created attachment 153206 [details]
Patch
Comment 2 Hajime Morrita 2012-07-19 21:45:40 PDT
Comment on attachment 153206 [details]
Patch

Looks OK.
Comment 3 Kent Tamura 2012-07-19 21:48:31 PDT
Comment on attachment 153206 [details]
Patch

Clearing flags on attachment: 153206

Committed r123178: <http://trac.webkit.org/changeset/123178>
Comment 4 Kent Tamura 2012-07-19 21:48:36 PDT
All reviewed patches have been landed.  Closing bug.