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

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

Issue 783983005: Fix regression caused by r178354 where options in optgroup not indented (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reverted change to Element.cpp Created 6 years 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/core/html/HTMLOptionElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | 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) 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 int listToOptionIndex(int listIndex) const; 110 int listToOptionIndex(int listIndex) const;
111 void listBoxOnChange(); 111 void listBoxOnChange();
112 int optionToListIndex(int optionIndex) const; 112 int optionToListIndex(int optionIndex) const;
113 int activeSelectionStartListIndex() const; 113 int activeSelectionStartListIndex() const;
114 int activeSelectionEndListIndex() const; 114 int activeSelectionEndListIndex() const;
115 void setActiveSelectionAnchorIndex(int); 115 void setActiveSelectionAnchorIndex(int);
116 void setActiveSelectionEndIndex(int); 116 void setActiveSelectionEndIndex(int);
117 117
118 // For use in the implementation of HTMLOptionElement. 118 // For use in the implementation of HTMLOptionElement.
119 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); 119 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
120 void optionInserted(const HTMLOptionElement&, bool optionIsSelected);
120 void optionRemoved(const HTMLOptionElement&); 121 void optionRemoved(const HTMLOptionElement&);
121 bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionEleme nt>, ExceptionState&); 122 bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionEleme nt>, ExceptionState&);
122 123
123 void updateListOnRenderer(); 124 void updateListOnRenderer();
124 125
125 HTMLOptionElement* spatialNavigationFocusedOption(); 126 HTMLOptionElement* spatialNavigationFocusedOption();
126 void handleMouseRelease(); 127 void handleMouseRelease();
127 128
128 virtual void trace(Visitor*) override; 129 virtual void trace(Visitor*) override;
129 130
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 169
169 virtual bool isOptionalFormControl() const override { return !isRequiredForm Control(); } 170 virtual bool isOptionalFormControl() const override { return !isRequiredForm Control(); }
170 virtual bool isRequiredFormControl() const override; 171 virtual bool isRequiredFormControl() const override;
171 172
172 bool hasPlaceholderLabelOption() const; 173 bool hasPlaceholderLabelOption() const;
173 174
174 enum SelectOptionFlag { 175 enum SelectOptionFlag {
175 DeselectOtherOptions = 1 << 0, 176 DeselectOtherOptions = 1 << 0,
176 DispatchInputAndChangeEvent = 1 << 1, 177 DispatchInputAndChangeEvent = 1 << 1,
177 UserDriven = 1 << 2, 178 UserDriven = 1 << 2,
179 DelayScrollToSelection = 1 << 3,
178 }; 180 };
179 typedef unsigned SelectOptionFlags; 181 typedef unsigned SelectOptionFlags;
180 void selectOption(int optionIndex, SelectOptionFlags = 0); 182 void selectOption(int optionIndex, SelectOptionFlags = 0);
181 void deselectItemsWithoutValidation(HTMLElement* elementToExclude = 0); 183 void deselectItemsWithoutValidation(HTMLElement* elementToExclude = 0);
182 void parseMultipleAttribute(const AtomicString&); 184 void parseMultipleAttribute(const AtomicString&);
183 int lastSelectedListIndex() const; 185 int lastSelectedListIndex() const;
184 void updateSelectedState(int listIndex, bool multi, bool shift); 186 void updateSelectedState(int listIndex, bool multi, bool shift);
185 void menuListDefaultEventHandler(Event*); 187 void menuListDefaultEventHandler(Event*);
186 void handlePopupOpenKeyboardEvent(Event*); 188 void handlePopupOpenKeyboardEvent(Event*);
187 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*); 189 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 int m_size; 224 int m_size;
223 int m_lastOnChangeIndex; 225 int m_lastOnChangeIndex;
224 int m_activeSelectionAnchorIndex; 226 int m_activeSelectionAnchorIndex;
225 int m_activeSelectionEndIndex; 227 int m_activeSelectionEndIndex;
226 bool m_isProcessingUserDrivenChange; 228 bool m_isProcessingUserDrivenChange;
227 bool m_multiple; 229 bool m_multiple;
228 bool m_activeSelectionState; 230 bool m_activeSelectionState;
229 mutable bool m_shouldRecalcListItems; 231 mutable bool m_shouldRecalcListItems;
230 int m_suggestedIndex; 232 int m_suggestedIndex;
231 bool m_isAutofilledByPreview; 233 bool m_isAutofilledByPreview;
234 bool m_scrollToSelectionLater;
232 }; 235 };
233 236
234 } // namespace blink 237 } // namespace blink
235 238
236 #endif // HTMLSelectElement_h 239 #endif // HTMLSelectElement_h
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptionElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698