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

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

Issue 1455143004: Use the window coordinate for the autofill bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years 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 | « no previous file | components/autofill/content/renderer/password_autofill_agent.cc » ('j') | 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/autofill_agent.h" 5 #include "components/autofill/content/renderer/autofill_agent.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 &data_list_labels); 724 &data_list_labels);
725 TrimStringVectorForIPC(&data_list_values); 725 TrimStringVectorForIPC(&data_list_values);
726 TrimStringVectorForIPC(&data_list_labels); 726 TrimStringVectorForIPC(&data_list_labels);
727 } 727 }
728 728
729 is_popup_possibly_visible_ = true; 729 is_popup_possibly_visible_ = true;
730 Send(new AutofillHostMsg_SetDataList(routing_id(), 730 Send(new AutofillHostMsg_SetDataList(routing_id(),
731 data_list_values, 731 data_list_values,
732 data_list_labels)); 732 data_list_labels));
733 733
734 blink::WebRect bounding_box_in_window = element_.boundsInViewport();
735 render_frame()->GetRenderView()->convertViewportToWindow(
736 &bounding_box_in_window);
737
734 Send(new AutofillHostMsg_QueryFormFieldAutofill( 738 Send(new AutofillHostMsg_QueryFormFieldAutofill(
735 routing_id(), autofill_query_id_, form, field, 739 routing_id(), autofill_query_id_, form, field,
736 gfx::RectF(element_.boundsInViewport()))); 740 gfx::RectF(bounding_box_in_window)));
737 } 741 }
738 742
739 void AutofillAgent::FillFieldWithValue(const base::string16& value, 743 void AutofillAgent::FillFieldWithValue(const base::string16& value,
740 WebInputElement* node) { 744 WebInputElement* node) {
741 base::AutoReset<bool> auto_reset(&ignore_text_changes_, true); 745 base::AutoReset<bool> auto_reset(&ignore_text_changes_, true);
742 node->setEditingValue(value.substr(0, node->maxLength())); 746 node->setEditingValue(value.substr(0, node->maxLength()));
743 } 747 }
744 748
745 void AutofillAgent::PreviewFieldWithValue(const base::string16& value, 749 void AutofillAgent::PreviewFieldWithValue(const base::string16& value,
746 WebInputElement* node) { 750 WebInputElement* node) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 816
813 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { 817 void AutofillAgent::LegacyAutofillAgent::OnDestruct() {
814 // No-op. Don't delete |this|. 818 // No-op. Don't delete |this|.
815 } 819 }
816 820
817 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { 821 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() {
818 agent_->FocusChangeComplete(); 822 agent_->FocusChangeComplete();
819 } 823 }
820 824
821 } // namespace autofill 825 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/renderer/password_autofill_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698