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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 552503003: Introduce EventProcessor::OnEventProcessingStarted() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests added, CL for review Created 6 years, 3 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
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 70d4e588f656c979e9f91232a86aabf0c453e14f..fa6db285c549aae7e64d88e0836df11431233263 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -435,16 +435,14 @@ ui::EventTarget* WindowEventDispatcher::GetRootTarget() {
return window();
}
-void WindowEventDispatcher::PrepareEventForDispatch(ui::Event* event) {
- if (dispatching_held_event_) {
- // The held events are already in |window()|'s coordinate system. So it is
- // not necessary to apply the transform to convert from the host's
- // coordinate system to |window()|'s coordinate system.
- return;
- }
- if (event->IsLocatedEvent()) {
+bool WindowEventDispatcher::OnEventProcessingStarted(ui::Event* event) {
+ // The held events are already in |window()|'s coordinate system. So it is
+ // not necessary to apply the transform to convert from the host's
+ // coordinate system to |window()|'s coordinate system.
+ if (event->IsLocatedEvent() && !dispatching_held_event_)
TransformEventForDeviceScaleFactor(static_cast<ui::LocatedEvent*>(event));
- }
+
+ return true;
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698