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

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

Issue 541693003: HTMLSelectElement does not include selected index/indices while saving state (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated Created 6 years, 3 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 void parseMultipleAttribute(const AtomicString&); 183 void parseMultipleAttribute(const AtomicString&);
184 int lastSelectedListIndex() const; 184 int lastSelectedListIndex() const;
185 void updateSelectedState(int listIndex, bool multi, bool shift); 185 void updateSelectedState(int listIndex, bool multi, bool shift);
186 void menuListDefaultEventHandler(Event*); 186 void menuListDefaultEventHandler(Event*);
187 void handlePopupOpenKeyboardEvent(Event*); 187 void handlePopupOpenKeyboardEvent(Event*);
188 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*); 188 bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*);
189 bool shouldOpenPopupForKeyPressEvent(KeyboardEvent*); 189 bool shouldOpenPopupForKeyPressEvent(KeyboardEvent*);
190 void listBoxDefaultEventHandler(Event*); 190 void listBoxDefaultEventHandler(Event*);
191 void setOptionsChangedOnRenderer(); 191 void setOptionsChangedOnRenderer();
192 size_t searchOptionsForValue(const String&, size_t listIndexStart, size_t li stIndexEnd) const; 192 size_t searchOptionsForValue(const String&, size_t listIndexStart, size_t li stIndexEnd) const;
193 String valueAtIndex(size_t index) const
194 {
195 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& items = listIt ems();
tkent 2014/09/09 02:14:45 Don't define function body in a header file if it
spartha 2014/09/09 11:09:56 Done.
196 return index < items.size() && isHTMLOptionElement(items[index]) ? toHTM LOptionElement(items[index])->value() : WTF::emptyString();
197 }
193 198
194 enum SkipDirection { 199 enum SkipDirection {
195 SkipBackwards = -1, 200 SkipBackwards = -1,
196 SkipForwards = 1 201 SkipForwards = 1
197 }; 202 };
198 int nextValidIndex(int listIndex, SkipDirection, int skip) const; 203 int nextValidIndex(int listIndex, SkipDirection, int skip) const;
199 int nextSelectableListIndex(int startIndex) const; 204 int nextSelectableListIndex(int startIndex) const;
200 int previousSelectableListIndex(int startIndex) const; 205 int previousSelectableListIndex(int startIndex) const;
201 int firstSelectableListIndex() const; 206 int firstSelectableListIndex() const;
202 int lastSelectableListIndex() const; 207 int lastSelectableListIndex() const;
(...skipping 23 matching lines...) Expand all
226 bool m_isProcessingUserDrivenChange; 231 bool m_isProcessingUserDrivenChange;
227 bool m_multiple; 232 bool m_multiple;
228 bool m_activeSelectionState; 233 bool m_activeSelectionState;
229 mutable bool m_shouldRecalcListItems; 234 mutable bool m_shouldRecalcListItems;
230 int m_suggestedIndex; 235 int m_suggestedIndex;
231 }; 236 };
232 237
233 } // namespace blink 238 } // namespace blink
234 239
235 #endif // HTMLSelectElement_h 240 #endif // HTMLSelectElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698