OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/web_input_event_aura.h" | 5 #include "content/browser/renderer_host/web_input_event_aura.h" |
6 | 6 |
7 #include "content/browser/renderer_host/input/web_input_event_util.h" | 7 #include "content/browser/renderer_host/input/web_input_event_util.h" |
8 #include "content/browser/renderer_host/ui_events_helper.h" | 8 #include "content/browser/renderer_host/ui_events_helper.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
190 | 190 |
191 // Replace the event's coordinate fields with translated position data from | 191 // Replace the event's coordinate fields with translated position data from |
192 // |event|. | 192 // |event|. |
193 webkit_event.windowX = webkit_event.x = event->x(); | 193 webkit_event.windowX = webkit_event.x = event->x(); |
194 webkit_event.windowY = webkit_event.y = event->y(); | 194 webkit_event.windowY = webkit_event.y = event->y(); |
195 | 195 |
196 const gfx::Point root_point = event->root_location(); | 196 const gfx::Point root_point = event->root_location(); |
197 webkit_event.globalX = root_point.x(); | 197 webkit_event.globalX = root_point.x(); |
198 webkit_event.globalY = root_point.y(); | 198 webkit_event.globalY = root_point.y(); |
199 | 199 |
200 #if !defined(OS_MACOSX) | |
tdresser
2014/11/27 15:06:08
Are _aura files compiled on Mac?
Don't we want dif
lanwei
2014/12/02 06:28:54
Done.
| |
201 if ((webkit_event.modifiers & blink::WebInputEvent::ControlKey) && | |
202 !webkit_event.hasPreciseScrollingDeltas) { | |
Rick Byers
2014/11/27 17:31:32
Actually, now that I review the rest of your CL yo
Rick Byers
2014/11/27 17:31:32
I don't think we should be duplicating the logic f
| |
203 webkit_event.suppressScroll = true; | |
Rick Byers
2014/11/27 17:31:32
You just need a comment here saying that by suppre
Rick Byers
2014/11/27 17:31:32
You need to set this bit in InputRouterImpl::SendS
lanwei
2014/12/02 06:28:54
Done.
lanwei
2014/12/02 06:28:54
Done.
lanwei
2014/12/02 06:28:54
Done.
| |
204 } | |
205 #endif | |
200 return webkit_event; | 206 return webkit_event; |
201 } | 207 } |
202 | 208 |
203 blink::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::ScrollEvent* event) { | 209 blink::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::ScrollEvent* event) { |
204 #if defined(OS_WIN) | 210 #if defined(OS_WIN) |
205 // Construct an untranslated event from the platform event data. | 211 // Construct an untranslated event from the platform event data. |
206 blink::WebMouseWheelEvent webkit_event = | 212 blink::WebMouseWheelEvent webkit_event = |
207 MakeUntranslatedWebMouseWheelEventFromNativeEvent(event->native_event()); | 213 MakeUntranslatedWebMouseWheelEventFromNativeEvent(event->native_event()); |
208 #else | 214 #else |
209 blink::WebMouseWheelEvent webkit_event = | 215 blink::WebMouseWheelEvent webkit_event = |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
352 webkit_event.deltaY = event->y_offset(); | 358 webkit_event.deltaY = event->y_offset(); |
353 } | 359 } |
354 | 360 |
355 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick; | 361 webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick; |
356 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick; | 362 webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick; |
357 | 363 |
358 return webkit_event; | 364 return webkit_event; |
359 } | 365 } |
360 | 366 |
361 } // namespace content | 367 } // namespace content |
OLD | NEW |