Commit 4caf2a84 authored by Henrique Nakashima's avatar Henrique Nakashima Committed by Commit Bot

Send key modifiers to FORM_OnLButton* methods in PDF Viewer.

Bug: pdfium:1105
Change-Id: Ieb85b8258ce321b9b28bc1f7265980395b184fc5
Reviewed-on: https://chromium-review.googlesource.com/1114072
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570337}
parent 4db64ed1
...@@ -1359,7 +1359,7 @@ bool PDFiumEngine::OnLeftMouseDown(const pp::MouseInputEvent& event) { ...@@ -1359,7 +1359,7 @@ bool PDFiumEngine::OnLeftMouseDown(const pp::MouseInputEvent& event) {
is_form_text_area && is_form_text_area &&
IsPointInEditableFormTextArea(page, page_x, page_y, form_type); IsPointInEditableFormTextArea(page, page_x, page_y, form_type);
FORM_OnLButtonDown(form(), page, 0, page_x, page_y); FORM_OnLButtonDown(form(), page, event.GetModifiers(), page_x, page_y);
if (form_type != FPDF_FORMFIELD_UNKNOWN) { if (form_type != FPDF_FORMFIELD_UNKNOWN) {
// Destroy SelectionChangeInvalidator object before SetInFormTextArea() // Destroy SelectionChangeInvalidator object before SetInFormTextArea()
// changes plugin's focus to be in form text area. This way, regular text // changes plugin's focus to be in form text area. This way, regular text
...@@ -1566,7 +1566,8 @@ bool PDFiumEngine::OnMouseUp(const pp::MouseInputEvent& event) { ...@@ -1566,7 +1566,8 @@ bool PDFiumEngine::OnMouseUp(const pp::MouseInputEvent& event) {
double page_x; double page_x;
double page_y; double page_y;
DeviceToPage(page_index, point, &page_x, &page_y); DeviceToPage(page_index, point, &page_x, &page_y);
FORM_OnLButtonUp(form(), pages_[page_index]->GetPage(), 0, page_x, page_y); FORM_OnLButtonUp(form(), pages_[page_index]->GetPage(),
event.GetModifiers(), page_x, page_y);
} }
if (!selecting_) if (!selecting_)
......
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