New issue
Advanced search Search tips

Issue 773669 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 2
Type: Bug

Blocking:
issue 737585



Sign in to add a comment

TouchSelection Handles/QuickMenu renders in the wrong position for embedded PDFs

Project Member Reported by wjmaclean@chromium.org, Oct 11 2017

Issue description

Chrome Version: ToT
OS: Win, Linux, CrOS

Pre-Req

What steps will reproduce the problem?
(1) Open a page that contains a PDF in a subframe
(2) Longpress to select text in the PDF


What is the expected result?

TouchSelection handles & quickmenu should appear in the correct position around the selected text.

What happens instead?

TouchSelection handles & quickmenu appear in the wrong position (unless the PDF subframe is in the top-left corner of the page.

This is happening because PDFWebContentsHelper does not know the offset of the PDF within the page.
 
Blocking: 737585
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17321e34f830fb514c28d32b1b30ab6991637b0b

commit 17321e34f830fb514c28d32b1b30ab6991637b0b
Author: W. James MacLean <wjmaclean@chromium.org>
Date: Mon Oct 16 17:35:41 2017

Add frame offset for PDF selection bounds.

This CL modifies PDFWebContentsHelper::SelectionChanged so that it
retrieves the offset of the PDF's frame within the page, and adds it to
the selection bounds. This allows the selection handles and quick menu
to display in the correct location.

Bug:  773669 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I4f3515b31d048f4e8368dfe35e092e252de0340c
Reviewed-on: https://chromium-review.googlesource.com/712696
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509091}
[modify] https://crrev.com/17321e34f830fb514c28d32b1b30ab6991637b0b/components/pdf/browser/pdf_web_contents_helper.cc
[modify] https://crrev.com/17321e34f830fb514c28d32b1b30ab6991637b0b/components/pdf/browser/pdf_web_contents_helper.h
[modify] https://crrev.com/17321e34f830fb514c28d32b1b30ab6991637b0b/content/browser/frame_host/render_widget_host_view_guest.cc
[modify] https://crrev.com/17321e34f830fb514c28d32b1b30ab6991637b0b/content/browser/frame_host/render_widget_host_view_guest.h
[modify] https://crrev.com/17321e34f830fb514c28d32b1b30ab6991637b0b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/17321e34f830fb514c28d32b1b30ab6991637b0b/content/browser/renderer_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/17321e34f830fb514c28d32b1b30ab6991637b0b/pdf/pdfium/pdfium_engine.cc

Status: Fixed (was: Started)

Comment 4 by ajha@chromium.org, Oct 17 2017

Labels: TE-Verified-M64 TE-Verified-64.0.3242.0
Verified the fix on the latest canary(64.0.3242.0) on Windows 10 touchscreen laptop.

Test URL: https://pdfobject.com/static.html

Long pressing the text to select, shows the TouchSelection handles at correct position. Attached is the screenshot of the same.

Note: I was able to repro the issue on the previous canary(64.0.3241.0) which does't have the fix from C#2.
773669_Windows10.png
496 KB View Download

Sign in to add a comment