Chromium Code Reviews| 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; | |
|
haraken
2013/07/17 14:10:23
This conflicts with our accept(). However, fortuna
Vyacheslav Egorov (Google)
2013/07/18 16:50:08
Nice! With this removed we might be even able to r
| |
| 209 String alt() const; | 208 String alt() const; |
| 210 | 209 |
| 211 void setSize(unsigned); | 210 void setSize(unsigned); |
| 212 void setSize(unsigned, ExceptionCode&); | 211 void setSize(unsigned, ExceptionCode&); |
| 213 | 212 |
| 214 KURL src() const; | 213 KURL src() const; |
| 215 | 214 |
| 216 virtual int maxLength() const; | 215 virtual int maxLength() const; |
| 217 void setMaxLength(int, ExceptionCode&); | 216 void setMaxLength(int, ExceptionCode&); |
| 218 | 217 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 241 void updateClearButtonVisibility(); | 240 void updateClearButtonVisibility(); |
| 242 | 241 |
| 243 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 242 virtual bool willRespondToMouseClickEvents() OVERRIDE; |
| 244 | 243 |
| 245 #if ENABLE(DATALIST_ELEMENT) | 244 #if ENABLE(DATALIST_ELEMENT) |
| 246 HTMLElement* list() const; | 245 HTMLElement* list() const; |
| 247 HTMLDataListElement* dataList() const; | 246 HTMLDataListElement* dataList() const; |
| 248 void listAttributeTargetChanged(); | 247 void listAttributeTargetChanged(); |
| 249 #endif | 248 #endif |
| 250 | 249 |
| 251 HTMLInputElement* checkedRadioButtonForGroup() const; | 250 Result<HTMLInputElement> checkedRadioButtonForGroup() const; |
| 252 bool isInRequiredRadioButtonGroup(); | 251 bool isInRequiredRadioButtonGroup(); |
| 253 | 252 |
| 254 // Functions for InputType classes. | 253 // Functions for InputType classes. |
| 255 void setValueInternal(const String&, TextFieldEventBehavior); | 254 void setValueInternal(const String&, TextFieldEventBehavior); |
| 256 bool isTextFormControlKeyboardFocusable(KeyboardEvent*) const; | 255 bool isTextFormControlKeyboardFocusable(KeyboardEvent*) const; |
| 257 bool isTextFormControlMouseFocusable() const; | 256 bool isTextFormControlMouseFocusable() const; |
| 258 bool valueAttributeWasUpdatedAfterParsing() const { return m_valueAttributeW asUpdatedAfterParsing; } | 257 bool valueAttributeWasUpdatedAfterParsing() const { return m_valueAttributeW asUpdatedAfterParsing; } |
| 259 | 258 |
| 260 void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(ca retOffset, caretOffset, SelectionHasNoDirection); } | 259 void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(ca retOffset, caretOffset, SelectionHasNoDirection); } |
| 261 | 260 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 291 virtual bool matchesReadWritePseudoClass() const OVERRIDE; | 290 virtual bool matchesReadWritePseudoClass() const OVERRIDE; |
| 292 virtual void setRangeText(const String& replacement, ExceptionCode&) OVERRID E; | 291 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; | 292 virtual void setRangeText(const String& replacement, unsigned start, unsigne d end, const String& selectionMode, ExceptionCode&) OVERRIDE; |
| 294 | 293 |
| 295 bool hasImageLoader() const { return m_imageLoader; } | 294 bool hasImageLoader() const { return m_imageLoader; } |
| 296 HTMLImageLoader* imageLoader(); | 295 HTMLImageLoader* imageLoader(); |
| 297 | 296 |
| 298 bool setupDateTimeChooserParameters(DateTimeChooserParameters&); | 297 bool setupDateTimeChooserParameters(DateTimeChooserParameters&); |
| 299 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | 298 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; |
| 300 | 299 |
| 300 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE; | |
| 301 | |
| 301 protected: | 302 protected: |
| 302 HTMLInputElement(const QualifiedName&, Document*, HTMLFormElement*, bool cre atedByParser); | 303 HTMLInputElement(const QualifiedName&, Document*, HTMLFormElement*, bool cre atedByParser); |
| 303 | 304 |
| 304 virtual void defaultEventHandler(Event*); | 305 virtual void defaultEventHandler(Event*); |
| 305 | 306 |
| 306 private: | 307 private: |
| 307 enum AutoCompleteSetting { Uninitialized, On, Off }; | 308 enum AutoCompleteSetting { Uninitialized, On, Off }; |
| 308 | 309 |
| 309 // FIXME: Author shadows should be allowed | 310 // FIXME: Author shadows should be allowed |
| 310 // https://bugs.webkit.org/show_bug.cgi?id=92608 | 311 // 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 | 426 // 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. | 427 // the ImageInput object we may delete the loader while this element lives o n. |
| 427 OwnPtr<HTMLImageLoader> m_imageLoader; | 428 OwnPtr<HTMLImageLoader> m_imageLoader; |
| 428 #if ENABLE(DATALIST_ELEMENT) | 429 #if ENABLE(DATALIST_ELEMENT) |
| 429 OwnPtr<ListAttributeTargetObserver> m_listAttributeTargetObserver; | 430 OwnPtr<ListAttributeTargetObserver> m_listAttributeTargetObserver; |
| 430 #endif | 431 #endif |
| 431 }; | 432 }; |
| 432 | 433 |
| 433 } //namespace | 434 } //namespace |
| 434 #endif | 435 #endif |
| OLD | NEW |