Index: pdf/pdfium/pdfium_engine.cc |
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc |
index 83c83f4fe439c59c8d971de0d1fbe68ba1d1fda5..8cc14bf76efa80ae1657422d7ff66de2bf3a21bd 100644 |
--- a/pdf/pdfium/pdfium_engine.cc |
+++ b/pdf/pdfium/pdfium_engine.cc |
@@ -1863,7 +1863,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(); |