Commit 60110d69 authored by Anton Suslov's avatar Anton Suslov Committed by Commit Bot

Account for DPI/Screen coordinate discrepancy for find in page selection box.

On systems that use-zoom-for-dsf with HiDPI find bar would shift incorrectly
when obscuring search results due to WebKit returning selection box in
screen coordinates without converting them to display coords.

In order to write a proper test, we'd have to check if find bar still
overlapped the selection box, but there is no way to know where the box is
without somehow using FindReply message, which was sending wrong coordinates.

Bug: 755958
Change-Id: Ifb1c1615aa019c876c3c9488b659b060ca8f8116
Reviewed-on: https://chromium-review.googlesource.com/620652
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501246}
parent abd57f32
......@@ -6940,11 +6940,14 @@ void RenderFrameImpl::SendFindReply(int request_id,
const WebRect& selection_rect,
bool final_status_update) {
DCHECK_GE(ordinal, -1);
WebRect converted_rect = selection_rect;
GetRenderWidget()->ConvertViewportToWindow(&converted_rect);
Send(new FrameHostMsg_Find_Reply(routing_id_,
request_id,
match_count,
selection_rect,
converted_rect,
ordinal,
final_status_update));
}
......
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