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

Unified Diff: pdf/pdfium/pdfium_engine.h

Issue 2963753003: Fix discrepancies in form text selection between PDF and HTML forms. (Closed)
Patch Set: Remove extra parentheses 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
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.h
diff --git a/pdf/pdfium/pdfium_engine.h b/pdf/pdfium/pdfium_engine.h
index 5b0e4aa1d84b6858a06922827a6684a20d781a27..4316369ce3993b5d7fbb667bd674243a19948e81 100644
--- a/pdf/pdfium/pdfium_engine.h
+++ b/pdf/pdfium/pdfium_engine.h
@@ -449,6 +449,9 @@ class PDFiumEngine : public PDFEngine,
// field.
void SetInFormTextArea(bool in_form_text_area);
+ // Sets whether or not left mouse button is currently being held down.
+ void SetMouseHeldDown(bool mouse_held_down);
+
bool PageIndexInBounds(int index) const;
void ScheduleTouchTimer(const pp::TouchInputEvent& event);
@@ -649,15 +652,26 @@ class PDFiumEngine : public PDFEngine,
bool defer_page_unload_;
std::vector<int> deferred_page_unloads_;
- // Used for text selection, but does not include text within form text fields.
+ // Used for text selection, but does not include text within form text areas.
// There could be more than one range if selection spans more than one page.
std::vector<PDFiumRange> selection_;
// True if we're in the middle of text selection.
bool selecting_;
+ // Used for selection of text within form text areas (text fields and combo
+ // box text fields). Represents the currently selected text.
+ std::string selected_form_text_;
+
+ // Used for selection of text within form text areas (text fields and combo
+ // box text fields). Represents the previously selected text.
+ std::string old_selected_form_text_;
+
// True if focus is in form text field or form combobox text field.
bool in_form_text_area_;
+ // True if left mouse button is currently being held down.
+ bool mouse_held_down_;
Lei Zhang 2017/06/29 02:52:46 Do we need |mouse_held_down_| if we already have |
drgage 2017/06/29 17:49:59 The reason I added |mouse_held_down_| is because t
+
MouseDownState mouse_down_state_;
// Used for searching.
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698