diff options
Diffstat (limited to 'pdf/pdfium/pdfium_page.cc')
-rw-r--r-- | pdf/pdfium/pdfium_page.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pdf/pdfium/pdfium_page.cc b/pdf/pdfium/pdfium_page.cc index 1335f07..e514af3 100644 --- a/pdf/pdfium/pdfium_page.cc +++ b/pdf/pdfium/pdfium_page.cc @@ -258,6 +258,7 @@ base::Value* PDFiumPage::CreateURLNode(std::string text, std::string url) { PDFiumPage::Area PDFiumPage::GetCharIndex(const pp::Point& point, int rotation, int* char_index, + int* form_type, LinkTarget* target) { if (!available_) return NONSELECTABLE_AREA; @@ -270,6 +271,13 @@ PDFiumPage::Area PDFiumPage::GetCharIndex(const pp::Point& point, GetTextPage(), new_x, new_y, kTolerance, kTolerance); *char_index = rv; + int control = + FPDPage_HasFormFieldAtPoint(engine_->form(), GetPage(), new_x, new_y); + if (control > FPDF_FORMFIELD_UNKNOWN) { + *form_type = control; + return PDFiumPage::NONSELECTABLE_AREA; + } + FPDF_LINK link = FPDFLink_GetLinkAtPoint(GetPage(), new_x, new_y); if (link) { // We don't handle all possible link types of the PDF. For example, |