TouchSelection Handles/QuickMenu renders in the wrong position for embedded PDFs |
|||
Issue descriptionChrome 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.
,
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
,
Oct 16 2017
,
Oct 17 2017
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. |
|||
►
Sign in to add a comment |
|||
Comment 1 by wjmaclean@chromium.org
, Oct 11 2017