#include "wtf/CurrentTime.h"
#include <limits>
-namespace WebCore {
+namespace blink {
using namespace WTF::Unicode;
+using namespace WebCore;
const int PopupListBox::defaultMaxHeight = 500;
static const int maxVisibleRows = 20;
static const int separatorPadding = 4;
static const int separatorHeight = 1;
+static const int minRowHeight = 0;
+static const int optionRowHeightForTouch = 28;
void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowIndex)
{
// Bold-ify labels (ie, an <optgroup> heading).
FontDescription d = itemFont.fontDescription();
d.setWeight(FontWeightBold);
- Font font(d, itemFont.letterSpacing(), itemFont.wordSpacing());
+ Font font(d);
font.update(0);
return font;
}
int PopupListBox::getRowHeight(int index)
{
- int minimumHeight = PopupMenuChromium::minimumRowHeight();
- if (m_deviceSupportsTouch)
- minimumHeight = max(minimumHeight, PopupMenuChromium::optionRowHeightForTouch());
+ int minimumHeight = m_deviceSupportsTouch ? optionRowHeightForTouch : minRowHeight;
if (index < 0 || m_popupClient->itemStyle(index).isDisplayNone())
return minimumHeight;
return height();
}
-} // namespace WebCore
+} // namespace blink