Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 26 matching lines...) Expand all Loading... | |
| 37 class ExceptionState; | 37 class ExceptionState; |
| 38 class HTMLOptionElement; | 38 class HTMLOptionElement; |
| 39 | 39 |
| 40 class HTMLSelectElement FINAL : public HTMLFormControlElementWithState, public T ypeAheadDataSource { | 40 class HTMLSelectElement FINAL : public HTMLFormControlElementWithState, public T ypeAheadDataSource { |
| 41 public: | 41 public: |
| 42 static PassRefPtr<HTMLSelectElement> create(Document&); | 42 static PassRefPtr<HTMLSelectElement> create(Document&); |
| 43 static PassRefPtr<HTMLSelectElement> create(Document&, HTMLFormElement*); | 43 static PassRefPtr<HTMLSelectElement> create(Document&, HTMLFormElement*); |
| 44 | 44 |
| 45 int selectedIndex() const; | 45 int selectedIndex() const; |
| 46 void setSelectedIndex(int); | 46 void setSelectedIndex(int); |
| 47 int suggestedIndex() const; | |
| 48 void setSuggestedIndex(int); | |
| 47 | 49 |
| 48 void optionSelectedByUser(int index, bool dispatchChangeEvent, bool allowMul tipleSelection = false); | 50 void optionSelectedByUser(int index, bool dispatchChangeEvent, bool allowMul tipleSelection = false); |
| 49 | 51 |
| 50 // For ValidityState | 52 // For ValidityState |
| 51 virtual String validationMessage() const OVERRIDE; | 53 virtual String validationMessage() const OVERRIDE; |
| 52 virtual bool valueMissing() const OVERRIDE; | 54 virtual bool valueMissing() const OVERRIDE; |
| 53 | 55 |
| 54 virtual void resetImpl() OVERRIDE; | 56 virtual void resetImpl() OVERRIDE; |
| 55 | 57 |
| 56 unsigned length() const; | 58 unsigned length() const; |
| 57 | 59 |
| 58 int size() const { return m_size; } | 60 int size() const { return m_size; } |
| 59 bool multiple() const { return m_multiple; } | 61 bool multiple() const { return m_multiple; } |
| 60 | 62 |
| 61 bool usesMenuList() const; | 63 bool usesMenuList() const; |
| 62 | 64 |
| 63 void add(HTMLElement*, HTMLElement* beforeElement, ExceptionState&); | 65 void add(HTMLElement*, HTMLElement* beforeElement, ExceptionState&); |
| 64 | 66 |
| 65 using Node::remove; | 67 using Node::remove; |
| 66 void remove(int index); | 68 void remove(int index); |
| 67 | 69 |
| 68 String value() const; | 70 String value() const; |
| 69 void setValue(const String&); | 71 void setValue(const String&); |
| 72 String suggestedValue() const; | |
| 73 void setSuggestedValue(const String&); | |
| 70 | 74 |
| 71 PassRefPtr<HTMLOptionsCollection> options(); | 75 PassRefPtr<HTMLOptionsCollection> options(); |
| 72 PassRefPtr<HTMLCollection> selectedOptions(); | 76 PassRefPtr<HTMLCollection> selectedOptions(); |
| 73 | 77 |
| 74 void optionElementChildrenChanged(); | 78 void optionElementChildrenChanged(); |
| 75 | 79 |
| 76 void setRecalcListItems(); | 80 void setRecalcListItems(); |
| 77 void invalidateSelectedItems(); | 81 void invalidateSelectedItems(); |
| 78 void updateListItemSelectedStates(); | 82 void updateListItemSelectedStates(); |
| 79 | 83 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 Vector<bool> m_cachedStateForActiveSelection; | 201 Vector<bool> m_cachedStateForActiveSelection; |
| 198 TypeAhead m_typeAhead; | 202 TypeAhead m_typeAhead; |
| 199 int m_size; | 203 int m_size; |
| 200 int m_lastOnChangeIndex; | 204 int m_lastOnChangeIndex; |
| 201 int m_activeSelectionAnchorIndex; | 205 int m_activeSelectionAnchorIndex; |
| 202 int m_activeSelectionEndIndex; | 206 int m_activeSelectionEndIndex; |
| 203 bool m_isProcessingUserDrivenChange; | 207 bool m_isProcessingUserDrivenChange; |
| 204 bool m_multiple; | 208 bool m_multiple; |
| 205 bool m_activeSelectionState; | 209 bool m_activeSelectionState; |
| 206 mutable bool m_shouldRecalcListItems; | 210 mutable bool m_shouldRecalcListItems; |
| 211 | |
| 212 String m_suggestedValue; | |
|
tkent
2014/03/14 00:06:41
Why m_suggestedValue is necessary? Isn't m_sugges
ziran.sun
2014/03/14 11:33:40
Done.
| |
| 213 int m_suggestedIndex; | |
| 207 }; | 214 }; |
| 208 | 215 |
| 209 } // namespace | 216 } // namespace |
| 210 | 217 |
| 211 #endif | 218 #endif |
| OLD | NEW |