| Index: pdf/pdfium/pdfium_engine.cc
|
| diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
|
| index 8ab5a1bb67b2f5d879aeaf7561377195c36ad1c2..22a72c26330ff7d82ca2ce46ba938723fc4b279b 100644
|
| --- a/pdf/pdfium/pdfium_engine.cc
|
| +++ b/pdf/pdfium/pdfium_engine.cc
|
| @@ -1706,19 +1706,13 @@ bool PDFiumEngine::OnMouseDown(const pp::MouseInputEvent& event) {
|
|
|
| // Decide whether to open link or not based on user action in mouse up and
|
| // mouse move events.
|
| - if (area == PDFiumPage::WEBLINK_AREA)
|
| + if (area == PDFiumPage::WEBLINK_AREA || area == PDFiumPage::DOCLINK_AREA)
|
| return true;
|
|
|
| // Prevent middle mouse button from selecting texts.
|
| if (event.GetButton() == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE)
|
| return false;
|
|
|
| - if (area == PDFiumPage::DOCLINK_AREA) {
|
| - client_->ScrollToPage(target.page);
|
| - client_->FormTextFieldFocusChange(false);
|
| - return true;
|
| - }
|
| -
|
| if (page_index != -1) {
|
| last_page_mouse_down_ = page_index;
|
| double page_x, page_y;
|
| @@ -1816,6 +1810,11 @@ bool PDFiumEngine::OnMouseUp(const pp::MouseInputEvent& event) {
|
| client_->FormTextFieldFocusChange(false);
|
| return true;
|
| }
|
| + if (area == PDFiumPage::DOCLINK_AREA) {
|
| + client_->ScrollToPage(target.page);
|
| + client_->FormTextFieldFocusChange(false);
|
| + return true;
|
| + }
|
| }
|
|
|
| // Prevent middle mouse button from selecting texts.
|
|
|