Comment #19 on issue 4334 by m0.interactive: Crash when clicking empty  
select element.
http://code.google.com/p/chromium/issues/detail?id=4334

Alright here is the patch:
http://codereview.chromium.org/16001

It turned out to be a problem within RenderMenuList::itemStyle where it  
renders each
item within the select based on index, select->listItems()[listIndex], I  
believe in
WebCore they made sure that index is not less than 0, but somehow when we  
did the
port, we pass in a -1 when there are no items.

The reason why we pass in a -1 is because we told it too, getRowHeight(-1),  
that
returns the row height for that item, but we have no item. So I just said  
return 0
for that height.

I believe this is not needed:
1038     if (windowHeight == 0) 
1039         windowHeight = min(getRowHeight(-1), kMaxHeight);

There is one thing which I am not certain, when you click on the empty  
item, you will
see a 1px border under it.

I like it, but maybe other people wont.



Attachments:
        empty_select_test.jpg  1.0 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-bugs" group.
To post to this group, send email to chromium-bugs@googlegroups.com
To unsubscribe from this group, send email to 
chromium-bugs+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/chromium-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to