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

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

Issue 17381010: Introduce toHTMLFormControlElement, and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLLegendElement.cpp ('k') | Source/core/html/RadioNodeList.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
50 virtual bool valueMissing() const OVERRIDE; 50 virtual bool valueMissing() const OVERRIDE;
51 51
52 virtual void reset() OVERRIDE;
53
52 unsigned length() const; 54 unsigned length() const;
53 55
54 int size() const { return m_size; } 56 int size() const { return m_size; }
55 bool multiple() const { return m_multiple; } 57 bool multiple() const { return m_multiple; }
56 58
57 bool usesMenuList() const; 59 bool usesMenuList() const;
58 60
59 void add(HTMLElement*, HTMLElement* beforeElement, ExceptionCode&); 61 void add(HTMLElement*, HTMLElement* beforeElement, ExceptionCode&);
60 void remove(int index); 62 void remove(int index);
61 void remove(HTMLOptionElement*); 63 void remove(HTMLOptionElement*);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 virtual FormControlState saveFormControlState() const OVERRIDE; 129 virtual FormControlState saveFormControlState() const OVERRIDE;
128 virtual void restoreFormControlState(const FormControlState&) OVERRIDE; 130 virtual void restoreFormControlState(const FormControlState&) OVERRIDE;
129 131
130 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 132 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
131 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 133 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
132 134
133 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OV ERRIDE; 135 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OV ERRIDE;
134 virtual RenderObject* createRenderer(RenderArena*, RenderStyle *); 136 virtual RenderObject* createRenderer(RenderArena*, RenderStyle *);
135 virtual bool appendFormData(FormDataList&, bool); 137 virtual bool appendFormData(FormDataList&, bool);
136 138
137 virtual void reset();
138
139 virtual void defaultEventHandler(Event*); 139 virtual void defaultEventHandler(Event*);
140 140
141 void dispatchChangeEventForMenuList(); 141 void dispatchChangeEventForMenuList();
142 142
143 void recalcListItems(bool updateSelectedStates = true) const; 143 void recalcListItems(bool updateSelectedStates = true) const;
144 144
145 void deselectItems(HTMLOptionElement* excludeElement = 0); 145 void deselectItems(HTMLOptionElement* excludeElement = 0);
146 void typeAheadFind(KeyboardEvent*); 146 void typeAheadFind(KeyboardEvent*);
147 void saveLastSelection(); 147 void saveLastSelection();
148 148
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 { 221 {
222 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node)); 222 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node));
223 return static_cast<const HTMLSelectElement*>(node); 223 return static_cast<const HTMLSelectElement*>(node);
224 } 224 }
225 225
226 void toHTMLSelectElement(const HTMLSelectElement*); // This overload will catch anyone doing an unnecessary cast. 226 void toHTMLSelectElement(const HTMLSelectElement*); // This overload will catch anyone doing an unnecessary cast.
227 227
228 } // namespace 228 } // namespace
229 229
230 #endif 230 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLegendElement.cpp ('k') | Source/core/html/RadioNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698