0

Handle double clicks in PDF forms.

BUG=775054

Change-Id: I08746100815d3c7b05f6c181253841942481a629
Reviewed-on: https://chromium-review.googlesource.com/c/1285316
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600675}
This commit is contained in:
Lei Zhang
2018-10-18 06:56:58 +00:00
committed by Commit Bot
parent 3745fe09d2
commit 3fb9a5ed5f

@ -1343,7 +1343,12 @@ bool PDFiumEngine::OnLeftMouseDown(const pp::MouseInputEvent& event) {
is_form_text_area &&
IsPointInEditableFormTextArea(page, page_x, page_y, form_type);
FORM_OnLButtonDown(form(), page, event.GetModifiers(), page_x, page_y);
if (event.GetClickCount() == 1) {
FORM_OnLButtonDown(form(), page, event.GetModifiers(), page_x, page_y);
} else if (event.GetClickCount() == 2) {
FORM_OnLButtonDoubleClick(form(), page, event.GetModifiers(), page_x,
page_y);
}
if (form_type != FPDF_FORMFIELD_UNKNOWN) {
// Destroy SelectionChangeInvalidator object before SetInFormTextArea()
// changes plugin's focus to be in form text area. This way, regular text