Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Changes needed to fix brave/browser-laptop#3359
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton authored and bridiver committed Sep 16, 2016
1 parent 7e59309 commit 78d04c3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions atom/browser/autofill/atom_autofill_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 78d04c3

Please sign in to comment.