X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fweb%2FPopupListBox.cpp;h=44502e0fbc61182e200d0757d9c0d4bf3fc4545c;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=bc7fb83b58f5d2228eb048c56c550b6005f42f91;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/web/PopupListBox.cpp b/src/third_party/WebKit/Source/web/PopupListBox.cpp index bc7fb83..44502e0 100644 --- a/src/third_party/WebKit/Source/web/PopupListBox.cpp +++ b/src/third_party/WebKit/Source/web/PopupListBox.cpp @@ -57,9 +57,10 @@ #include "wtf/CurrentTime.h" #include -namespace WebCore { +namespace blink { using namespace WTF::Unicode; +using namespace WebCore; const int PopupListBox::defaultMaxHeight = 500; static const int maxVisibleRows = 20; @@ -374,6 +375,8 @@ void PopupListBox::paint(GraphicsContext* gc, const IntRect& rect) 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) { @@ -468,7 +471,7 @@ Font PopupListBox::getRowFont(int rowIndex) // Bold-ify labels (ie, an heading). FontDescription d = itemFont.fontDescription(); d.setWeight(FontWeightBold); - Font font(d, itemFont.letterSpacing(), itemFont.wordSpacing()); + Font font(d); font.update(0); return font; } @@ -564,9 +567,7 @@ void PopupListBox::setOriginalIndex(int index) 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; @@ -823,4 +824,4 @@ int PopupListBox::popupContentHeight() const return height(); } -} // namespace WebCore +} // namespace blink