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

Side by Side Diff: Source/core/html/HTMLSelectElement.h

Issue 189543012: Update <select> when any of its <option> children has "display: none" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2000 Dirk Mueller (mueller@kde.org) 5 * (C) 2000 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 int activeSelectionStartListIndex() const; 109 int activeSelectionStartListIndex() const;
110 int activeSelectionEndListIndex() const; 110 int activeSelectionEndListIndex() const;
111 void setActiveSelectionAnchorIndex(int); 111 void setActiveSelectionAnchorIndex(int);
112 void setActiveSelectionEndIndex(int); 112 void setActiveSelectionEndIndex(int);
113 void updateListBoxSelection(bool deselectOtherOptions); 113 void updateListBoxSelection(bool deselectOtherOptions);
114 114
115 // For use in the implementation of HTMLOptionElement. 115 // For use in the implementation of HTMLOptionElement.
116 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); 116 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
117 bool anonymousIndexedSetter(unsigned, PassRefPtr<HTMLOptionElement>, Excepti onState&); 117 bool anonymousIndexedSetter(unsigned, PassRefPtr<HTMLOptionElement>, Excepti onState&);
118 118
119 void updateListOnRenderer();
119 protected: 120 protected:
120 HTMLSelectElement(Document&, HTMLFormElement*); 121 HTMLSelectElement(Document&, HTMLFormElement*);
121 122
122 private: 123 private:
123 virtual const AtomicString& formControlType() const OVERRIDE; 124 virtual const AtomicString& formControlType() const OVERRIDE;
124 125
125 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; 126 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE;
126 127
127 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR IDE; 128 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR IDE;
128 virtual void dispatchBlurEvent(Element* newFocusedElemnet) OVERRIDE; 129 virtual void dispatchBlurEvent(Element* newFocusedElemnet) OVERRIDE;
(...skipping 20 matching lines...) Expand all
149 150
150 void recalcListItems(bool updateSelectedStates = true) const; 151 void recalcListItems(bool updateSelectedStates = true) const;
151 152
152 void typeAheadFind(KeyboardEvent*); 153 void typeAheadFind(KeyboardEvent*);
153 void saveLastSelection(); 154 void saveLastSelection();
154 155
155 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 156 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
156 157
157 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm Control(); } 158 virtual bool isOptionalFormControl() const OVERRIDE { return !isRequiredForm Control(); }
158 virtual bool isRequiredFormControl() const OVERRIDE; 159 virtual bool isRequiredFormControl() const OVERRIDE;
160 virtual void didRecalcStyle(StyleRecalcChange) OVERRIDE;
159 161
160 bool hasPlaceholderLabelOption() const; 162 bool hasPlaceholderLabelOption() const;
161 163
162 enum SelectOptionFlag { 164 enum SelectOptionFlag {
163 DeselectOtherOptions = 1 << 0, 165 DeselectOtherOptions = 1 << 0,
164 DispatchInputAndChangeEvent = 1 << 1, 166 DispatchInputAndChangeEvent = 1 << 1,
165 UserDriven = 1 << 2, 167 UserDriven = 1 << 2,
166 }; 168 };
167 typedef unsigned SelectOptionFlags; 169 typedef unsigned SelectOptionFlags;
168 void selectOption(int optionIndex, SelectOptionFlags = 0); 170 void selectOption(int optionIndex, SelectOptionFlags = 0);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 bool m_isProcessingUserDrivenChange; 210 bool m_isProcessingUserDrivenChange;
209 bool m_multiple; 211 bool m_multiple;
210 bool m_activeSelectionState; 212 bool m_activeSelectionState;
211 mutable bool m_shouldRecalcListItems; 213 mutable bool m_shouldRecalcListItems;
212 int m_suggestedIndex; 214 int m_suggestedIndex;
213 }; 215 };
214 216
215 } // namespace 217 } // namespace
216 218
217 #endif 219 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698