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

Issue 761463002: Fix listbox selections with only disabled options. (Closed)

Created:
6 years ago by reni
Modified:
6 years ago
Reviewers:
keishi
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, kouhei (in TOK)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Fix listbox selections with only disabled options. blink::HTMLSelectElement::updateListBoxSelection relies on that a list contains at least one item and that the index of any active selection anchor is a nonnegative integer. However, if we have a selection with only a disabled option then this assumption and the checking assertion fail. But since updateListBoxSelection is aware of such situations we can simply remove the assertion check and use integers as indices instead of the unsigned variables. BUG=436454 R=keishi Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186781

Patch Set 1 #

Total comments: 1

Patch Set 2 : Updated patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -5 lines) Patch
A LayoutTests/fast/html/crash-on-invalid-selection-index.html View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/html/crash-on-invalid-selection-index-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
reni
6 years ago (2014-11-25 15:39:46 UTC) #2
Timothy Loh
I haven't worked with this area of the code base before, removing myself from the ...
6 years ago (2014-11-25 23:14:00 UTC) #3
reni
Could someone take a look at this please?
6 years ago (2014-12-01 19:06:39 UTC) #5
keishi
https://codereview.chromium.org/761463002/diff/1/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/761463002/diff/1/Source/core/html/HTMLSelectElement.cpp#newcode617 Source/core/html/HTMLSelectElement.cpp:617: if (m_activeSelectionAnchorIndex < 0) I think updateListBoxSelection should just ...
6 years ago (2014-12-02 02:40:13 UTC) #6
reni
6 years ago (2014-12-09 13:33:32 UTC) #7
keishi
lgtm
6 years ago (2014-12-09 13:58:43 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/761463002/20001
6 years ago (2014-12-09 13:58:54 UTC) #10
reni
On 2014/12/09 13:58:43, keishi wrote: > lgtm Thanks!
6 years ago (2014-12-09 14:32:01 UTC) #11
commit-bot: I haz the power
6 years ago (2014-12-09 14:43:47 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=186781

Powered by Google App Engine
This is Rietveld 408576698