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

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed)

Created:
7 years, 8 months ago by girard
Modified:
7 years, 6 months ago
Reviewers:
kevers
CC:
chromium-reviews, ben+watch_chromium.org, tfarina, jam, joi+watch-content_chromium.org, rsesek+watch_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, James Su
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

NOT FOR SUBMIT - Windows Views HiDPI Work in progress... not intended for submit. BUG=149881

Patch Set 1 #

Patch Set 2 : Rollback empty changes. #

Total comments: 10

Patch Set 3 : Mass commit of several features - tooltips, bubble location, tab drags. #

Patch Set 4 : Feature Complete (includes many hacks!) #

Patch Set 5 : Moving windows code into ifdef's #

Total comments: 14

Patch Set 6 : Revert spurious changes, plus some corrections. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -162 lines) Patch
M cc/layers/scrollbar_layer.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/thumbnails/simple_thumbnail_crop.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 3 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/ui/views/status_bubble_views.cc View 1 2 3 4 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/dragged_tab_view.cc View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller.cc View 1 2 3 4 2 chunks +11 lines, -2 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 2 chunks +6 lines, -3 lines 0 comments Download
M ui/base/win/dpi.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/base/win/dpi.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M ui/base/win/events_win.cc View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M ui/gfx/canvas_paint_win.h View 1 2 3 2 chunks +7 lines, -4 lines 0 comments Download
M ui/gfx/display.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M ui/gfx/font.h View 1 2 3 4 1 chunk +119 lines, -114 lines 0 comments Download
M ui/gfx/font.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gfx/rect_conversions.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gfx/rect_conversions.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M ui/gfx/skbitmap_operations.cc View 1 chunk +5 lines, -1 line 0 comments Download
M ui/surface/accelerated_surface_win.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/native/native_view_host.cc View 1 2 3 4 5 2 chunks +11 lines, -0 lines 0 comments Download
M ui/views/widget/aero_tooltip_manager.cc View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M ui/views/widget/native_widget_win.cc View 1 2 3 4 5 14 chunks +46 lines, -21 lines 0 comments Download
M ui/views/widget/tooltip_manager_win.cc View 1 2 3 4 4 chunks +8 lines, -4 lines 0 comments Download
M ui/views/win/hwnd_message_handler.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/views/win/hwnd_message_handler.cc View 1 2 3 4 5 2 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
kevers
https://codereview.chromium.org/14348033/diff/1016/content/renderer/render_widget.cc File content/renderer/render_widget.cc (left): https://codereview.chromium.org/14348033/diff/1016/content/renderer/render_widget.cc#oldcode1193 content/renderer/render_widget.cc:1193: gfx::ScaleRect(bounds, device_scale_factor_)); Will need to test in Win-Aura with ...
7 years, 8 months ago (2013-04-19 20:31:41 UTC) #1
enne (OOO)
https://codereview.chromium.org/14348033/diff/1016/cc/layers/scrollbar_layer.cc File cc/layers/scrollbar_layer.cc (right): https://codereview.chromium.org/14348033/diff/1016/cc/layers/scrollbar_layer.cc#newcode364 cc/layers/scrollbar_layer.cc:364: return gfx::ToSizedRect(content_rect); Why do you want to round down ...
7 years, 8 months ago (2013-04-19 20:38:07 UTC) #2
kevers
https://codereview.chromium.org/14348033/diff/27025/chrome/browser/thumbnails/simple_thumbnail_crop.cc File chrome/browser/thumbnails/simple_thumbnail_crop.cc (right): https://codereview.chromium.org/14348033/diff/27025/chrome/browser/thumbnails/simple_thumbnail_crop.cc#newcode132 chrome/browser/thumbnails/simple_thumbnail_crop.cc:132: copy_size, ui::GetScaleFactorScale(ui::SCALE_FACTOR_140P))); ui::GetMaxScaleFactor() in place of the if-else? https://codereview.chromium.org/14348033/diff/27025/chrome/browser/ui/views/tabs/dragged_tab_view.cc ...
7 years, 6 months ago (2013-06-03 17:28:50 UTC) #3
girard
7 years, 6 months ago (2013-06-03 22:31:55 UTC) #4
Thanks for the feedback - I've incorporated your suggestions into the code, and
I'm now going to start breaking the code into smaller CL's for commit.  There
are (at least) two outstanding issues at this point:
1) Backing store seems to be incorrectly sized, especially wrt the new tab page.
2) I need to test much of this code with and without aura, and high dpi enabled.

