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

Unified Diff: webkit/port/platform/chromium/PopupMenuChromium.cpp

Issue 16001: Fixed crash when clicking empty select element.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/platform/chromium/PopupMenuChromium.cpp
===================================================================
--- webkit/port/platform/chromium/PopupMenuChromium.cpp (revision 7315)
+++ webkit/port/platform/chromium/PopupMenuChromium.cpp (working copy)
@@ -893,7 +893,11 @@
int PopupListBox::getRowHeight(int index)
{
- return m_popupClient->itemStyle(index).font().height();
+ if (index >= 0) {
+ return m_popupClient->itemStyle(index).font().height();
+ } else {
+ return 0;
+ }
}
IntRect PopupListBox::getRowBounds(int index)
@@ -1035,9 +1039,6 @@
windowHeight += rowHeight;
}
- if (windowHeight == 0)
- windowHeight = min(getRowHeight(-1), kMaxHeight);
darin (slow to review) 2008/12/20 18:24:25 it is not obvious to me why you are removing this
-
// Set our widget and scrollable contents sizes.
int scrollbarWidth = 0;
if (m_visibleRows < numItems())
@@ -1055,7 +1056,7 @@
resize(windowWidth, windowHeight);
setContentsSize(IntSize(contentWidth, getRowBounds(numItems() - 1).bottom()));
-
+
if (hostWindow())
scrollToRevealSelection();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698