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

Unified Diff: ui/aura/event.cc

Issue 10175002: Fix scaling for aura::GestureEvent and aura::TouchEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed GestureEvent handling Created 8 years, 8 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/aura/event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/event.cc
diff --git a/ui/aura/event.cc b/ui/aura/event.cc
index 3fd6ab338f60d7f133b898236d4fa4224aeca497..8192e55a2b5d6a6702b1be7323f59e9d16582af8 100644
--- a/ui/aura/event.cc
+++ b/ui/aura/event.cc
@@ -13,6 +13,7 @@
#include "ui/aura/window.h"
#include "ui/base/keycodes/keyboard_code_conversion.h"
#include "ui/gfx/point3.h"
+#include "ui/gfx/interpolated_transform.h"
#include "ui/gfx/transform.h"
#if defined(OS_MACOSX)
@@ -280,6 +281,14 @@ TouchEvent::TouchEvent(ui::EventType type,
TouchEvent::~TouchEvent() {
}
+void TouchEvent::UpdateForRootTransform(const ui::Transform& root_transform) {
+ LocatedEvent::UpdateForRootTransform(root_transform);
+ gfx::Point3f scale;
+ ui::InterpolatedTransform::FactorTRS(root_transform, NULL, NULL, &scale);
+ radius_x_ *= scale.x();
+ radius_y_ *= scale.y();
+}
+
ui::EventType TouchEvent::GetEventType() const {
return type();
}
« no previous file with comments | « ui/aura/event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698