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

Side by Side Diff: Source/WebCore/platform/chromium/PopupListBox.cpp

Issue 13818030: Added primary input devices setting to blink to allow media queries for hover/pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes Created 7 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/platform/chromium/PopupListBox.h ('k') | Source/WebCore/platform/chromium/PopupMenuChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698