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

Unified Diff: ui/aura/root_window.cc

Issue 12088015: Add ability for EventGenerator to generate Scroll events asynchronously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Free any leftover events in destructor Created 7 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 | « no previous file | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 9fa87ce581ab36309546e6fc9e84cb1c5428400d..fa7760f51e49d8b9b8f251ed79ddf460fcfa3d26 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -778,21 +778,22 @@ bool RootWindow::OnHostScrollEvent(ui::ScrollEvent* event) {
Window* target = mouse_pressed_handler_ ?
mouse_pressed_handler_ : client::GetCaptureWindow(this);
+
if (!target)
target = GetEventHandlerForPoint(event->location());
- if (target && target->delegate()) {
- int flags = event->flags();
- gfx::Point location_in_window = event->location();
- Window::ConvertPointToTarget(this, target, &location_in_window);
- if (IsNonClientLocation(target, location_in_window))
- flags |= ui::EF_IS_NON_CLIENT;
- event->set_flags(flags);
- event->ConvertLocationToTarget(static_cast<Window*>(this), target);
- ProcessEvent(target, event);
- return event->handled();
- }
- return false;
+ if (!target)
+ target = this;
+
+ int flags = event->flags();
+ gfx::Point location_in_window = event->location();
+ Window::ConvertPointToTarget(this, target, &location_in_window);
+ if (IsNonClientLocation(target, location_in_window))
+ flags |= ui::EF_IS_NON_CLIENT;
+ event->set_flags(flags);
+ event->ConvertLocationToTarget(static_cast<Window*>(this), target);
+ ProcessEvent(target, event);
+ return event->handled();
}
bool RootWindow::OnHostTouchEvent(ui::TouchEvent* event) {
« no previous file with comments | « no previous file | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698