Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 541693003: HTMLSelectElement does not include selected index/indices while saving state (Closed)

Created:
6 years, 3 months ago by spartha
Modified:
6 years, 3 months ago
Reviewers:
tkent, keishi
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

HTMLSelectElement does not include selected index/indices while saving state Since index is not part of the FormControl state for select, there is no way to restore it to proper index if there are duplicate values. This patch includes the index in the FormControl state for select. BUG=401506 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181883

Patch Set 1 #

Patch Set 2 : Unit Test Case added #

Patch Set 3 : Updated #

Patch Set 4 : Updated #

Total comments: 18

Patch Set 5 : Updated +Review #

Patch Set 6 : #

Total comments: 6

Patch Set 7 : Updated #

Total comments: 2

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -12 lines) Patch
M Source/core/core.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 2 3 4 5 6 7 2 chunks +25 lines, -11 lines 0 comments Download
A Source/core/html/HTMLSelectElementTest.cpp View 1 2 3 4 5 6 1 chunk +105 lines, -0 lines 0 comments Download
M Source/core/html/forms/FormController.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (3 generated)
spartha
PTAL!
6 years, 3 months ago (2014-09-08 10:06:02 UTC) #2
tkent
https://codereview.chromium.org/541693003/diff/60001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/541693003/diff/60001/Source/core/html/HTMLSelectElement.cpp#newcode1042 Source/core/html/HTMLSelectElement.cpp:1042: state.append(String::number(i)); Because you change the format of the state, ...
6 years, 3 months ago (2014-09-09 02:14:46 UTC) #3
spartha
https://codereview.chromium.org/541693003/diff/60001/Source/core/html/HTMLSelectElementTest.cpp File Source/core/html/HTMLSelectElementTest.cpp (right): https://codereview.chromium.org/541693003/diff/60001/Source/core/html/HTMLSelectElementTest.cpp#newcode50 Source/core/html/HTMLSelectElementTest.cpp:50: // Test passes if the restored state is not ...
6 years, 3 months ago (2014-09-09 08:08:05 UTC) #4
spartha
On 2014/09/09 02:14:46, tkent (overloaded) wrote: > https://codereview.chromium.org/541693003/diff/60001/Source/core/html/HTMLSelectElement.cpp#newcode1042 > Source/core/html/HTMLSelectElement.cpp:1042: state.append(String::number(i)); > Because you change ...
6 years, 3 months ago (2014-09-09 08:48:53 UTC) #5
tkent
On 2014/09/09 08:48:53, spartha wrote: > > Because you change the format of the state, ...
6 years, 3 months ago (2014-09-09 08:56:52 UTC) #6
spartha
https://codereview.chromium.org/541693003/diff/60001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/541693003/diff/60001/Source/core/html/HTMLSelectElement.cpp#newcode1042 Source/core/html/HTMLSelectElement.cpp:1042: state.append(String::number(i)); On 2014/09/09 02:14:45, tkent (overloaded) wrote: > Because ...
6 years, 3 months ago (2014-09-09 11:09:57 UTC) #7
tkent
https://codereview.chromium.org/541693003/diff/100001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/541693003/diff/100001/Source/core/html/HTMLSelectElement.cpp#newcode1087 Source/core/html/HTMLSelectElement.cpp:1087: if (isHTMLOptionElement(items[index]) && valueAtIndex(index) == state[0]) { This line ...
6 years, 3 months ago (2014-09-09 23:55:24 UTC) #8
spartha
https://codereview.chromium.org/541693003/diff/100001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/541693003/diff/100001/Source/core/html/HTMLSelectElement.cpp#newcode1087 Source/core/html/HTMLSelectElement.cpp:1087: if (isHTMLOptionElement(items[index]) && valueAtIndex(index) == state[0]) { On 2014/09/09 ...
6 years, 3 months ago (2014-09-10 06:33:34 UTC) #9
tkent
https://codereview.chromium.org/541693003/diff/140001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/541693003/diff/140001/Source/core/html/HTMLSelectElement.cpp#newcode1087 Source/core/html/HTMLSelectElement.cpp:1087: if (index < itemsSize && isHTMLOptionElement(items[index]) && valueAtIndex(index) == ...
6 years, 3 months ago (2014-09-10 23:35:50 UTC) #11
spartha
https://codereview.chromium.org/541693003/diff/140001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/541693003/diff/140001/Source/core/html/HTMLSelectElement.cpp#newcode1087 Source/core/html/HTMLSelectElement.cpp:1087: if (index < itemsSize && isHTMLOptionElement(items[index]) && valueAtIndex(index) == ...
6 years, 3 months ago (2014-09-12 05:46:08 UTC) #12
tkent
lgtm
6 years, 3 months ago (2014-09-12 06:30:40 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/541693003/160001
6 years, 3 months ago (2014-09-12 06:30:50 UTC) #15
commit-bot: I haz the power
Committed patchset #8 (id:160001) as 181883
6 years, 3 months ago (2014-09-12 07:50:58 UTC) #16
Michael van Ouwerkerk
On 2014/09/12 07:50:58, I haz the power (commit-bot) wrote: > Committed patchset #8 (id:160001) as ...
6 years, 3 months ago (2014-09-12 15:30:36 UTC) #17
Michael van Ouwerkerk
6 years, 3 months ago (2014-09-12 15:31:17 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:160001) has been created in
https://codereview.chromium.org/566913002/ by mvanouwerkerk@chromium.org.

The reason for reverting is: Looks like this test crashes consistently on
Android Tests (dbg) starting at this build:
http://build.chromium.org/p/chromium.webkit/builders/Android%20Tests%20%28dbg...
.

Powered by Google App Engine
This is Rietveld 408576698