| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebInputElement_h | 31 #ifndef WebInputElement_h |
| 32 #define WebInputElement_h | 32 #define WebInputElement_h |
| 33 | 33 |
| 34 #include "WebFormControlElement.h" | 34 #include "WebFormControlElement.h" |
| 35 | 35 |
| 36 #if WEBKIT_IMPLEMENTATION | 36 #if WEBKIT_IMPLEMENTATION |
| 37 namespace WebCore { class HTMLInputElement; } | 37 namespace WebCore { |
| 38 class HTMLInputElement; |
| 39 template<typename T> class Handle; |
| 40 } |
| 38 #endif | 41 #endif |
| 39 | 42 |
| 40 namespace WebKit { | 43 namespace WebKit { |
| 41 | 44 |
| 42 class WebNodeCollection; | 45 class WebNodeCollection; |
| 43 class WebTextFieldDecoratorClient; | 46 class WebTextFieldDecoratorClient; |
| 44 | 47 |
| 45 // Provides readonly access to some properties of a DOM input element node. | 48 // Provides readonly access to some properties of a DOM input element node. |
| 46 class WebInputElement : public WebFormControlElement { | 49 class WebInputElement : public WebFormControlElement { |
| 47 public: | 50 public: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 WEBKIT_EXPORT void startSpeechInput(); | 110 WEBKIT_EXPORT void startSpeechInput(); |
| 108 WEBKIT_EXPORT void stopSpeechInput(); | 111 WEBKIT_EXPORT void stopSpeechInput(); |
| 109 | 112 |
| 110 // Exposes the default value of the maxLength attribute. | 113 // Exposes the default value of the maxLength attribute. |
| 111 WEBKIT_EXPORT static int defaultMaxLength(); | 114 WEBKIT_EXPORT static int defaultMaxLength(); |
| 112 | 115 |
| 113 // Return the decoration added by the specified decorator if one exists. | 116 // Return the decoration added by the specified decorator if one exists. |
| 114 WEBKIT_EXPORT WebElement decorationElementFor(WebTextFieldDecoratorClien
t*); | 117 WEBKIT_EXPORT WebElement decorationElementFor(WebTextFieldDecoratorClien
t*); |
| 115 | 118 |
| 116 #if WEBKIT_IMPLEMENTATION | 119 #if WEBKIT_IMPLEMENTATION |
| 117 WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); | 120 WebInputElement(WebCore::Handle<WebCore::HTMLInputElement>); |
| 118 WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputEleme
nt>&); | 121 WebInputElement& operator=(WebCore::Handle<WebCore::HTMLInputElement>); |
| 119 operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const; | 122 operator WebCore::Handle<WebCore::HTMLInputElement>() const; |
| 120 #endif | 123 #endif |
| 121 }; | 124 }; |
| 122 | 125 |
| 123 WEBKIT_EXPORT WebInputElement* toWebInputElement(WebElement*); | 126 WEBKIT_EXPORT WebInputElement* toWebInputElement(WebElement*); |
| 124 | 127 |
| 125 inline const WebInputElement* toWebInputElement(const WebElement* element) | 128 inline const WebInputElement* toWebInputElement(const WebElement* element) |
| 126 { | 129 { |
| 127 return toWebInputElement(const_cast<WebElement*>(element)); | 130 return toWebInputElement(const_cast<WebElement*>(element)); |
| 128 } | 131 } |
| 129 | 132 |
| 130 } // namespace WebKit | 133 } // namespace WebKit |
| 131 | 134 |
| 132 #endif | 135 #endif |
| OLD | NEW |