Chromium Code Reviews| Index: pdf/pdfium/pdfium_engine.cc |
| diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc |
| index d0796a5e4eca0a9a2515f452110d92f5ecea0aad..4ff8774b1554a8a4881fcb995cef5d20d3b834b9 100644 |
| --- a/pdf/pdfium/pdfium_engine.cc |
| +++ b/pdf/pdfium/pdfium_engine.cc |
| @@ -1643,9 +1643,20 @@ bool PDFiumEngine::OnMouseUp(const pp::MouseInputEvent& event) { |
| // Open link on mouse up for same link for which mouse down happened earlier. |
| if (mouse_down_state_.Matches(area, target)) { |
| if (area == PDFiumPage::WEBLINK_AREA) { |
| - bool open_in_new_tab = !!(event.GetModifiers() & kDefaultKeyModifier) || |
|
Lei Zhang
2016/07/23 00:39:38
I think this is the only use of |kDefaultKeyModifi
jaepark
2016/07/23 03:52:30
Done.
|
| + bool middle_button = |
| !!(event.GetModifiers() & PP_INPUTEVENT_MODIFIER_MIDDLEBUTTONDOWN); |
|
Lei Zhang
2016/07/23 00:39:38
BTW, GetModifiers() looks like it might be somewha
jaepark
2016/07/23 03:52:30
Done.
|
| - client_->NavigateTo(target.url, open_in_new_tab); |
| + bool alt_key = !!(event.GetModifiers() & PP_INPUTEVENT_MODIFIER_ALTKEY); |
| + bool ctrl_key = |
| + !!(event.GetModifiers() & PP_INPUTEVENT_MODIFIER_CONTROLKEY); |
| + bool meta_key = !!(event.GetModifiers() & PP_INPUTEVENT_MODIFIER_METAKEY); |
| + bool shift_key = |
| + !!(event.GetModifiers() & PP_INPUTEVENT_MODIFIER_SHIFTKEY); |
| + |
| + WindowOpenDisposition disposition = |
| + ui::DispositionFromClick(middle_button, alt_key, ctrl_key, meta_key, |
|
Lei Zhang
2016/07/23 00:39:38
Previously, pdf/ was only using values from header
jaepark
2016/07/23 03:52:30
Done.
|
| + shift_key); |
| + |
| + client_->NavigateTo(target.url, disposition); |
| client_->FormTextFieldFocusChange(false); |
| return true; |
| } |
| @@ -3524,7 +3535,7 @@ 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), CURRENT_TAB); |
| } |
| void PDFiumEngine::Form_DoGoToAction(FPDF_FORMFILLINFO* param, |