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

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: Created 3 years, 9 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool IsCheckableElement(const blink::WebInputElement* element); 126 bool IsCheckableElement(const blink::WebInputElement* element);
127 127
128 // Returns true if |element| is one of the input element types that can be 128 // Returns true if |element| is one of the input element types that can be
129 // autofilled. {Text, Radiobutton, Checkbox}. 129 // autofilled. {Text, Radiobutton, Checkbox}.
130 bool IsAutofillableInputElement(const blink::WebInputElement* element); 130 bool IsAutofillableInputElement(const blink::WebInputElement* element);
131 131
132 // Returns true if |element| is one of the element types that can be autofilled. 132 // Returns true if |element| is one of the element types that can be autofilled.
133 // {Text, Radiobutton, Checkbox, Select, TextArea}. 133 // {Text, Radiobutton, Checkbox, Select, TextArea}.
134 bool IsAutofillableElement(const blink::WebFormControlElement& element); 134 bool IsAutofillableElement(const blink::WebFormControlElement& element);
135 135
136 // True if this node takes up space in the layout, ie. this node or a descendant 136 // True if this node can take focus. If layout is blocked, then the function
137 // has a non-empty bounding bounding client rect. 137 // checks if the element takes up space in the layout, ie. this element or a
138 // 138 // descendant has a non-empty bounding bounding client rect.
139 // TODO(esprehn): This isn't really about visibility, it's about the size. 139 bool IsWebElementVisible(const blink::WebElement& element);
140 // We should remove this function and just call hasNonEmptyLayoutSize()
141 // directly.
142 bool IsWebNodeVisible(const blink::WebNode& node);
143 140
144 // Returns the form's |name| attribute if non-empty; otherwise the form's |id| 141 // Returns the form's |name| attribute if non-empty; otherwise the form's |id|
145 // attribute. 142 // attribute.
146 const base::string16 GetFormIdentifier(const blink::WebFormElement& form); 143 const base::string16 GetFormIdentifier(const blink::WebFormElement& form);
147 144
148 // Returns all the auto-fillable form control elements in |control_elements|. 145 // Returns all the auto-fillable form control elements in |control_elements|.
149 std::vector<blink::WebFormControlElement> ExtractAutofillableElementsFromSet( 146 std::vector<blink::WebFormControlElement> ExtractAutofillableElementsFromSet(
150 const blink::WebVector<blink::WebFormControlElement>& control_elements); 147 const blink::WebVector<blink::WebFormControlElement>& control_elements);
151 148
152 // Returns all the auto-fillable form control elements in |form_element|. 149 // Returns all the auto-fillable form control elements in |form_element|.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // |input_element|. Note that |user_input| cannot be easily derived from 271 // |input_element|. Note that |user_input| cannot be easily derived from
275 // |input_element| by calling value(), because of http://crbug.com/507714. 272 // |input_element| by calling value(), because of http://crbug.com/507714.
276 void PreviewSuggestion(const base::string16& suggestion, 273 void PreviewSuggestion(const base::string16& suggestion,
277 const base::string16& user_input, 274 const base::string16& user_input,
278 blink::WebFormControlElement* input_element); 275 blink::WebFormControlElement* input_element);
279 276
280 } // namespace form_util 277 } // namespace form_util
281 } // namespace autofill 278 } // namespace autofill
282 279
283 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ 280 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698