Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Unified Diff: pdf/pdfium/pdfium_page.cc

Issue 2924343005: Add functionality for copying text within form text fields and form combobox text fields (Closed)
Patch Set: Changed combobox selection and fix for text selection bug Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« pdf/pdfium/pdfium_engine.cc ('K') | « pdf/pdfium/pdfium_page.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_page.cc
diff --git a/pdf/pdfium/pdfium_page.cc b/pdf/pdfium/pdfium_page.cc
index 7d85d36aa315e5447995c168c4e4a86caf7a9d5d..cc2e8a74cf2c1d1bbc20532e43345985bb2a4768 100644
--- a/pdf/pdfium/pdfium_page.cc
+++ b/pdf/pdfium/pdfium_page.cc
@@ -264,6 +264,11 @@ 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 ||
+ *form_type == FPDF_FORMFIELD_COMBOBOX)
dsinclair 2017/06/20 15:21:44 This and the one below should have {}s as the cond
drgage 2017/06/20 23:14:27 Done - I actually created a helper to convert from
+ return PDFiumPage::FORM_TEXT_AREA;
+
return PDFiumPage::NONSELECTABLE_AREA;
}
@@ -283,6 +288,11 @@ 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 ||
+ *form_type == FPDF_FORMFIELD_COMBOBOX)
+ return PDFiumPage::FORM_TEXT_AREA;
+
return PDFiumPage::NONSELECTABLE_AREA;
}
« pdf/pdfium/pdfium_engine.cc ('K') | « pdf/pdfium/pdfium_page.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698