Chromium Code Reviews| Index: ash/display/event_transformation_handler.cc |
| diff --git a/ash/display/event_transformation_handler.cc b/ash/display/event_transformation_handler.cc |
| index cb33891edf6bbd8261898723976780e840903dce..94cd5324f798c91a059e10e9b76f93bba1cdb757 100644 |
| --- a/ash/display/event_transformation_handler.cc |
| +++ b/ash/display/event_transformation_handler.cc |
| @@ -40,20 +40,18 @@ void EventTransformationHandler::OnScrollEvent(ui::ScrollEvent* event) { |
| if (transformation_mode_ == TRANSFORM_NONE) |
| return; |
| - // Get the device scale factor and stack it on the final scale factor. |
| + // It is unnecessary to scale the event for the device scale factor as |
| + // in the CrOS X server patch since the event locations etc. are already |
| + // in DIP. |
|
sadrul
2013/09/20 04:48:53
Remove 'as in the CrOS X server patch'. i.e.
'It
Shecky Lin
2013/09/20 05:02:00
Done.
|
| gfx::Point point_in_screen(event->location()); |
| aura::Window* target = static_cast<aura::Window*>(event->target()); |
| - const float scale_at_target = ui::GetDeviceScaleFactor(target->layer()); |
| - float scale = scale_at_target; |
| - |
| - // Apply some additional scaling if the display is non-integrated. |
| wm::ConvertPointToScreen(target, &point_in_screen); |
| const gfx::Display& display = |
| Shell::GetScreen()->GetDisplayNearestPoint(point_in_screen); |
| - if (!display.IsInternal()) |
| - scale *= kBoostForNonIntegrated; |
| - event->Scale(scale); |
| + // Apply some additional scaling if the display is non-integrated. |
| + if (!display.IsInternal()) |
| + event->Scale(kBoostForNonIntegrated); |
| } |
| #if defined(OS_CHROMEOS) |