Skip to content

Commit

Permalink
fix: use coordinate offsets in ShowAutofillPopup (#20232)
Browse files Browse the repository at this point in the history
* fix: use coordinate offsets in ShowAutofillPopup

* fix: silence coord int->float narrowing conversion

Minor fix to silence clang-tidy warning about implicit range narrowing.
Not a huge deal but the revision is also easier to read.

clang-tidy: bugprone-narrowing-conversions
  • Loading branch information
ckerr authored and codebytere committed Sep 19, 2019
1 parent 3f5833c commit 63f08fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shell/browser/atom_autofill_driver.cc
Expand Up @@ -47,13 +47,13 @@ void AutofillDriver::ShowAutofillPopup(
auto* view = web_contents->web_contents()->GetMainFrame()->GetView();
auto offset = view->GetViewBounds().origin() -
embedder_view->GetViewBounds().origin();
popup_bounds.Offset(offset.x(), offset.y());
popup_bounds.Offset(offset);
embedder_frame_host = embedder->web_contents()->GetMainFrame();
}

autofill_popup_->CreateView(render_frame_host_, embedder_frame_host, osr,
web_contents->owner_window()->content_view(),
bounds);
popup_bounds);
autofill_popup_->SetItems(values, labels);
}

Expand Down

0 comments on commit 63f08fc

Please sign in to comment.