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 18 matching lines...) Expand all Loading... | |
29 #include "core/dom/Event.h" | 29 #include "core/dom/Event.h" |
30 #include "core/html/HTMLFormControlElementWithState.h" | 30 #include "core/html/HTMLFormControlElementWithState.h" |
31 #include "core/html/HTMLOptionsCollection.h" | 31 #include "core/html/HTMLOptionsCollection.h" |
32 #include "core/html/TypeAhead.h" | 32 #include "core/html/TypeAhead.h" |
33 #include <wtf/Vector.h> | 33 #include <wtf/Vector.h> |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 class HTMLOptionElement; | 37 class HTMLOptionElement; |
38 | 38 |
39 class HTMLSelectElement : public HTMLFormControlElementWithState, public TypeAhe adDataSource { | 39 class HTMLSelectElement : public HTMLFormControlElementWithState, public TypeAhe adDataSource { |
Mads Ager (chromium)
2013/07/25 13:35:12
We will probably have TypeAheadDataSource in membe
| |
40 public: | 40 public: |
41 static Result<HTMLSelectElement> create(const QualifiedName&, Handle<Documen t>, HTMLFormElement*); | 41 static Result<HTMLSelectElement> create(const QualifiedName&, Handle<Documen t>, HTMLFormElement*); |
42 | 42 |
43 int selectedIndex() const; | 43 int selectedIndex() const; |
44 void setSelectedIndex(int); | 44 void setSelectedIndex(int); |
45 | 45 |
46 void optionSelectedByUser(int index, bool dispatchChangeEvent, bool allowMul tipleSelection = false); | 46 void optionSelectedByUser(int index, bool dispatchChangeEvent, bool allowMul tipleSelection = false); |
47 | 47 |
48 // For ValidityState | 48 // For ValidityState |
49 virtual String validationMessage() const OVERRIDE; | 49 virtual String validationMessage() const OVERRIDE; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 int optionToListIndex(int optionIndex) const; | 98 int optionToListIndex(int optionIndex) const; |
99 int activeSelectionStartListIndex() const; | 99 int activeSelectionStartListIndex() const; |
100 int activeSelectionEndListIndex() const; | 100 int activeSelectionEndListIndex() const; |
101 void setActiveSelectionAnchorIndex(int); | 101 void setActiveSelectionAnchorIndex(int); |
102 void setActiveSelectionEndIndex(int); | 102 void setActiveSelectionEndIndex(int); |
103 void updateListBoxSelection(bool deselectOtherOptions); | 103 void updateListBoxSelection(bool deselectOtherOptions); |
104 | 104 |
105 // For use in the implementation of HTMLOptionElement. | 105 // For use in the implementation of HTMLOptionElement. |
106 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); | 106 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); |
107 | 107 |
108 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE; | |
109 | |
110 protected: | 108 protected: |
111 HTMLSelectElement(const QualifiedName&, Handle<Document>, HTMLFormElement*); | 109 HTMLSelectElement(const QualifiedName&, Handle<Document>, HTMLFormElement*); |
112 | 110 |
111 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE; | |
112 | |
113 private: | 113 private: |
114 virtual const AtomicString& formControlType() const; | 114 virtual const AtomicString& formControlType() const; |
115 | 115 |
116 virtual bool isKeyboardFocusable(KeyboardEvent*) const; | 116 virtual bool isKeyboardFocusable(KeyboardEvent*) const; |
117 virtual bool isMouseFocusable() const; | 117 virtual bool isMouseFocusable() const; |
118 | 118 |
119 virtual void dispatchFocusEvent(PassRefPtr<Node> oldFocusedNode, FocusDirect ion) OVERRIDE; | 119 virtual void dispatchFocusEvent(PassRefPtr<Node> oldFocusedNode, FocusDirect ion) OVERRIDE; |
120 virtual void dispatchBlurEvent(PassRefPtr<Node> newFocusedNode); | 120 virtual void dispatchBlurEvent(PassRefPtr<Node> newFocusedNode); |
121 | 121 |
122 virtual bool canStartSelection() const { return false; } | 122 virtual bool canStartSelection() const { return false; } |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 { | 219 { |
220 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node)); | 220 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node)); |
221 return adoptRawResult(static_cast<const HTMLSelectElement*>(node)); | 221 return adoptRawResult(static_cast<const HTMLSelectElement*>(node)); |
222 } | 222 } |
223 | 223 |
224 void toHTMLSelectElement(const HTMLSelectElement*); // This overload will catch anyone doing an unnecessary cast. | 224 void toHTMLSelectElement(const HTMLSelectElement*); // This overload will catch anyone doing an unnecessary cast. |
225 | 225 |
226 } // namespace | 226 } // namespace |
227 | 227 |
228 #endif | 228 #endif |
OLD | NEW |