| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Returns true if |element| is a textarea element. | 120 // Returns true if |element| is a textarea element. |
| 121 bool IsTextAreaElement(const blink::WebFormControlElement& element); | 121 bool IsTextAreaElement(const blink::WebFormControlElement& element); |
| 122 | 122 |
| 123 // Returns true if |element| is a checkbox or a radio button element. | 123 // Returns true if |element| is a checkbox or a radio button element. |
| 124 bool IsCheckableElement(const blink::WebInputElement* element); | 124 bool IsCheckableElement(const blink::WebInputElement* element); |
| 125 | 125 |
| 126 // Returns true if |element| is one of the input element types that can be | 126 // Returns true if |element| is one of the input element types that can be |
| 127 // autofilled. {Text, Radiobutton, Checkbox}. | 127 // autofilled. {Text, Radiobutton, Checkbox}. |
| 128 bool IsAutofillableInputElement(const blink::WebInputElement* element); | 128 bool IsAutofillableInputElement(const blink::WebInputElement* element); |
| 129 | 129 |
| 130 // Returns true if |element| is one of the element types that can be autofilled. |
| 131 // {Text, Radiobutton, Checkbox, Select, TextArea}. |
| 132 bool IsAutofillableElement(const blink::WebFormControlElement& element); |
| 133 |
| 130 // True if this node takes up space in the layout, ie. this node or a descendant | 134 // True if this node takes up space in the layout, ie. this node or a descendant |
| 131 // has a non-empty bounding bounding client rect. | 135 // has a non-empty bounding bounding client rect. |
| 132 // | 136 // |
| 133 // TODO(esprehn): This isn't really about visibility, it's about the size. | 137 // TODO(esprehn): This isn't really about visibility, it's about the size. |
| 134 // We should remove this function and just call hasNonEmptyLayoutSize() | 138 // We should remove this function and just call hasNonEmptyLayoutSize() |
| 135 // directly. | 139 // directly. |
| 136 bool IsWebNodeVisible(const blink::WebNode& node); | 140 bool IsWebNodeVisible(const blink::WebNode& node); |
| 137 | 141 |
| 138 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| | 142 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| |
| 139 // attribute. | 143 // attribute. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // |input_element|. Note that |user_input| cannot be easily derived from | 272 // |input_element|. Note that |user_input| cannot be easily derived from |
| 269 // |input_element| by calling value(), because of http://crbug.com/507714. | 273 // |input_element| by calling value(), because of http://crbug.com/507714. |
| 270 void PreviewSuggestion(const base::string16& suggestion, | 274 void PreviewSuggestion(const base::string16& suggestion, |
| 271 const base::string16& user_input, | 275 const base::string16& user_input, |
| 272 blink::WebFormControlElement* input_element); | 276 blink::WebFormControlElement* input_element); |
| 273 | 277 |
| 274 } // namespace form_util | 278 } // namespace form_util |
| 275 } // namespace autofill | 279 } // namespace autofill |
| 276 | 280 |
| 277 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 281 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| OLD | NEW |