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

Unified Diff: Source/WebCore/platform/chromium/PopupListBox.cpp

Issue 11099038: Merge 130513 - [chromium] Only inflate the height of rows in a popup menu when a touch device is de… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 months 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 | Source/WebCore/platform/chromium/PopupMenuChromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/chromium/PopupListBox.cpp
===================================================================
--- Source/WebCore/platform/chromium/PopupListBox.cpp (revision 130911)
+++ Source/WebCore/platform/chromium/PopupListBox.cpp (working copy)
@@ -614,12 +614,16 @@
int PopupListBox::getRowHeight(int index)
{
+ int minimumHeight = PopupMenuChromium::minimumRowHeight();
+ if (m_settings.deviceSupportsTouch)
+ minimumHeight = max(minimumHeight, PopupMenuChromium::optionRowHeightForTouch());
+
if (index < 0 || m_popupClient->itemStyle(index).isDisplayNone())
- return PopupMenuChromium::minimumRowHeight();
+ return minimumHeight;
// Separator row height is the same size as itself.
if (m_popupClient->itemIsSeparator(index))
- return max(separatorHeight, (PopupMenuChromium::minimumRowHeight()));
+ return max(separatorHeight, minimumHeight);
String icon = m_popupClient->itemIcon(index);
RefPtr<Image> image(Image::loadPlatformResource(icon.utf8().data()));
@@ -629,7 +633,7 @@
int linePaddingHeight = m_popupClient->menuStyle().menuType() == PopupMenuStyle::AutofillPopup ? kLinePaddingHeight : 0;
int calculatedRowHeight = max(fontHeight, iconHeight) + linePaddingHeight * 2;
- return max(calculatedRowHeight, PopupMenuChromium::minimumRowHeight());
+ return max(calculatedRowHeight, minimumHeight);
}
IntRect PopupListBox::getRowBounds(int index)
« no previous file with comments | « no previous file | Source/WebCore/platform/chromium/PopupMenuChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698