New issue
Advanced search Search tips

Issue 753216 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 768520



Sign in to add a comment

Hook up "Select all" context menu item in interactive PDF forms

Project Member Reported by thestig@chromium.org, Aug 8 2017

Issue description

After  bug 59266  implements cut/copy/paste for interactive PDF forms, we would like to also hook up "Select all" as well, so the context menu for PDF form text fields is closer to feature parity with its HTML equivalent.
 
Owner: thestig@chromium.org
Status: Started (was: Available)
Blocking: 768520
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 17 2018

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5

commit a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5
Author: Lei Zhang <thestig@chromium.org>
Date: Tue Apr 17 15:12:58 2018

Implement FORM_GetFocusedText() API.

If there is a focused form field, get its text.

BUG= chromium:753216 

Change-Id: I05294f14d05c1c86769055f6c9eaf9177787d9fd
Reviewed-on: https://pdfium-review.googlesource.com/12072
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>

[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_annothandlermgr.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_ffwidgethandler.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_widgethandler.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/fpdf_view_c_api_test.c
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_pageview.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/formfiller/cffl_interactiveformfiller.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_ffcombobox.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_ffwidget.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_baannothandler.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/fpdf_formfill.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_ffwidgethandler.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_ffwidget.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_fftextedit.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_annothandlermgr.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/fpdf_formfill_embeddertest.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_fftextedit.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_baannothandler.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/public/fpdf_formfill.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_widgethandler.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_xfawidgethandler.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/xfa/fxfa/cxfa_ffcombobox.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/ipdfsdk_annothandler.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/formfiller/cffl_formfiller.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/formfiller/cffl_formfiller.cpp
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_pageview.h
[modify] https://crrev.com/a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5/fpdfsdk/cpdfsdk_xfawidgethandler.cpp

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 17 2018

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

commit 54d6642b92fe825966a44d4ce069c7d1f18f9207
Author: pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Tue Apr 17 18:08:40 2018

Roll src/third_party/pdfium/ 3900ddb64..8cfcb7da3 (2 commits)

https://pdfium.googlesource.com/pdfium.git/+log/3900ddb64f30..8cfcb7da3735

$ git log 3900ddb64..8cfcb7da3 --date=short --no-merges --format='%ad %ae %s'
2018-04-17 thestig Fix nits in CPDF_Function and derived classes.
2018-04-17 thestig Implement FORM_GetFocusedText() API.

Created with:
  roll-dep src/third_party/pdfium
BUG= chromium:753216 


The AutoRoll server is located here: https://pdfium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=dsinclair@chromium.org

Change-Id: Ia31b03d7e641f3fd8613f5f95370d380cdb8d532
Reviewed-on: https://chromium-review.googlesource.com/1015083
Commit-Queue: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#551393}
[modify] https://crrev.com/54d6642b92fe825966a44d4ce069c7d1f18f9207/DEPS

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 18 2018

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

commit d46818b1c5ebd9143538e20593346bbb00f0810c
Author: Lei Zhang <thestig@chromium.org>
Date: Wed Apr 18 13:24:28 2018

Hook up "Select all" context menu item in interactive PDF forms.

To do this, plumb a HasEditableText() call through PPAPI to the PDF
plugin, where it uses the FORM_GetFocusedText() PDFium API to check if
there is text to select. Enable the context menu item only if there is
text to select. Then hook up the "Select all" command to send a
synthesized ctrl + a keyboard event to the plugin.

BUG= 753216 

Change-Id: Ideaf19ff5e848a428e15f191e66587a0c8fe05b0
Reviewed-on: https://chromium-review.googlesource.com/640560
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551652}
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/content/public/renderer/pepper_plugin_instance.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/content/renderer/pepper/fake_pepper_plugin_instance.cc
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/content/renderer/pepper/fake_pepper_plugin_instance.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/content/renderer/pepper/pepper_plugin_instance_impl.cc
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/content/renderer/pepper/pepper_plugin_instance_impl.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/content/renderer/pepper/pepper_webplugin_impl.cc
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/content/renderer/pepper/pepper_webplugin_impl.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/pdf/out_of_process_instance.cc
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/pdf/out_of_process_instance.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/pdf/pdf_engine.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/pdf/pdfium/pdfium_engine.cc
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/pdf/pdfium/pdfium_engine.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/ppapi/c/private/ppp_pdf.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/ppapi/proxy/ppapi_messages.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/ppapi/proxy/ppp_pdf_proxy.cc
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/ppapi/proxy/ppp_pdf_proxy.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/third_party/blink/public/web/web_plugin.h
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/third_party/blink/renderer/core/exported/web_plugin_container_impl.cc
[modify] https://crrev.com/d46818b1c5ebd9143538e20593346bbb00f0810c/third_party/blink/renderer/core/page/context_menu_controller.cc

Status: Fixed (was: Started)
Able to reproduce this issue on Windows 10 and Ubuntu 14.04 on the build without fix 68.0.3399.0 and the issue is fixed on the latest Canary 68.0.3400.0.
Attached is the screen cast for reference.

In Mac OS, issue is seen on Selecting some part of the text and clicking on Select All option replaces the text with 'A'.  Issue 834735  raised for the same.

Thanks..

753216-M68.webm
2.7 MB View Download

Sign in to add a comment