Index: pdf/pdfium/pdfium_page.cc |
diff --git a/pdf/pdfium/pdfium_page.cc b/pdf/pdfium/pdfium_page.cc |
index 7d85d36aa315e5447995c168c4e4a86caf7a9d5d..255dc29280fb1dc633ca21644f9b51277ab57698 100644 |
--- a/pdf/pdfium/pdfium_page.cc |
+++ b/pdf/pdfium/pdfium_page.cc |
@@ -264,6 +264,13 @@ PDFiumPage::Area PDFiumPage::GetCharIndex(const pp::Point& point, |
DCHECK_NE(control_z_order, link_z_order); |
if (control_z_order > link_z_order) { |
*form_type = control; |
+ |
+ if (*form_type == FPDF_FORMFIELD_TEXTFIELD) |
Lei Zhang
2017/06/17 02:21:18
We now have 3 (or more?) places that are trying to
drgage
2017/06/19 21:53:52
Do you still think this will be necessary after re
Lei Zhang
2017/06/20 00:26:24
Given the pdfium_engine.cc code in question forgot
drgage
2017/06/20 23:14:27
Done.
|
+ return PDFiumPage::FORM_TEXT_AREA; |
+ |
+ if (*form_type == FPDF_FORMFIELD_COMBOBOX) |
+ return PDFiumPage::FORM_COMBOBOX_TEXT_AREA; |
+ |
return PDFiumPage::NONSELECTABLE_AREA; |
} |
@@ -283,6 +290,13 @@ PDFiumPage::Area PDFiumPage::GetCharIndex(const pp::Point& point, |
return area; |
} else if (control > FPDF_FORMFIELD_UNKNOWN) { |
*form_type = control; |
+ |
+ if (*form_type == FPDF_FORMFIELD_TEXTFIELD) |
+ return PDFiumPage::FORM_TEXT_AREA; |
+ |
+ if (*form_type == FPDF_FORMFIELD_COMBOBOX) |
+ return PDFiumPage::FORM_COMBOBOX_TEXT_AREA; |
+ |
return PDFiumPage::NONSELECTABLE_AREA; |
} |