[Mac a11y] Anchor the context menu to the center of the first oultine
rect of multiline elements. When a user opens a context menu via a keyboard shortcut, EventHandler::ShowNonLocatedContextMenu is called, which finds the center coordinate of the target element and opens a context menu there. When the target element is a multiline link, the center of that element's bounding box is often not on the link itself, which is a strange visual experience. This CL makes ShowNonLocatedContextMenu take the center coordinate of the first outline rect of the element. The outline rect is elsewhere used to show the focus highlight of multiline links. This ensures that the context menu is anchored to the link text itself. AX-Relnotes: Context menus opened on multiline links are visually anchored to the link text. Bug: 1121180 Change-Id: If6c3877e8abed9016a2d204e777142f27ca5e27f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412906Reviewed-by:David Bokan <bokan@chromium.org> Reviewed-by:
Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Abigail Klein <abigailbklein@google.com> Cr-Commit-Position: refs/heads/master@{#809050}
Showing
Please register or sign in to comment