Chromium Code Reviews| 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(); |