Bug 89623 - Selected option is not restored correctly
Summary: Selected option is not restored correctly
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:
: 86855 (view as bug list)
Depends on: 89628
Blocks: 23346
  Show dependency treegraph
 
Reported: 2012-06-20 17:49 PDT by Kent Tamura
Modified: 2012-08-18 17:41 PDT (History)
2 users (show)

See Also:


Attachments
Patch (10.93 KB, patch)
2012-06-22 00:15 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (11.16 KB, patch)
2012-06-24 18:29 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 3 (11.19 KB, patch)
2012-06-24 18:29 PDT, Kent Tamura
morrita: review+
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-06-20 17:49:21 PDT
http://code.google.com/p/chromium/issues/detail?id=125509

If the index of the selected option is changed after <select> parsing, the selection is not restored correctly because we save the selection index.  We need to save the value string for <select>.
Comment 1 Kent Tamura 2012-06-22 00:15:22 PDT
Created attachment 148972 [details]
Patch
Comment 2 Hajime Morrita 2012-06-24 17:55:21 PDT
Comment on attachment 148972 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148972&action=review

> Source/WebCore/ChangeLog:36
> +        Test: fast/forms/select/select-state-restore.html

I hope we have another test which covers option element removal.

> LayoutTests/fast/forms/select/select-state-restore.html:8
> +<p>Test to NOT save state for non-edited controls</p>

Is this message intended?
Comment 3 Kent Tamura 2012-06-24 17:59:35 PDT
Comment on attachment 148972 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148972&action=review

>> Source/WebCore/ChangeLog:36
>> +        Test: fast/forms/select/select-state-restore.html
> 
> I hope we have another test which covers option element removal.

ok, I'll update the test so that it covers removal.

>> LayoutTests/fast/forms/select/select-state-restore.html:8
>> +<p>Test to NOT save state for non-edited controls</p>
> 
> Is this message intended?

Oh, it's a copypasta.
I'll update it.
Comment 4 Kent Tamura 2012-06-24 18:29:03 PDT
Created attachment 149218 [details]
Patch 2
Comment 5 Kent Tamura 2012-06-24 18:29:55 PDT
Created attachment 149219 [details]
Patch 3

Remove TABs
Comment 6 Kent Tamura 2012-06-24 18:47:51 PDT
Committed r121128: <http://trac.webkit.org/changeset/121128>
Comment 7 Kent Tamura 2012-08-18 17:41:03 PDT
*** Bug 86855 has been marked as a duplicate of this bug. ***