Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: components/autofill/content/renderer/form_autofill_util.h

Issue 2769023003: [Password Manager] Check node visibility with isFocusable instead of hasNonEmptyLayoutSize (Closed)
Patch Set: Added comment to IsWebElementVisible Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 bool IsCheckableElement(const blink::WebInputElement* element); 122 bool IsCheckableElement(const blink::WebInputElement* element);
123 123
124 // Returns true if |element| is one of the input element types that can be 124 // Returns true if |element| is one of the input element types that can be
125 // autofilled. {Text, Radiobutton, Checkbox}. 125 // autofilled. {Text, Radiobutton, Checkbox}.
126 bool IsAutofillableInputElement(const blink::WebInputElement* element); 126 bool IsAutofillableInputElement(const blink::WebInputElement* element);
127 127
128 // Returns true if |element| is one of the element types that can be autofilled. 128 // Returns true if |element| is one of the element types that can be autofilled.
129 // {Text, Radiobutton, Checkbox, Select, TextArea}. 129 // {Text, Radiobutton, Checkbox, Select, TextArea}.
130 bool IsAutofillableElement(const blink::WebFormControlElement& element); 130 bool IsAutofillableElement(const blink::WebFormControlElement& element);
131 131
132 // True if this node takes up space in the layout, ie. this node or a descendant 132 // True if this node can take focus. If layout is blocked, then the function
133 // has a non-empty bounding bounding client rect. 133 // checks if the element takes up space in the layout, ie. this element or a
134 // 134 // descendant has a non-empty bounding bounding client rect.
135 // TODO(esprehn): This isn't really about visibility, it's about the size. 135 bool IsWebElementVisible(const blink::WebElement& element);
136 // We should remove this function and just call hasNonEmptyLayoutSize()
137 // directly.
138 bool IsWebNodeVisible(const blink::WebNode& node);
139 136
140 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| 137 // Returns the form's |name| attribute if non-empty; otherwise the form's |id|
141 // attribute. 138 // attribute.
142 const base::string16 GetFormIdentifier(const blink::WebFormElement& form); 139 const base::string16 GetFormIdentifier(const blink::WebFormElement& form);
143 140
144 // Returns all the auto-fillable form control elements in |control_elements|. 141 // Returns all the auto-fillable form control elements in |control_elements|.
145 std::vector<blink::WebFormControlElement> ExtractAutofillableElementsFromSet( 142 std::vector<blink::WebFormControlElement> ExtractAutofillableElementsFromSet(
146 const blink::WebVector<blink::WebFormControlElement>& control_elements); 143 const blink::WebVector<blink::WebFormControlElement>& control_elements);
147 144
148 // Returns all the auto-fillable form control elements in |form_element|. 145 // Returns all the auto-fillable form control elements in |form_element|.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // |input_element|. Note that |user_input| cannot be easily derived from 267 // |input_element|. Note that |user_input| cannot be easily derived from
271 // |input_element| by calling value(), because of http://crbug.com/507714. 268 // |input_element| by calling value(), because of http://crbug.com/507714.
272 void PreviewSuggestion(const base::string16& suggestion, 269 void PreviewSuggestion(const base::string16& suggestion,
273 const base::string16& user_input, 270 const base::string16& user_input,
274 blink::WebFormControlElement* input_element); 271 blink::WebFormControlElement* input_element);
275 272
276 } // namespace form_util 273 } // namespace form_util
277 } // namespace autofill 274 } // namespace autofill
278 275
279 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ 276 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698