| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // This returns true for all of textfield-looking types such as text, | 54 // This returns true for all of textfield-looking types such as text, |
| 55 // password, search, email, url, and number. | 55 // password, search, email, url, and number. |
| 56 BLINK_EXPORT bool isTextField() const; | 56 BLINK_EXPORT bool isTextField() const; |
| 57 // This returns true only for type=text. | 57 // This returns true only for type=text. |
| 58 BLINK_EXPORT bool isText() const; | 58 BLINK_EXPORT bool isText() const; |
| 59 BLINK_EXPORT bool isEmailField() const; | 59 BLINK_EXPORT bool isEmailField() const; |
| 60 BLINK_EXPORT bool isPasswordField() const; | 60 BLINK_EXPORT bool isPasswordField() const; |
| 61 BLINK_EXPORT bool isImageButton() const; | 61 BLINK_EXPORT bool isImageButton() const; |
| 62 BLINK_EXPORT bool isRadioButton() const; | 62 BLINK_EXPORT bool isRadioButton() const; |
| 63 BLINK_EXPORT bool isCheckbox() const; | 63 BLINK_EXPORT bool isCheckbox() const; |
| 64 // This has different behavior from 'maxLength' IDL attribute, it returns |
| 65 // HTMLInputElement::maximumLength when no valid has been set, |
| 66 // whereas 'maxLength' IDL attribute returns -1. |
| 64 BLINK_EXPORT int maxLength() const; | 67 BLINK_EXPORT int maxLength() const; |
| 65 BLINK_EXPORT void setActivatedSubmit(bool); | 68 BLINK_EXPORT void setActivatedSubmit(bool); |
| 66 BLINK_EXPORT int size() const; | 69 BLINK_EXPORT int size() const; |
| 67 BLINK_EXPORT void setChecked(bool, bool sendEvents = false); | 70 BLINK_EXPORT void setChecked(bool, bool sendEvents = false); |
| 68 // Sets the value inside the text field without being sanitized. Can't be | 71 // Sets the value inside the text field without being sanitized. Can't be |
| 69 // used if a renderer doesn't exist or on a non text field type. Caret will | 72 // used if a renderer doesn't exist or on a non text field type. Caret will |
| 70 // be moved to the end. | 73 // be moved to the end. |
| 71 BLINK_EXPORT void setEditingValue(const WebString&); | 74 BLINK_EXPORT void setEditingValue(const WebString&); |
| 72 BLINK_EXPORT bool isValidValue(const WebString&) const; | 75 BLINK_EXPORT bool isValidValue(const WebString&) const; |
| 73 BLINK_EXPORT bool isChecked() const; | 76 BLINK_EXPORT bool isChecked() const; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 97 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*); | 100 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*); |
| 98 // This returns 0 if the specified WebElement is not a WebInputElement. | 101 // This returns 0 if the specified WebElement is not a WebInputElement. |
| 99 inline const WebInputElement* toWebInputElement(const WebElement* element) | 102 inline const WebInputElement* toWebInputElement(const WebElement* element) |
| 100 { | 103 { |
| 101 return toWebInputElement(const_cast<WebElement*>(element)); | 104 return toWebInputElement(const_cast<WebElement*>(element)); |
| 102 } | 105 } |
| 103 | 106 |
| 104 } // namespace blink | 107 } // namespace blink |
| 105 | 108 |
| 106 #endif | 109 #endif |
| OLD | NEW |