assistant: Scroll container when focus changes
Currently UiElementContainerView does not auto scroll when the focus in the AssistantCardElementView changes, e.g. during Tab traversing. This patch surfaces the OnFocusChangedInPage event from WebContentsImpl to NavigableContentsObserver, so that the UiElementContainerView can do scroll accordinglly. In this patch, if the bounds of the focused node is clipped by the container, it will scroll the node to the center of the container. Bug: 966806 Test: manual Change-Id: I974db35731b85fdcb957d9898ae921a12dbd7607 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1885253 Commit-Queue: Tao Wu <wutao@chromium.org> Reviewed-by:Camille Lamy <clamy@chromium.org> Reviewed-by:
Xiaohui Chen <xiaohuic@chromium.org> Reviewed-by:
Ken Rockot <rockot@google.com> Reviewed-by:
Sam McNally <sammc@chromium.org> Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#713180}
Showing
Please register or sign in to comment