Adjust location of Autofill popup for --use-zoom-for-dsf
As shown crbug.com/737777#c51, enabling --use-zoom-for-dsf locates Autofill popup in a wrong place. It is because AutofillPopupViewAndroid::OnSuggestionsChanged() and AwAutofillClient::ShowAutofillPopupImpl() passes element_bounds in the CSS scale as an argument to ViewAndroid::SetAnchorRect() that must receive the device scaled bounds argument when --use-zoom-for-dsf is enabled. This CL lets ViewAndroid::SetAnchorRect() receive the CSS scaled bounds argument and scales down the bounds argument as the CSS scale that ContentViewCore::ShowSelectPopupMenu() gives to ViewAndroid::SetAnchorRect(). In addition, this CL sets ViewAndroid::content_offset() as the CSS scale, which must be in the CSS scale for ViewAndroid::SetAnchorRect(), RenderWidgetHostImpl::WindowSnapshotReachedScreen(), ContextMenuHelper::ShowContextMenu(), and TabAndroid::ShowMediaDownloadInProductHelp(). By refactoring RenderWidgetHostViewAndroid::OnFrameMetadataUpdated(), it also relocates the position of IME CursorAnchorInfo API to the correct position when --use-zoom-for-dsf is enabled. BUG=737777 Change-Id: I8f2268562735b822478455dab7581b6418a397fd Reviewed-on: https://chromium-review.googlesource.com/771491 Commit-Queue: Jaebaek Seo <jaebaek@chromium.org> Reviewed-by:Jinsuk Kim <jinsukkim@chromium.org> Reviewed-by:
Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#517028}
Showing
Please register or sign in to comment