From 78d04c327086b080e1a9584c0a0001cac51acecf Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Wed, 24 Aug 2016 15:15:40 -0700 Subject: [PATCH] Changes needed to fix https://github.com/brave/browser-laptop/issues/3359 --- atom/browser/autofill/atom_autofill_client.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/atom/browser/autofill/atom_autofill_client.cc b/atom/browser/autofill/atom_autofill_client.cc index 3dd9f95be..75cce0dcc 100644 --- a/atom/browser/autofill/atom_autofill_client.cc +++ b/atom/browser/autofill/atom_autofill_client.cc @@ -153,14 +153,14 @@ void AtomAutofillClient::ShowAutofillPopup( v8::HandleScope handle_scope(api_web_contents_->isolate()); mate::Dictionary rect = mate::Dictionary::CreateEmpty(api_web_contents_->isolate()); - // Convert element_bounds to be in screen space. gfx::Rect client_area = web_contents()->GetContainerBounds(); - gfx::RectF element_bounds_in_screen_space = - element_bounds + client_area.OffsetFromOrigin(); - rect.Set("x", element_bounds_in_screen_space.x()); - rect.Set("y", element_bounds_in_screen_space.y()); - rect.Set("width", element_bounds_in_screen_space.width()); - rect.Set("height", element_bounds_in_screen_space.height()); + rect.Set("x", element_bounds.x()); + rect.Set("y", element_bounds.y()); + rect.Set("width", element_bounds.width()); + rect.Set("height", element_bounds.height()); + rect.Set("clientWidth", client_area.width()); + rect.Set("clientHeight", client_area.height()); + api_web_contents_->Emit("show-autofill-popup", suggestions, rect);