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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 type = PopupItem::TypeSeparator; | 706 type = PopupItem::TypeSeparator; |
707 else if (m_popupClient->itemIsLabel(i)) | 707 else if (m_popupClient->itemIsLabel(i)) |
708 type = PopupItem::TypeGroup; | 708 type = PopupItem::TypeGroup; |
709 else | 709 else |
710 type = PopupItem::TypeOption; | 710 type = PopupItem::TypeOption; |
711 m_items.append(new PopupItem(m_popupClient->itemText(i), type)); | 711 m_items.append(new PopupItem(m_popupClient->itemText(i), type)); |
712 m_items[i]->enabled = isSelectableItem(i); | 712 m_items[i]->enabled = isSelectableItem(i); |
713 PopupMenuStyle style = m_popupClient->itemStyle(i); | 713 PopupMenuStyle style = m_popupClient->itemStyle(i); |
714 m_items[i]->textDirection = style.textDirection(); | 714 m_items[i]->textDirection = style.textDirection(); |
715 m_items[i]->hasTextDirectionOverride = style.hasTextDirectionOverride(); | 715 m_items[i]->hasTextDirectionOverride = style.hasTextDirectionOverride(); |
| 716 m_items[i]->displayNone = style.isDisplayNone(); |
716 } | 717 } |
717 | 718 |
718 m_selectedIndex = m_popupClient->selectedIndex(); | 719 m_selectedIndex = m_popupClient->selectedIndex(); |
719 setOriginalIndex(m_selectedIndex); | 720 setOriginalIndex(m_selectedIndex); |
720 | 721 |
721 layout(); | 722 layout(); |
722 } | 723 } |
723 | 724 |
724 void PopupListBox::setMaxWidthAndLayout(int maxWidth) | 725 void PopupListBox::setMaxWidthAndLayout(int maxWidth) |
725 { | 726 { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 { | 825 { |
825 return numItems() && IntRect(0, 0, width(), height()).contains(point); | 826 return numItems() && IntRect(0, 0, width(), height()).contains(point); |
826 } | 827 } |
827 | 828 |
828 int PopupListBox::popupContentHeight() const | 829 int PopupListBox::popupContentHeight() const |
829 { | 830 { |
830 return height(); | 831 return height(); |
831 } | 832 } |
832 | 833 |
833 } // namespace blink | 834 } // namespace blink |
OLD | NEW |