| Index: pdf/pdfium/pdfium_engine.cc
|
| diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
|
| index d0796a5e4eca0a9a2515f452110d92f5ecea0aad..5f198a4affb5f6431e5b971ab4adac2472f88b84 100644
|
| --- a/pdf/pdfium/pdfium_engine.cc
|
| +++ b/pdf/pdfium/pdfium_engine.cc
|
| @@ -1645,7 +1645,26 @@ bool PDFiumEngine::OnMouseUp(const pp::MouseInputEvent& event) {
|
| if (area == PDFiumPage::WEBLINK_AREA) {
|
| bool open_in_new_tab = !!(event.GetModifiers() & kDefaultKeyModifier) ||
|
| !!(event.GetModifiers() & PP_INPUTEVENT_MODIFIER_MIDDLEBUTTONDOWN);
|
| - client_->NavigateTo(target.url, open_in_new_tab);
|
| +
|
| + bool shift = !!(event.GetModifiers() & PP_INPUTEVENT_MODIFIER_SHIFTKEY);
|
| +
|
| + PDFEngine::Client::NavigateOption option;
|
| + if (open_in_new_tab) {
|
| + if (shift) {
|
| + option =
|
| + PDFEngine::Client::NavigateOption::OPEN_IN_NEW_FOREGROUND_TAB;
|
| + } else {
|
| + option =
|
| + PDFEngine::Client::NavigateOption::OPEN_IN_NEW_BACKGROUND_TAB;
|
| + }
|
| + } else {
|
| + if (shift)
|
| + option = PDFEngine::Client::NavigateOption::OPEN_IN_NEW_WINDOW;
|
| + else
|
| + option = PDFEngine::Client::NavigateOption::OPEN_IN_CURRENT_TAB;
|
| + }
|
| +
|
| + client_->NavigateTo(target.url, option);
|
| client_->FormTextFieldFocusChange(false);
|
| return true;
|
| }
|
| @@ -3524,7 +3543,9 @@ void PDFiumEngine::Form_SetTextFieldFocus(FPDF_FORMFILLINFO* param,
|
| void PDFiumEngine::Form_DoURIAction(FPDF_FORMFILLINFO* param,
|
| FPDF_BYTESTRING uri) {
|
| PDFiumEngine* engine = static_cast<PDFiumEngine*>(param);
|
| - engine->client_->NavigateTo(std::string(uri), false);
|
| + engine->client_->NavigateTo(
|
| + std::string(uri),
|
| + PDFEngine::Client::NavigateOption::OPEN_IN_CURRENT_TAB);
|
| }
|
|
|
| void PDFiumEngine::Form_DoGoToAction(FPDF_FORMFILLINFO* param,
|
|
|