OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 BLINK_EXPORT bool isEnabled() const; | 57 BLINK_EXPORT bool isEnabled() const; |
58 BLINK_EXPORT bool isReadOnly() const; | 58 BLINK_EXPORT bool isReadOnly() const; |
59 BLINK_EXPORT WebString formControlName() const; | 59 BLINK_EXPORT WebString formControlName() const; |
60 BLINK_EXPORT WebString formControlType() const; | 60 BLINK_EXPORT WebString formControlType() const; |
61 | 61 |
62 BLINK_EXPORT void dispatchFormControlChangeEvent(); | 62 BLINK_EXPORT void dispatchFormControlChangeEvent(); |
63 | 63 |
64 BLINK_EXPORT bool isAutofilled() const; | 64 BLINK_EXPORT bool isAutofilled() const; |
65 BLINK_EXPORT void setAutofilled(bool); | 65 BLINK_EXPORT void setAutofilled(bool); |
66 | 66 |
67 // This returns the non-sanitized, exact value inside the text input field | 67 // Returns true if autocomplete attribute of the element is not set as "off"
. |
| 68 BLINK_EXPORT bool autoComplete() const; |
| 69 |
| 70 // Sets value for input element, textarea element and select element. For se
lect |
| 71 // element it finds the option with value matches the given parameter and ma
ke the |
| 72 // option as the current selection. |
| 73 BLINK_EXPORT void setValue(const WebString&, bool sendChangeEvent = false); |
| 74 // Returns value of element. For select element, it returns the value of |
| 75 // the selected option if present. If no selected option, an empty string |
| 76 // is returned. For any other types of elements, a null string is returned. |
| 77 BLINK_EXPORT WebString value() const; |
| 78 // Sets suggested value for element. The goal of introducing suggested value |
| 79 // is to not leak any information to JavaScript. |
| 80 BLINK_EXPORT void setSuggestedValue(const WebString&); |
| 81 // Returns suggested value for input element or textarea element. If neither |
| 82 // input element nor textarea element, a null string is returned. |
| 83 BLINK_EXPORT WebString suggestedValue() const; |
| 84 |
| 85 // Returns the non-sanitized, exact value inside the text input field |
68 // or insisde the textarea. If neither input element nor textarea element, | 86 // or insisde the textarea. If neither input element nor textarea element, |
69 // a null string is returned. | 87 // a null string is returned. |
70 BLINK_EXPORT WebString editingValue() const; | 88 BLINK_EXPORT WebString editingValue() const; |
71 | 89 |
72 // The returned value represents a cursor/caret position at the current | 90 // Sets character selection range. |
| 91 BLINK_EXPORT void setSelectionRange(int start, int end); |
| 92 // Returned value represents a cursor/caret position at the current |
73 // selection's start for text input field or textarea. If neither input | 93 // selection's start for text input field or textarea. If neither input |
74 // element nor textarea element, 0 is returned. | 94 // element nor textarea element, 0 is returned. |
75 BLINK_EXPORT int selectionStart() const; | 95 BLINK_EXPORT int selectionStart() const; |
76 // The returned value represents a cursor/caret position at the current | 96 // Returned value represents a cursor/caret position at the current |
77 // selection's end for text input field or textarea. If neither input | 97 // selection's end for text input field or textarea. If neither input |
78 // element nor textarea element, 0 is returned. | 98 // element nor textarea element, 0 is returned. |
79 BLINK_EXPORT int selectionEnd() const; | 99 BLINK_EXPORT int selectionEnd() const; |
80 | 100 |
| 101 // Returns direction of text of element. |
| 102 BLINK_EXPORT WebString directionForFormData() const; |
| 103 |
81 // Returns the name that should be used for the specified |element| when | 104 // Returns the name that should be used for the specified |element| when |
82 // storing autofill data. This is either the field name or its id, an empty | 105 // storing autofill data. This is either the field name or its id, an empty |
83 // string if it has no name and no id. | 106 // string if it has no name and no id. |
84 BLINK_EXPORT WebString nameForAutofill() const; | 107 BLINK_EXPORT WebString nameForAutofill() const; |
85 | 108 |
86 BLINK_EXPORT WebFormElement form() const; | 109 BLINK_EXPORT WebFormElement form() const; |
87 | 110 |
88 #if BLINK_IMPLEMENTATION | 111 #if BLINK_IMPLEMENTATION |
89 WebFormControlElement(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>
&); | 112 WebFormControlElement(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>
&); |
90 WebFormControlElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormCont
rolElement>&); | 113 WebFormControlElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormCont
rolElement>&); |
91 operator WTF::PassRefPtr<WebCore::HTMLFormControlElement>() const; | 114 operator WTF::PassRefPtr<WebCore::HTMLFormControlElement>() const; |
92 #endif | 115 #endif |
93 }; | 116 }; |
94 | 117 |
95 } // namespace blink | 118 } // namespace blink |
96 | 119 |
97 #endif | 120 #endif |
OLD | NEW |