[go: up one dir, main page]

[Autofill Assistant] Make ConfigureBottomSheetAction wait for resize to
happen.

Before this change, ConfigureBottomSheetAction would return immediately
after asking for the viewport to be resized. Depending on how quickly
that happened, a Focus action following ConfigureBottomSheetAction might
see the window height before the resize and not be able to focus.

The current workaround for that is to wait after resizing the viewport
before focusing on an element, but the time it takes varies a lot.

With this change, ConfigureBottomSheetAction waits until the viewport
resize has been seen from the Javascript side, so we don't wait longer
than strictly necessary. A maximum wait time avoids scripts getting
stuck in this action.

This is the M-76 merge for http://crrev/c/1640408.

(cherry picked from commit fc4d56bbaab6747fe94930f83cb4c3e4da02766c)

Bug: 973038
Bug: b/133665079
Change-Id: Ia37076710634542bb4f15c77f30275c234383cb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1640408
Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
Reviewed-by: Jordan Demeulenaere <jdemeulenaere@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#665557}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658008
Reviewed-by: Stephane Zermatten <szermatt@chromium.org>
Cr-Commit-Position: refs/branch-heads/3809@{#282}
Cr-Branched-From: d82dec1a818f378c464ba307ddd9c92133eac355-refs/heads/master@{#665002}
16 files changed