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

Issue 16001: Fixed crash when clicking empty select element.... (Closed)

Created:
12 years ago by Mohamed Mansour (USE mhm)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fixed crash when clicking empty select element. BUG=4334 (http://crbug.com/4334) TEST=<select></select> I believe this is not needed: if (windowHeight == 0) windowHeight = min(getRowHeight(-1), kMaxHeight); windowHeight is dependent on the number of items within the popup, if you have no items within the popup, it returns 0. I don't understand why we need to do "min(getRowHeight(-1), kMaxHeight)" when its 0, that doesn't make sense to me. Since getRowHeight gets the height of that item@index, everyone knows there are no item for index -1 (hence crash). :x

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M webkit/port/platform/chromium/PopupMenuChromium.cpp View 3 chunks +6 lines, -5 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
Mohamed Mansour (USE mhm)
12 years ago (2008-12-20 17:08:30 UTC) #1
Mohamed Mansour (USE mhm)
changed reviewers (IRC)
12 years ago (2008-12-20 18:16:42 UTC) #2
darin (slow to review)
http://codereview.chromium.org/16001/diff/1/2 File webkit/port/platform/chromium/PopupMenuChromium.cpp (left): http://codereview.chromium.org/16001/diff/1/2#oldcode1039 Line 1039: windowHeight = min(getRowHeight(-1), kMaxHeight); it is not obvious ...
12 years ago (2008-12-20 18:24:24 UTC) #3
Mohamed Mansour (USE mhm)
updated CL why I believe its not needed
12 years ago (2008-12-20 18:32:25 UTC) #4
darin (slow to review)
makes sense. LGTM!
12 years ago (2008-12-20 18:38:22 UTC) #5
darin (slow to review)
committed as r7347
12 years ago (2008-12-20 18:42:35 UTC) #6
Peter Kasting
On 2008/12/20 18:42:35, darin wrote: > committed as r7347 I'm late to the party here, ...
12 years ago (2008-12-20 22:30:49 UTC) #7
Mohamed Mansour (USE mhm)
12 years ago (2008-12-21 02:47:12 UTC) #8
On 2008/12/20 22:30:49, pkasting wrote:
> I'm late to the party here, but note that files in port are WebKit style, and
> WebKit style forbids {} on single-line conditional arms (they're stricter than
> google3 style on this one).  We should probably do a followup to keep this
> WebKit-style-compliant (I'd just do this but am not at my work machine).

Hmm, I could clean up the code and use webkit style, I didn't know if port was
supposed to be webkit cause it is just an interface to WebCore ( i thought) and
I was following the other example in the same file.

Do you want me to open another review and fix the style ?

Powered by Google App Engine
This is Rietveld 408576698