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

Unified Diff: ui/base/events/event.cc

Issue 12391022: events: Make sure the unaccelerated scroll deltas get adjusted properly for device-scale-factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | « ui/base/events/event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event.cc
===================================================================
--- ui/base/events/event.cc (revision 185345)
+++ ui/base/events/event.cc (working copy)
@@ -679,6 +679,17 @@
y_offset_ordinal_ *= factor;
}
+void ScrollEvent::UpdateForRootTransform(const gfx::Transform& root_transform) {
+ LocatedEvent::UpdateForRootTransform(root_transform);
+ gfx::DecomposedTransform decomp;
+ bool success = gfx::DecomposeTransform(&decomp, root_transform);
+ DCHECK(success);
+ if (decomp.scale[0])
+ x_offset_ordinal_ /= decomp.scale[0];
+ if (decomp.scale[1])
+ y_offset_ordinal_ /= decomp.scale[1];
+}
+
////////////////////////////////////////////////////////////////////////////////
// GestureEvent
« no previous file with comments | « ui/base/events/event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698