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

Unified Diff: pdf/out_of_process_instance.cc

Issue 2781613002: PDF Viewer pinch zoom: Update state for zoom in following a zoom out. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index 2b271b5bf2f592d598a5de67dede7e76967cb101..efcd4e659fbc6cce2218741be6c9ab76289280fd 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -497,6 +497,12 @@ void OutOfProcessInstance::HandleMessage(const pp::Var& message) {
paint_manager_.ClearTransform();
last_bitmap_smaller_ = false;
needs_reraster_ = true;
+
+ // If we're zooming out, we need to update |starting_scroll_offset_| and
+ // |initial_zoom_ratio_|, in case the user continues the gesture by
+ // zooming in.
+ starting_scroll_offset_ = scroll_offset;
bokan 2017/03/28 14:26:26 These two variables are the offset/zoom since last
Kevin McNee 2017/03/28 22:55:26 So it turns out that |initial_zoom_ratio_| is redu
+ initial_zoom_ratio_ = zoom_ratio;
}
// Bound the input parameters.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698