Chromium Code Reviews| Index: pdf/pdfium/pdfium_page.cc |
| diff --git a/pdf/pdfium/pdfium_page.cc b/pdf/pdfium/pdfium_page.cc |
| index 1335f0780cf211ceb08d4c237eab05c6ed2c2d79..e514af33d324fccb0ad61f3421cc8f2fdd751789 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); |
|
Lei Zhang
2015/02/28 01:16:14
FPDPage_HasFormFieldAtPoint() and FPDFLink_GetLink
|
| + 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, |