OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/form_autofill_util.h" | 5 #include "components/autofill/renderer/form_autofill_util.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 | 709 |
710 const WebInputElement* input_element = toWebInputElement(&element); | 710 const WebInputElement* input_element = toWebInputElement(&element); |
711 if (IsAutofillableInputElement(input_element)) { | 711 if (IsAutofillableInputElement(input_element)) { |
712 if (IsTextInput(input_element)) | 712 if (IsTextInput(input_element)) |
713 field->max_length = input_element->maxLength(); | 713 field->max_length = input_element->maxLength(); |
714 | 714 |
715 field->is_autofilled = input_element->isAutofilled(); | 715 field->is_autofilled = input_element->isAutofilled(); |
716 field->is_focusable = input_element->isFocusable(); | 716 field->is_focusable = input_element->isFocusable(); |
717 field->should_autocomplete = input_element->autoComplete(); | 717 field->should_autocomplete = input_element->autoComplete(); |
718 field->is_checkable = IsCheckableElement(input_element); | 718 field->is_checkable = IsCheckableElement(input_element); |
| 719 field->is_checked = input_element->isChecked(); |
719 } else if (extract_mask & EXTRACT_OPTIONS) { | 720 } else if (extract_mask & EXTRACT_OPTIONS) { |
720 // Set option strings on the field if available. | 721 // Set option strings on the field if available. |
721 DCHECK(IsSelectElement(element)); | 722 DCHECK(IsSelectElement(element)); |
722 const WebSelectElement select_element = element.toConst<WebSelectElement>(); | 723 const WebSelectElement select_element = element.toConst<WebSelectElement>(); |
723 GetOptionStringsFromElement(select_element, | 724 GetOptionStringsFromElement(select_element, |
724 &field->option_values, | 725 &field->option_values, |
725 &field->option_contents); | 726 &field->option_contents); |
726 } | 727 } |
727 | 728 |
728 if (!(extract_mask & EXTRACT_VALUE)) | 729 if (!(extract_mask & EXTRACT_VALUE)) |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 continue; | 1021 continue; |
1021 | 1022 |
1022 if (input_element->isAutofilled()) | 1023 if (input_element->isAutofilled()) |
1023 return true; | 1024 return true; |
1024 } | 1025 } |
1025 | 1026 |
1026 return false; | 1027 return false; |
1027 } | 1028 } |
1028 | 1029 |
1029 } // namespace autofill | 1030 } // namespace autofill |
OLD | NEW |