diff options
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/pdfium/pdfium_engine.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc index e6713271..f0fe1b2 100644 --- a/pdf/pdfium/pdfium_engine.cc +++ b/pdf/pdfium/pdfium_engine.cc @@ -1867,7 +1867,10 @@ std::string PDFiumEngine::GetSelectedText() { std::string PDFiumEngine::GetLinkAtPosition(const pp::Point& point) { int temp; PDFiumPage::LinkTarget target; - PDFiumPage::Area area = GetCharIndex(point, &temp, &temp, &target); + pp::Point point_in_page( + static_cast<int>((point.x() + position_.x()) / current_zoom_), + static_cast<int>((point.y() + position_.y()) / current_zoom_)); + PDFiumPage::Area area = GetCharIndex(point_in_page, &temp, &temp, &target); if (area == PDFiumPage::WEBLINK_AREA) return target.url; return std::string(); |