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

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

Issue 15769018: [Autofill] Determine Popup RTLness from page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android compile 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
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_client.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 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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 if (!IsAutofillableElement(element)) 707 if (!IsAutofillableElement(element))
708 return; 708 return;
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();
718 field->is_checkable = IsCheckableElement(input_element); 717 field->is_checkable = IsCheckableElement(input_element);
719 field->is_checked = input_element->isChecked(); 718 field->is_checked = input_element->isChecked();
719 field->should_autocomplete = input_element->autoComplete();
720 field->text_direction = input_element->directionForFormData() == "rtl" ?
721 base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT;
720 } else if (extract_mask & EXTRACT_OPTIONS) { 722 } else if (extract_mask & EXTRACT_OPTIONS) {
721 // Set option strings on the field if available. 723 // Set option strings on the field if available.
722 DCHECK(IsSelectElement(element)); 724 DCHECK(IsSelectElement(element));
723 const WebSelectElement select_element = element.toConst<WebSelectElement>(); 725 const WebSelectElement select_element = element.toConst<WebSelectElement>();
724 GetOptionStringsFromElement(select_element, 726 GetOptionStringsFromElement(select_element,
725 &field->option_values, 727 &field->option_values,
726 &field->option_contents); 728 &field->option_contents);
727 } 729 }
728 730
729 if (!(extract_mask & EXTRACT_VALUE)) 731 if (!(extract_mask & EXTRACT_VALUE))
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 continue; 1023 continue;
1022 1024
1023 if (input_element->isAutofilled()) 1025 if (input_element->isAutofilled())
1024 return true; 1026 return true;
1025 } 1027 }
1026 1028
1027 return false; 1029 return false;
1028 } 1030 }
1029 1031
1030 } // namespace autofill 1032 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698