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

Issue 1475263002: Ensure that the drag image during drag drop operations on Windows is of the correct scale.

Created:
5 years ago by ananta
Modified:
5 years ago
Reviewers:
sky
CC:
chromium-reviews, dcheng
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure that the drag image width during drag drop on Windows is restricted to 300 pixels Images above 300 pixels in width are clipped on Windows. BUG=463483

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use GetRepresentation to find the closest match #

Total comments: 2

Patch Set 3 : Restrict drag image width on Windows to 300 pixels #

Patch Set 4 : #

Patch Set 5 : Restrict image width properly #

Patch Set 6 : Fix compile error #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -1 line) Patch
M ui/base/dragdrop/drag_utils_win.cc View 1 2 3 4 5 2 chunks +10 lines, -1 line 1 comment Download

Depends on Patchset:

Messages

Total messages: 8 (2 generated)
ananta
5 years ago (2015-11-25 22:07:59 UTC) #2
sky
https://codereview.chromium.org/1475263002/diff/1/ui/base/dragdrop/drag_utils_win.cc File ui/base/dragdrop/drag_utils_win.cc (right): https://codereview.chromium.org/1475263002/diff/1/ui/base/dragdrop/drag_utils_win.cc#newcode69 ui/base/dragdrop/drag_utils_win.cc:69: if (image_skia.HasRepresentation(gfx::GetDPIScale())) { If it doesn't have a rep ...
5 years ago (2015-11-25 23:32:55 UTC) #3
ananta
https://codereview.chromium.org/1475263002/diff/1/ui/base/dragdrop/drag_utils_win.cc File ui/base/dragdrop/drag_utils_win.cc (right): https://codereview.chromium.org/1475263002/diff/1/ui/base/dragdrop/drag_utils_win.cc#newcode69 ui/base/dragdrop/drag_utils_win.cc:69: if (image_skia.HasRepresentation(gfx::GetDPIScale())) { On 2015/11/25 23:32:54, sky wrote: > ...
5 years ago (2015-11-25 23:37:14 UTC) #4
sky
https://codereview.chromium.org/1475263002/diff/20001/ui/base/dragdrop/drag_utils_win.cc File ui/base/dragdrop/drag_utils_win.cc (right): https://codereview.chromium.org/1475263002/diff/20001/ui/base/dragdrop/drag_utils_win.cc#newcode62 ui/base/dragdrop/drag_utils_win.cc:62: const gfx::Vector2d& cursor_offset, I suspect you need to adjust ...
5 years ago (2015-11-25 23:38:43 UTC) #5
ananta
The FindRepresentation codepath which I was originally trying to fix works correctly. It returns the ...
5 years ago (2015-12-01 02:42:28 UTC) #7
ananta
5 years ago (2015-12-01 02:47:07 UTC) #8
https://codereview.chromium.org/1475263002/diff/100001/ui/base/dragdrop/drag_...
File ui/base/dragdrop/drag_utils_win.cc (right):

https://codereview.chromium.org/1475263002/diff/100001/ui/base/dragdrop/drag_...
ui/base/dragdrop/drag_utils_win.cc:40: std::min<int>(kMaxDragImageWidth,
sdi.sizeDragImage.cx);
If the width is more than 300 the bitmap is displayed clipped but is still
better than what we see today. Once the blink fix lands it should be better.

Powered by Google App Engine
This is Rietveld 408576698