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

Unified Diff: ui/aura/root_window.cc

Issue 13916004: Translate 1 pixel not 1 dip when rotating the display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove chromeos specific test that is no longer necessary Created 7 years, 8 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 | « ash/display/display_controller_unittest.cc ('k') | 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 e706ef0a2be1c15c16b0ff5260ff5a5442d1bc92..850c8ea31733b1bd1ffc40a0f17a873819e33bd2 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -692,25 +692,6 @@ void RootWindow::ClearMouseHandlers() {
void RootWindow::TransformEventForDeviceScaleFactor(bool keep_inside_root,
ui::LocatedEvent* event) {
event->UpdateForRootTransform(GetInverseRootTransform());
-#if defined(OS_CHROMEOS)
- const gfx::Rect& root_bounds = bounds();
- if (keep_inside_root &
- host_->GetBounds().Contains(event->system_location()) &&
- !root_bounds.Contains(event->root_location())) {
- // Make sure that the mouse location inside the host window gets
- // translated inside root window.
- // TODO(oshima): This is (hopefully) short term bandaid to deal
- // with calculation error due to the fact that we rotate in dip
- // coordinates instead of pixels. crbug.com/222483.
- int x = event->location().x();
- int y = event->location().y();
- x = std::min(std::max(x, root_bounds.x()), root_bounds.right());
- y = std::min(std::max(y, root_bounds.y()), root_bounds.bottom());
- const gfx::Point new_location(x, y);
- event->set_location(new_location);
- event->set_root_location(new_location);
- }
-#endif // defined(OS_CHROMEOS)
}
void RootWindow::HandleMouseMoved(const ui::MouseEvent& event, Window* target) {
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698