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

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

Issue 1245623003: [Autofill] Copy attributes for the select elements as well. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated heuristic tests Created 5 years, 5 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
« no previous file with comments | « chrome/test/data/autofill/heuristics/output/25_checkout_m_llbean.com.out ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "components/autofill/content/renderer/form_autofill_util.h" 5 #include "components/autofill/content/renderer/form_autofill_util.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 field->autocomplete_attribute = "x-max-data-length-exceeded"; 1184 field->autocomplete_attribute = "x-max-data-length-exceeded";
1185 } 1185 }
1186 if (base::LowerCaseEqualsASCII(element.getAttribute(kRole), "presentation")) 1186 if (base::LowerCaseEqualsASCII(element.getAttribute(kRole), "presentation"))
1187 field->role = FormFieldData::ROLE_ATTRIBUTE_PRESENTATION; 1187 field->role = FormFieldData::ROLE_ATTRIBUTE_PRESENTATION;
1188 1188
1189 if (!IsAutofillableElement(element)) 1189 if (!IsAutofillableElement(element))
1190 return; 1190 return;
1191 1191
1192 const WebInputElement* input_element = toWebInputElement(&element); 1192 const WebInputElement* input_element = toWebInputElement(&element);
1193 if (IsAutofillableInputElement(input_element) || 1193 if (IsAutofillableInputElement(input_element) ||
1194 IsTextAreaElement(element)) { 1194 IsTextAreaElement(element) ||
1195 IsSelectElement(element)) {
1195 field->is_autofilled = element.isAutofilled(); 1196 field->is_autofilled = element.isAutofilled();
1196 field->is_focusable = element.isFocusable(); 1197 field->is_focusable = element.isFocusable();
1197 field->should_autocomplete = element.autoComplete(); 1198 field->should_autocomplete = element.autoComplete();
1198 field->text_direction = element.directionForFormData() == 1199 field->text_direction = element.directionForFormData() ==
1199 "rtl" ? base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT; 1200 "rtl" ? base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT;
1200 } 1201 }
1201 1202
1202 if (IsAutofillableInputElement(input_element)) { 1203 if (IsAutofillableInputElement(input_element)) {
1203 if (IsTextInput(input_element)) 1204 if (IsTextInput(input_element))
1204 field->max_length = input_element->maxLength(); 1205 field->max_length = input_element->maxLength();
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 1529
1529 gfx::RectF GetScaledBoundingBox(float scale, WebElement* element) { 1530 gfx::RectF GetScaledBoundingBox(float scale, WebElement* element) {
1530 gfx::Rect bounding_box(element->boundsInViewportSpace()); 1531 gfx::Rect bounding_box(element->boundsInViewportSpace());
1531 return gfx::RectF(bounding_box.x() * scale, 1532 return gfx::RectF(bounding_box.x() * scale,
1532 bounding_box.y() * scale, 1533 bounding_box.y() * scale,
1533 bounding_box.width() * scale, 1534 bounding_box.width() * scale,
1534 bounding_box.height() * scale); 1535 bounding_box.height() * scale);
1535 } 1536 }
1536 1537
1537 } // namespace autofill 1538 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/test/data/autofill/heuristics/output/25_checkout_m_llbean.com.out ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698