Commit 1c03b37a authored by David Tseng's avatar David Tseng Committed by Commit Bot

Fixes accessibility focus highlighting for <select> and descendants

R=dmazzoni@chromium.org

Fixed: 1110367
Change-Id: I7095c3cfa3e1614f52f11b8dfd4869129a7b7b59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2408239Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806541}
parent 94584b82
......@@ -3621,9 +3621,16 @@ void AXObject::GetRelativeBounds(AXObject** out_container,
AXObjectCache().GetDocument().GetFrame()->View();
IntRect root_frame_rect =
root_view->FrameToScreen(root_view->FrameRect());
// Screen coordinates are in DIP without device scale factor applied.
// Accessibility expects device scale factor applied here which is
// unapplied at the destination AXTree.
float scale_factor =
view->GetPage()->GetChromeClient().WindowToViewportScalar(
layout_object->GetFrame(), 1.0f);
out_bounds_in_container.SetLocation(
FloatPoint(frame_rect.X() - root_frame_rect.X(),
frame_rect.Y() - root_frame_rect.Y()));
FloatPoint(scale_factor * (frame_rect.X() - root_frame_rect.X()),
scale_factor * (frame_rect.Y() - root_frame_rect.Y())));
}
}
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment