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

Issue 1291263003: Index setter of HTMLSelectElement and HTMLOptionsCollection should do nothing if the requested size… (Closed)

Created:
5 years, 4 months ago by tkent
Modified:
5 years, 4 months ago
Reviewers:
keishi, davve
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, vivekg_samsung
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Index setters of HTMLSelectElement and HTMLOptionsCollection should do nothing if the requested index is too large. They should be consistent with their |length| setters. Also, The index setters and the |length| setters have two behavior changes as follows: * Do not skip processing if an option list has enough size. We don't limit an option list length if the options were parsed by the HTML parser. So an option list length can be larger than maxSelectItems. There's no reason to skip the processing or shrink the length if the list already has enough size. * Show console warnings when they do nothing due to the length limitation. BUG=522802 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200893

Patch Set 1 #

Total comments: 4

Patch Set 2 : Update warning messages #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -24 lines) Patch
M LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/select-max-length.html View 1 chunk +13 lines, -17 lines 0 comments Download
M LayoutTests/fast/forms/select-max-length-expected.txt View 1 1 chunk +13 lines, -4 lines 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 3 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
tkent
Keishi, David, please review this. Context: https://codereview.chromium.org/1292653003
5 years, 4 months ago (2015-08-20 07:25:42 UTC) #2
keishi
LGTM https://codereview.chromium.org/1291263003/diff/1/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/1291263003/diff/1/Source/core/html/HTMLSelectElement.cpp#newcode473 Source/core/html/HTMLSelectElement.cpp:473: String::format("A request to update an option at index=%u ...
5 years, 4 months ago (2015-08-20 07:39:46 UTC) #3
davve
LGTM https://codereview.chromium.org/1291263003/diff/1/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/1291263003/diff/1/Source/core/html/HTMLSelectElement.cpp#newcode471 Source/core/html/HTMLSelectElement.cpp:471: if (index >= length() && index >= maxSelectItems) ...
5 years, 4 months ago (2015-08-20 07:40:43 UTC) #4
tkent
https://codereview.chromium.org/1291263003/diff/1/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/1291263003/diff/1/Source/core/html/HTMLSelectElement.cpp#newcode471 Source/core/html/HTMLSelectElement.cpp:471: if (index >= length() && index >= maxSelectItems) { ...
5 years, 4 months ago (2015-08-20 08:05:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1291263003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1291263003/20001
5 years, 4 months ago (2015-08-20 09:17:41 UTC) #8
commit-bot: I haz the power
5 years, 4 months ago (2015-08-20 10:26:02 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200893

Powered by Google App Engine
This is Rietveld 408576698