OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. |
6 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 6 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 27 matching lines...) Expand all Loading... |
38 class HTMLImageLoader; | 38 class HTMLImageLoader; |
39 class HTMLOptionElement; | 39 class HTMLOptionElement; |
40 class Icon; | 40 class Icon; |
41 class InputType; | 41 class InputType; |
42 class KURL; | 42 class KURL; |
43 class ListAttributeTargetObserver; | 43 class ListAttributeTargetObserver; |
44 struct DateTimeChooserParameters; | 44 struct DateTimeChooserParameters; |
45 | 45 |
46 class HTMLInputElement : public HTMLTextFormControlElement { | 46 class HTMLInputElement : public HTMLTextFormControlElement { |
47 public: | 47 public: |
48 static PassRefPtr<HTMLInputElement> create(const QualifiedName&, Document*,
HTMLFormElement*, bool createdByParser); | 48 static Result<HTMLInputElement> create(const QualifiedName&, Document*, HTML
FormElement*, bool createdByParser); |
49 virtual ~HTMLInputElement(); | 49 virtual ~HTMLInputElement(); |
50 | 50 |
51 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitspeechchange); | 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitspeechchange); |
52 | 52 |
53 virtual HTMLInputElement* toInputElement() { return this; } | 53 virtual Result<HTMLInputElement> toInputElement() { return Handle<HTMLInputE
lement>(this); } |
54 | 54 |
55 virtual bool shouldAutocomplete() const; | 55 virtual bool shouldAutocomplete() const; |
56 | 56 |
57 // For ValidityState | 57 // For ValidityState |
58 virtual bool hasBadInput() const OVERRIDE; | 58 virtual bool hasBadInput() const OVERRIDE; |
59 virtual bool patternMismatch() const OVERRIDE; | 59 virtual bool patternMismatch() const OVERRIDE; |
60 virtual bool rangeUnderflow() const OVERRIDE; | 60 virtual bool rangeUnderflow() const OVERRIDE; |
61 virtual bool rangeOverflow() const; | 61 virtual bool rangeOverflow() const; |
62 virtual bool stepMismatch() const OVERRIDE; | 62 virtual bool stepMismatch() const OVERRIDE; |
63 virtual bool tooLong() const OVERRIDE; | 63 virtual bool tooLong() const OVERRIDE; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 String altText() const; | 199 String altText() const; |
200 | 200 |
201 int maxResults() const { return m_maxResults; } | 201 int maxResults() const { return m_maxResults; } |
202 | 202 |
203 String defaultValue() const; | 203 String defaultValue() const; |
204 void setDefaultValue(const String&); | 204 void setDefaultValue(const String&); |
205 | 205 |
206 Vector<String> acceptMIMETypes(); | 206 Vector<String> acceptMIMETypes(); |
207 Vector<String> acceptFileExtensions(); | 207 Vector<String> acceptFileExtensions(); |
208 String accept() const; | 208 String acceptAttribute() const; |
209 String alt() const; | 209 String alt() const; |
210 | 210 |
211 void setSize(unsigned); | 211 void setSize(unsigned); |
212 void setSize(unsigned, ExceptionCode&); | 212 void setSize(unsigned, ExceptionCode&); |
213 | 213 |
214 KURL src() const; | 214 KURL src() const; |
215 | 215 |
216 virtual int maxLength() const; | 216 virtual int maxLength() const; |
217 void setMaxLength(int, ExceptionCode&); | 217 void setMaxLength(int, ExceptionCode&); |
218 | 218 |
(...skipping 22 matching lines...) Expand all Loading... |
241 void updateClearButtonVisibility(); | 241 void updateClearButtonVisibility(); |
242 | 242 |
243 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 243 virtual bool willRespondToMouseClickEvents() OVERRIDE; |
244 | 244 |
245 #if ENABLE(DATALIST_ELEMENT) | 245 #if ENABLE(DATALIST_ELEMENT) |
246 HTMLElement* list() const; | 246 HTMLElement* list() const; |
247 HTMLDataListElement* dataList() const; | 247 HTMLDataListElement* dataList() const; |
248 void listAttributeTargetChanged(); | 248 void listAttributeTargetChanged(); |
249 #endif | 249 #endif |
250 | 250 |
251 HTMLInputElement* checkedRadioButtonForGroup() const; | 251 Result<HTMLInputElement> checkedRadioButtonForGroup() const; |
252 bool isInRequiredRadioButtonGroup(); | 252 bool isInRequiredRadioButtonGroup(); |
253 | 253 |
254 // Functions for InputType classes. | 254 // Functions for InputType classes. |
255 void setValueInternal(const String&, TextFieldEventBehavior); | 255 void setValueInternal(const String&, TextFieldEventBehavior); |
256 bool isTextFormControlKeyboardFocusable(KeyboardEvent*) const; | 256 bool isTextFormControlKeyboardFocusable(KeyboardEvent*) const; |
257 bool isTextFormControlMouseFocusable() const; | 257 bool isTextFormControlMouseFocusable() const; |
258 bool valueAttributeWasUpdatedAfterParsing() const { return m_valueAttributeW
asUpdatedAfterParsing; } | 258 bool valueAttributeWasUpdatedAfterParsing() const { return m_valueAttributeW
asUpdatedAfterParsing; } |
259 | 259 |
260 void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(ca
retOffset, caretOffset, SelectionHasNoDirection); } | 260 void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(ca
retOffset, caretOffset, SelectionHasNoDirection); } |
261 | 261 |
(...skipping 29 matching lines...) Expand all Loading... |
291 virtual bool matchesReadWritePseudoClass() const OVERRIDE; | 291 virtual bool matchesReadWritePseudoClass() const OVERRIDE; |
292 virtual void setRangeText(const String& replacement, ExceptionCode&) OVERRID
E; | 292 virtual void setRangeText(const String& replacement, ExceptionCode&) OVERRID
E; |
293 virtual void setRangeText(const String& replacement, unsigned start, unsigne
d end, const String& selectionMode, ExceptionCode&) OVERRIDE; | 293 virtual void setRangeText(const String& replacement, unsigned start, unsigne
d end, const String& selectionMode, ExceptionCode&) OVERRIDE; |
294 | 294 |
295 bool hasImageLoader() const { return m_imageLoader; } | 295 bool hasImageLoader() const { return m_imageLoader; } |
296 HTMLImageLoader* imageLoader(); | 296 HTMLImageLoader* imageLoader(); |
297 | 297 |
298 bool setupDateTimeChooserParameters(DateTimeChooserParameters&); | 298 bool setupDateTimeChooserParameters(DateTimeChooserParameters&); |
299 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | 299 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; |
300 | 300 |
| 301 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE; |
| 302 |
301 protected: | 303 protected: |
302 HTMLInputElement(const QualifiedName&, Document*, HTMLFormElement*, bool cre
atedByParser); | 304 HTMLInputElement(const QualifiedName&, Document*, HTMLFormElement*, bool cre
atedByParser); |
303 | 305 |
304 virtual void defaultEventHandler(Event*); | 306 virtual void defaultEventHandler(Event*); |
305 | 307 |
306 private: | 308 private: |
307 enum AutoCompleteSetting { Uninitialized, On, Off }; | 309 enum AutoCompleteSetting { Uninitialized, On, Off }; |
308 | 310 |
309 // FIXME: Author shadows should be allowed | 311 // FIXME: Author shadows should be allowed |
310 // https://bugs.webkit.org/show_bug.cgi?id=92608 | 312 // https://bugs.webkit.org/show_bug.cgi?id=92608 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 // that it lives as long as its owning element lives. If we move the loader
into | 427 // that it lives as long as its owning element lives. If we move the loader
into |
426 // the ImageInput object we may delete the loader while this element lives o
n. | 428 // the ImageInput object we may delete the loader while this element lives o
n. |
427 OwnPtr<HTMLImageLoader> m_imageLoader; | 429 OwnPtr<HTMLImageLoader> m_imageLoader; |
428 #if ENABLE(DATALIST_ELEMENT) | 430 #if ENABLE(DATALIST_ELEMENT) |
429 OwnPtr<ListAttributeTargetObserver> m_listAttributeTargetObserver; | 431 OwnPtr<ListAttributeTargetObserver> m_listAttributeTargetObserver; |
430 #endif | 432 #endif |
431 }; | 433 }; |
432 | 434 |
433 } //namespace | 435 } //namespace |
434 #endif | 436 #endif |
OLD | NEW |