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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |