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

Issue 256923002: Fixed tab dragging which was broken on high DPI windows for scales other than 100%. (Closed)

Created:
6 years, 8 months ago by ananta
Modified:
6 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina
Visibility:
Public.

Description

Fixed tab dragging which was broken on high DPI windows for scales other than 100%. The tab dragging code uses the GetCursorPos API to determine the tab strip to be used to drag the tab into. This API returns values in pixel. We need to convert to DIP and vice versa wherever needed. Changes as below:- 1. window_finder_win.cc :- The cursor position after my changes now comes in as DIP. We need to convert to pixel as this class uses PtInRect and other APIs which need values in pixel. 2. screen_win.cc :- The GetCursorScreenPoint now returns values in DIP which is what is expected. These values are passed to views and other places which expect values in DIP. 3. apps_grid_view.cc :- Converted cursor position to DIP before passing it to the views code. Looked at other usages of this API. They seem to be in order. Thought about adding helpers for this for Windows. Decided against it as it is very hard to enforce given that it is a popular API. BUG=364969 R=sky@chromium.org, sky Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266744

Patch Set 1 #

Total comments: 2

Patch Set 2 : Code review comments #

Patch Set 3 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -6 lines) Patch
M chrome/browser/ui/views/tabs/window_finder_win.cc View 1 4 chunks +7 lines, -5 lines 0 comments Download
M ui/app_list/views/apps_grid_view.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M ui/gfx/screen_win.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
ananta
6 years, 8 months ago (2014-04-26 03:33:09 UTC) #1
sky
https://codereview.chromium.org/256923002/diff/1/chrome/browser/ui/views/tabs/window_finder_win.cc File chrome/browser/ui/views/tabs/window_finder_win.cc (right): https://codereview.chromium.org/256923002/diff/1/chrome/browser/ui/views/tabs/window_finder_win.cc#newcode163 chrome/browser/ui/views/tabs/window_finder_win.cc:163: LocalProcessWindowFinder finder(screen_loc_in_pixels, ignore); Can we make LocalProcessWindowFinder and TopMostFinder ...
6 years, 7 months ago (2014-04-28 13:44:48 UTC) #2
ananta
https://codereview.chromium.org/256923002/diff/1/chrome/browser/ui/views/tabs/window_finder_win.cc File chrome/browser/ui/views/tabs/window_finder_win.cc (right): https://codereview.chromium.org/256923002/diff/1/chrome/browser/ui/views/tabs/window_finder_win.cc#newcode163 chrome/browser/ui/views/tabs/window_finder_win.cc:163: LocalProcessWindowFinder finder(screen_loc_in_pixels, ignore); On 2014/04/28 13:44:48, sky wrote: > ...
6 years, 7 months ago (2014-04-28 18:13:07 UTC) #3
sky
LGTM
6 years, 7 months ago (2014-04-28 20:26:25 UTC) #4
ananta
The CQ bit was checked by ananta@chromium.org
6 years, 7 months ago (2014-04-28 21:20:50 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ananta@chromium.org/256923002/20001
6 years, 7 months ago (2014-04-28 21:22:54 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 22:06:01 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on chromium_presubmit
6 years, 7 months ago (2014-04-28 22:06:02 UTC) #8
ananta
The CQ bit was checked by ananta@chromium.org
6 years, 7 months ago (2014-04-28 23:06:22 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ananta@chromium.org/256923002/20001
6 years, 7 months ago (2014-04-28 23:07:32 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 23:55:26 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on chromium_presubmit
6 years, 7 months ago (2014-04-28 23:55:26 UTC) #12
ananta
6 years, 7 months ago (2014-04-29 02:37:25 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 manually as r266744 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698