Bug 89623

Summary: Selected option is not restored correctly
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: e.ryabtsev, morrita
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 89628    
Bug Blocks: 23346    
Attachments:
Description Flags
Patch
none
Patch 2
none
Patch 3 morrita: review+

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. ***