Skip to content

Commit

Permalink
Remove unnecessary double lookup of tap_targets
Browse files Browse the repository at this point in the history
Introduced in edcdf970e101df1af78180722f4235a7d3ec4924.

Change-Id: I9743b44838a92f87f96b74c05044f2c02b271804
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3430840
Auto-Submit: Andrew Gaul <gaul@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#966404}
NOKEYCHECK=True
GitOrigin-RevId: c765ced7f1a97fb87acb70e223c6fbc486e69e17
  • Loading branch information
gaul authored and copybara-github committed Feb 3, 2022
1 parent 8010a8c commit fdc5daf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ bool AddElement(const LayoutObject* object,
if (!tap_targets->insert(object).is_new_entry)
return false;

if (!rect.IsEmpty() && !tap_targets->insert(object).is_new_entry) {
if (!rect.IsEmpty()) {
const int top = ClampTo<int>(rect.y() - finger_radius);
const int bottom = ClampTo<int>(rect.bottom() + finger_radius);
const int left = ClampTo<int>(rect.x() - finger_radius);
Expand Down

0 comments on commit fdc5daf

Please sign in to comment.