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

Issue 2447303002: Scale client area, hit test mask and bounds by device_scale_factor. (Closed)

Created:
4 years, 1 month ago by riajiang
Modified:
4 years, 1 month ago
Reviewers:
kylechar, sadrul, sky
CC:
chromium-reviews, rjkroege, kylechar
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Scale client area, hit test mask and bounds by device_scale_factor. Fixes the second TODO of CL https://codereview.chromium.org/2341483004/. TODO: 1. Chrome browser doesn't show up with window bounds scaling. 2. Also scale window bounds in aura::mus::WindowTreeClient once window bounds work correctly. BUG=646926 TEST=manual (with --force-device-scale-factor=2) Committed: https://crrev.com/075c4290cdfc0cfca43c2114bce282ea9389e6fc Cr-Commit-Position: refs/heads/master@{#433009}

Patch Set 1 #

Patch Set 2 : aura wtc #

Patch Set 3 : bounds #

Total comments: 6

Patch Set 4 : sky@'s comments #

Total comments: 9

Patch Set 5 : convert #

Total comments: 5

Patch Set 6 : conditionals #

Total comments: 2

Patch Set 7 : screen instance #

Patch Set 8 : test_wm #

Patch Set 9 : mus_demo #

Patch Set 10 : test_screen #

Total comments: 2

Patch Set 11 : ScreenBase #

Patch Set 12 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -24 lines) Patch
M services/ui/demo/mus_demo.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M services/ui/demo/mus_demo.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -1 line 0 comments Download
M services/ui/public/cpp/tests/BUILD.gn View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M services/ui/public/cpp/tests/window_server_test_base.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M services/ui/public/cpp/tests/window_server_test_base.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M services/ui/public/cpp/tests/window_tree_client_unittest.cc View 1 2 3 4 5 6 3 chunks +7 lines, -0 lines 0 comments Download
M services/ui/public/cpp/window_tree_client.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +66 lines, -12 lines 0 comments Download
M services/ui/test_wm/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M services/ui/test_wm/test_wm.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -1 line 0 comments Download
M ui/aura/mus/window_tree_client.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +31 lines, -4 lines 0 comments Download
M ui/gfx/geometry/dip_util.h View 1 2 chunks +7 lines, -2 lines 0 comments Download
M ui/gfx/geometry/dip_util.cc View 1 2 3 4 3 chunks +33 lines, -4 lines 0 comments Download

Messages

