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

Side by Side Diff: Source/web/PopupListBox.cpp

Issue 415343003: Option Groups with display: none should not show the children option elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed assert failure in linux dbg build Created 6 years, 4 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
« no previous file with comments | « Source/web/PopupListBox.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/web/PopupListBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698