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

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

Issue 15659015: Remember the initial checked state of {radiobutton|checkbox}. If autofill flow is not autocheckout,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/autofill/form_autofill_browsertest.cc ('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 (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
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
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
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/form_autofill_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698