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

Side by Side Diff: components/autofill/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
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 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->is_rtl = input_element->directionForFormData() == "rtl";
720 field->should_autocomplete = input_element->autoComplete();
720 } else if (extract_mask & EXTRACT_OPTIONS) { 721 } else if (extract_mask & EXTRACT_OPTIONS) {
721 // Set option strings on the field if available. 722 // Set option strings on the field if available.
722 DCHECK(IsSelectElement(element)); 723 DCHECK(IsSelectElement(element));
723 const WebSelectElement select_element = element.toConst<WebSelectElement>(); 724 const WebSelectElement select_element = element.toConst<WebSelectElement>();
724 GetOptionStringsFromElement(select_element, 725 GetOptionStringsFromElement(select_element,
725 &field->option_values, 726 &field->option_values,
726 &field->option_contents); 727 &field->option_contents);
727 } 728 }
728 729
729 if (!(extract_mask & EXTRACT_VALUE)) 730 if (!(extract_mask & EXTRACT_VALUE))
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 continue; 1022 continue;
1022 1023
1023 if (input_element->isAutofilled()) 1024 if (input_element->isAutofilled())
1024 return true; 1025 return true;
1025 } 1026 }
1026 1027
1027 return false; 1028 return false;
1028 } 1029 }
1029 1030
1030 } // namespace autofill 1031 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698