https://codereview.chromium.org/14348033/diff/1016/cc/layers/scrollbar_layer.cc
File cc/layers/scrollbar_layer.cc (right):

https://codereview.chromium.org/14348033/diff/1016/cc/layers/scrollbar_layer....
cc/layers/scrollbar_layer.cc:364: return gfx::ToSizedRect(content_rect);
On 2013/04/19 20:38:07, enne wrote:
> Why do you want to round down the size here?

This line slipped in from another patch I was evaluating.... doesn't belong here
- good catch.

https://codereview.chromium.org/14348033/diff/1016/ui/views/win/hwnd_message_...
File ui/views/win/hwnd_message_handler.cc (right):

https://codereview.chromium.org/14348033/diff/1016/ui/views/win/hwnd_message_...
ui/views/win/hwnd_message_handler.cc:524: *bounds =
ui::win::ScreenToDIPRect(*bounds);
On 2013/04/19 20:31:42, kevers wrote:
> As it stands, this change will break Win-Aura, which does the transformation
in
> the caller of this method.

I've moved this up to the caller (NativeWidgetWin::GetWindowPlacement) but I
can't find the corresponding conversion in NativeWidgetAura. Where should I be
looking?

https://codereview.chromium.org/14348033/diff/27025/chrome/browser/thumbnails...
File chrome/browser/thumbnails/simple_thumbnail_crop.cc (right):

https://codereview.chromium.org/14348033/diff/27025/chrome/browser/thumbnails...
chrome/browser/thumbnails/simple_thumbnail_crop.cc:132: copy_size,
ui::GetScaleFactorScale(ui::SCALE_FACTOR_140P)));
On 2013/06/03 17:28:50, kevers wrote:
> ui::GetMaxScaleFactor() in place of the if-else?
> 

Good idea. Done.

https://codereview.chromium.org/14348033/diff/27025/chrome/browser/ui/views/t...
File chrome/browser/ui/views/tabs/dragged_tab_view.cc (right):

https://codereview.chromium.org/14348033/diff/27025/chrome/browser/ui/views/t...
chrome/browser/ui/views/tabs/dragged_tab_view.cc:84: #if defined(OS_WIN)
On 2013/06/03 17:28:50, kevers wrote:
> Has this change been tested on Aura?  If for non-Aura Windows, perhaps it
should
> be moved into the following conditional block.

Done.

https://codereview.chromium.org/14348033/diff/27025/ui/base/win/dpi.cc
File ui/base/win/dpi.cc (right):

https://codereview.chromium.org/14348033/diff/27025/ui/base/win/dpi.cc#newcode97
ui/base/win/dpi.cc:97: // TODO(kevers): Switch to non-deprecated method for
float to int conversions.
On 2013/06/03 17:28:50, kevers wrote:
> Misleading comment.  ToFlooredPoint is not deprecated, only ToFlooredRect. 
> Please remove the comment.

Done.

https://codereview.chromium.org/14348033/diff/27025/ui/gfx/skbitmap_operation...
File ui/gfx/skbitmap_operations.cc (right):

https://codereview.chromium.org/14348033/diff/27025/ui/gfx/skbitmap_operation...
ui/gfx/skbitmap_operations.cc:147: std::min(rgb.height(), alpha.height()), 0);
On 2013/06/03 17:28:50, kevers wrote:
> Is this change necessary?  Recent changes to the rounding logic at non-integer
> scale factors have cleared up many of the problems with size misalignment. UX
> should be providing resources in the correct size.

This prevents tearing in the new tab page. We've still got an alignment problem
(but I agree that this isn't the correct place to correct it.)

https://codereview.chromium.org/14348033/diff/27025/ui/views/win/hwnd_message...
File ui/views/win/hwnd_message_handler.h (right):

https://codereview.chromium.org/14348033/diff/27025/ui/views/win/hwnd_message...
ui/views/win/hwnd_message_handler.h:78: void SetBoundsInPixel(const gfx::Rect&
bounds);
On 2013/06/03 17:28:50, kevers wrote:
> Tested on Aura?  I suspect this change will break the compile as SetBounds is
> called.

This change isn't necessary. I'm turfing it out (and adding an appropriate
comment.)

Powered by Google App Engine
This is Rietveld 408576698