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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 865533002: Scroll while selecting Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « pdf/pdf_engine.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_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 228a8899cc4f5436c1ca4b7f7015ce40e68d05da..ca682572dfd85185818641ba961728e2fbbf88f5 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -1683,7 +1683,7 @@ bool PDFiumEngine::OnMouseDown(const pp::MouseInputEvent& event) {
}
void PDFiumEngine::OnSingleClick(int page_index, int char_index) {
- selecting_ = true;
+ SetSelecting(true);
selection_.push_back(PDFiumRange(pages_[page_index], char_index, 0));
}
@@ -1746,7 +1746,7 @@ bool PDFiumEngine::OnMouseUp(const pp::MouseInputEvent& event) {
if (!selecting_)
return false;
- selecting_ = false;
+ SetSelecting(false);
return true;
}
@@ -3368,6 +3368,13 @@ void PDFiumEngine::RotateInternal() {
}
}
+void PDFiumEngine::SetSelecting(bool selecting) {
+ bool was_selecting = selecting_;
+ selecting_ = selecting;
+ if (selecting_ != was_selecting)
+ engine->client_->IsSelectingChanged(selecting);
+}
+
void PDFiumEngine::Form_Invalidate(FPDF_FORMFILLINFO* param,
FPDF_PAGE page,
double left,
« no previous file with comments | « pdf/pdf_engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698