Total messages: 50 (28 generated)
riajiang
Since scaling window bounds in WTC alone didn't fix the window bounds bug, I was ...
4 years, 1 month ago (2016-10-25 23:27:45 UTC) #3
riajiang
Since scaling window bounds in WTC alone didn't fix the window bounds bug, I was ...
4 years, 1 month ago (2016-10-25 23:33:51 UTC) #4
riajiang
Updated the patch and CL description. PTAL. Thanks!
4 years, 1 month ago (2016-11-08 21:42:14 UTC) #7
sky
https://codereview.chromium.org/2447303002/diff/60001/services/ui/public/cpp/window_tree_client.cc File services/ui/public/cpp/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/60001/services/ui/public/cpp/window_tree_client.cc#newcode77 services/ui/public/cpp/window_tree_client.cc:77: gfx::ConvertRectToDIP(device_scale_factor, window_data->bounds)); How come you adjust bounds in the ...
4 years, 1 month ago (2016-11-09 00:21:14 UTC) #8
riajiang
https://codereview.chromium.org/2447303002/diff/60001/services/ui/public/cpp/window_tree_client.cc File services/ui/public/cpp/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/60001/services/ui/public/cpp/window_tree_client.cc#newcode77 services/ui/public/cpp/window_tree_client.cc:77: gfx::ConvertRectToDIP(device_scale_factor, window_data->bounds)); On 2016/11/09 00:21:13, sky wrote: > How ...
4 years, 1 month ago (2016-11-09 21:07:08 UTC) #9
sky
https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc File services/ui/public/cpp/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc#newcode247 services/ui/public/cpp/window_tree_client.cc:247: if (device_scale_factor == 1.f) { I think the code ...
4 years, 1 month ago (2016-11-09 23:22:57 UTC) #10
kylechar
https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc File services/ui/public/cpp/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc#newcode42 services/ui/public/cpp/window_tree_client.cc:42: float DeviceScaleFactorForDisplay(int64_t display_id) { Name this something like ScaleFactorForDisplay()? ...
4 years, 1 month ago (2016-11-10 14:30:52 UTC) #12
riajiang
https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc File services/ui/public/cpp/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc#newcode42 services/ui/public/cpp/window_tree_client.cc:42: float DeviceScaleFactorForDisplay(int64_t display_id) { On 2016/11/10 14:30:52, kylechar wrote: ...
4 years, 1 month ago (2016-11-10 19:16:08 UTC) #14
sky
https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc File services/ui/public/cpp/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/80001/services/ui/public/cpp/window_tree_client.cc#newcode247 services/ui/public/cpp/window_tree_client.cc:247: if (device_scale_factor == 1.f) { On 2016/11/10 19:16:08, riajiang ...
4 years, 1 month ago (2016-11-10 23:55:15 UTC) #15
riajiang
https://codereview.chromium.org/2447303002/diff/120001/ui/aura/mus/window_tree_client.cc File ui/aura/mus/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/120001/ui/aura/mus/window_tree_client.cc#newcode219 ui/aura/mus/window_tree_client.cc:219: if (device_scale_factor == 1.f) { On 2016/11/10 23:55:15, sky ...
4 years, 1 month ago (2016-11-11 19:41:21 UTC) #17
sky
LGTM https://codereview.chromium.org/2447303002/diff/160001/services/ui/public/cpp/window_tree_client.cc File services/ui/public/cpp/window_tree_client.cc (right): https://codereview.chromium.org/2447303002/diff/160001/services/ui/public/cpp/window_tree_client.cc#newcode921 services/ui/public/cpp/window_tree_client.cc:921: WindowPrivate(window).LocalSetBounds(old_bounds_in_dip, new_bounds_in_dip); Good thing we're getting rid of ...
4 years, 1 month ago (2016-11-11 21:16:53 UTC) #18
sadrul
Change looks good. But the try failures look relevant. Perhaps the Screen instance hasn't been ...
4 years, 1 month ago (2016-11-12 02:20:04 UTC) #23
riajiang
On 2016/11/12 02:20:04, sadrul wrote: > Change looks good. But the try failures look relevant. ...
4 years, 1 month ago (2016-11-17 01:02:01 UTC) #26
kylechar
https://codereview.chromium.org/2447303002/diff/280001/services/ui/demo/mus_demo.h File services/ui/demo/mus_demo.h (right): https://codereview.chromium.org/2447303002/diff/280001/services/ui/demo/mus_demo.h#newcode83 services/ui/demo/mus_demo.h:83: std::unique_ptr<display::test::TestScreen> test_screen_; Was there a reason not to use ...
4 years, 1 month ago (2016-11-17 14:16:38 UTC) #27
riajiang
https://codereview.chromium.org/2447303002/diff/280001/services/ui/demo/mus_demo.h File services/ui/demo/mus_demo.h (right): https://codereview.chromium.org/2447303002/diff/280001/services/ui/demo/mus_demo.h#newcode83 services/ui/demo/mus_demo.h:83: std::unique_ptr<display::test::TestScreen> test_screen_; On 2016/11/17 14:16:37, kylechar wrote: > Was ...
4 years, 1 month ago (2016-11-17 18:30:25 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2447303002/300001
4 years, 1 month ago (2016-11-17 18:31:04 UTC) #39
kylechar
lgtm
4 years, 1 month ago (2016-11-17 18:31:32 UTC) #40
sadrul
lgtm
4 years, 1 month ago (2016-11-17 18:32:28 UTC) #41
commit-bot: I haz the power
Failed to apply patch for services/ui/public/cpp/window_tree_client.cc: While running git apply --index -p1; error: patch failed: ...
4 years, 1 month ago (2016-11-17 18:40:13 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2447303002/320001
4 years, 1 month ago (2016-11-17 19:03:46 UTC) #46
commit-bot: I haz the power
Committed patchset #12 (id:320001)
4 years, 1 month ago (2016-11-17 23:14:30 UTC) #48
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 23:19:07 UTC) #50
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/075c4290cdfc0cfca43c2114bce282ea9389e6fc
Cr-Commit-Position: refs/heads/master@{#433009}

Powered by Google App Engine
This is Rietveld 408576698