Changeset 127597 in webkit
- Timestamp:
- Sep 5, 2012 8:58:09 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r127596 r127597 1 2012-09-05 Kevin Ellis <kevers@chromium.org> 2 3 [chromium] Unify size of popup menu for touch and non-touch. 4 https://bugs.webkit.org/show_bug.cgi?id=95606 5 6 Reviewed by Adam Barth. 7 8 Use minimum height for popup menus entries regardless of whether the 9 popup menu is displayed on a touch screen. Replaces use of touch 10 padding. Height meets minimum size requirement for a low error rate 11 while still looking aesthetic for non-touch. 12 13 Covered by existing tests. 14 15 * platform/chromium/PopupListBox.cpp: 16 (WebCore::PopupListBox::getRowHeight): 17 * platform/chromium/PopupMenuChromium.cpp: 18 (WebCore): 19 * platform/chromium/PopupMenuChromium.h: 20 (PopupMenuChromium): 21 1 22 2012-09-05 Mihnea Ovidenie <mihnea@adobe.com> 2 23 -
trunk/Source/WebCore/platform/chromium/PopupListBox.cpp
r126121 r127597 615 615 int PopupListBox::getRowHeight(int index) 616 616 { 617 int paddingForTouch = 0;618 if (m_settings.deviceSupportsTouch)619 paddingForTouch = PopupMenuChromium::optionPaddingForTouch();620 617 if (index < 0 || m_popupClient->itemStyle(index).isDisplayNone()) 621 618 return PopupMenuChromium::minimumRowHeight(); … … 633 630 int linePaddingHeight = m_popupClient->menuStyle().menuType() == PopupMenuStyle::AutofillPopup ? kLinePaddingHeight : 0; 634 631 int calculatedRowHeight = max(fontHeight, iconHeight) + linePaddingHeight * 2; 635 return (max(calculatedRowHeight, PopupMenuChromium::minimumRowHeight()) + paddingForTouch);632 return max(calculatedRowHeight, PopupMenuChromium::minimumRowHeight()); 636 633 } 637 634 -
trunk/Source/WebCore/platform/chromium/PopupMenuChromium.cpp
r126643 r127597 41 41 namespace WebCore { 42 42 43 int PopupMenuChromium::s_minimumRowHeight = 0; 44 int PopupMenuChromium::s_optionPaddingForTouch = 16; 43 int PopupMenuChromium::s_minimumRowHeight = 28; 45 44 46 45 // The settings used for the drop down menu. -
trunk/Source/WebCore/platform/chromium/PopupMenuChromium.h
r111539 r127597 58 58 static void setMinimumRowHeight(int minimumRowHeight) { s_minimumRowHeight = minimumRowHeight; } 59 59 60 static int optionPaddingForTouch() { return s_optionPaddingForTouch; }61 static void setOptionPaddingForTouch(int optionPaddingForTouch) { s_optionPaddingForTouch = optionPaddingForTouch; }62 63 60 private: 64 61 PopupMenuClient* client() const { return m_popupClient; } … … 68 65 69 66 static int s_minimumRowHeight; 70 static int s_optionPaddingForTouch;71 67 }; 72 68
Note: See TracChangeset
for help on using the changeset viewer.