| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 } | 619 } |
| 620 | 620 |
| 621 void PopupListBox::setOriginalIndex(int index) | 621 void PopupListBox::setOriginalIndex(int index) |
| 622 { | 622 { |
| 623 m_originalIndex = m_selectedIndex = index; | 623 m_originalIndex = m_selectedIndex = index; |
| 624 } | 624 } |
| 625 | 625 |
| 626 int PopupListBox::getRowHeight(int index) | 626 int PopupListBox::getRowHeight(int index) |
| 627 { | 627 { |
| 628 int minimumHeight = PopupMenuChromium::minimumRowHeight(); | 628 int minimumHeight = PopupMenuChromium::minimumRowHeight(); |
| 629 if (m_settings.deviceSupportsTouch) | 629 if (m_settings.primaryInputIncludesTouch) |
| 630 minimumHeight = max(minimumHeight, PopupMenuChromium::optionRowHeightFor
Touch()); | 630 minimumHeight = max(minimumHeight, PopupMenuChromium::optionRowHeightFor
Touch()); |
| 631 | 631 |
| 632 if (index < 0 || m_popupClient->itemStyle(index).isDisplayNone()) | 632 if (index < 0 || m_popupClient->itemStyle(index).isDisplayNone()) |
| 633 return minimumHeight; | 633 return minimumHeight; |
| 634 | 634 |
| 635 // Separator row height is the same size as itself. | 635 // Separator row height is the same size as itself. |
| 636 if (m_popupClient->itemIsSeparator(index)) | 636 if (m_popupClient->itemIsSeparator(index)) |
| 637 return max(separatorHeight, minimumHeight); | 637 return max(separatorHeight, minimumHeight); |
| 638 | 638 |
| 639 String icon = m_popupClient->itemIcon(index); | 639 String icon = m_popupClient->itemIcon(index); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 { | 919 { |
| 920 return numItems() && IntRect(0, 0, width(), height()).contains(point); | 920 return numItems() && IntRect(0, 0, width(), height()).contains(point); |
| 921 } | 921 } |
| 922 | 922 |
| 923 int PopupListBox::popupContentHeight() const | 923 int PopupListBox::popupContentHeight() const |
| 924 { | 924 { |
| 925 return height(); | 925 return height(); |
| 926 } | 926 } |
| 927 | 927 |
| 928 } // namespace WebCore | 928 } // namespace WebCore |
| OLD | NEW |