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

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: 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
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 1a1995f5726cba704fbdbea7960a2a2fd4bcc71e..78ffcb858cf7756cce03b52505aca298228e9a91 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -780,21 +780,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) {

Powered by Google App Engine
This is Rietveld 408576698