New issue
Advanced search Search tips

Issue 664212 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WindowTreeHost functions should be renamed to clearly indicate they are in pixels

Project Member Reported by sky@chromium.org, Nov 10 2016

Issue description

Lacking types to indicate pixels/dips SetBounds/GetBounds should renamed to clearly indicate they are in pixels. Some other functions may be in pixels too and they should be renamed as well. The reason for this is that's all too easy now to assume SetBounds() takes dips. Especially when WindowTreeHost has a Window and Window has functions with the same name that are in dips.
 
ui::PlatformWindow functions should be renamed as well. E.g. SetBounds takes in pixel and should be renamed to something like SetPixelBounds.
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dfdfc99ed90f23a71e37eca0320e2c2c687efa41

commit dfdfc99ed90f23a71e37eca0320e2c2c687efa41
Author: riajiang <riajiang@chromium.org>
Date: Tue Nov 29 05:37:47 2016

Rename WindowTreeHost G|SetBounds to indicate they are in pixels.

BUG= 664212 
TEST=covered by tests

Review-Url: https://codereview.chromium.org/2524873002
Cr-Commit-Position: refs/heads/master@{#434904}

[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/display_manager_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/display_util.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/extended_mouse_warp_controller.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/mirror_window_controller.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/screen_position_controller.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/screen_position_controller_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/unified_mouse_warp_controller.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/display/window_tree_host_manager.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_platform.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_platform.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_unified.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_unified.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_win.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_win.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_x11.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/ash_window_tree_host_x11.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/host/transformer_helper.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/shell_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/wm/boot_splash_screen_chromeos.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ash/wm/screen_dimmer_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/blimp/engine/session/blimp_engine_session.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/content/browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/content/shell/browser/shell_platform_data_aura.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/content/shell/browser/shell_views.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/mus/window_tree_client_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/mus/window_tree_host_mus.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/mus/window_tree_host_mus.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/test/aura_test_helper.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_tree_host.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_tree_host.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_tree_host_platform.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_tree_host_platform.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_tree_host_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_tree_host_x11.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_tree_host_x11.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/aura/window_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/mus/desktop_window_tree_host_mus.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/mus/desktop_window_tree_host_mus.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/mus/native_widget_mus.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/mus/native_widget_mus_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/native_widget_aura_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/views/widget/widget_interactive_uitest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/wm/core/capture_controller_unittest.cc
[modify] https://crrev.com/dfdfc99ed90f23a71e37eca0320e2c2c687efa41/ui/wm/core/default_screen_position_client.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8077b13220db6deab5e931e9917e93c870c69a7c

commit 8077b13220db6deab5e931e9917e93c870c69a7c
Author: riajiang <riajiang@chromium.org>
Date: Tue Nov 29 23:35:36 2016

Rename WindowTreeHost functions to indicate pixels/dips.

BUG= 664212 
TEST=covered by tests

Review-Url: https://codereview.chromium.org/2525113002
Cr-Commit-Position: refs/heads/master@{#435106}

[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/autoclick/autoclick_controller.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/display/cursor_window_controller.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/display/cursor_window_controller_unittest.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/display/display_util.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/display/extended_mouse_warp_controller.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/display/screen_position_controller.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/display/unified_mouse_warp_controller_unittest.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/display/window_tree_host_manager.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/host/ash_window_tree_host.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/host/ash_window_tree_host_platform.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/host/ash_window_tree_host_platform.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/host/ash_window_tree_host_unified.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/host/ash_window_tree_host_x11.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/host/ash_window_tree_host_x11.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/host/transformer_helper.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/magnifier/magnification_controller.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/mus/non_client_frame_controller.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/content/browser/web_contents/web_contents_view_aura.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/extensions/shell/browser/shell_desktop_controller_aura.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/mus/drag_drop_controller_mus.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/test/event_generator_delegate_aura.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/test/test_screen.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/test/ui_controls_factory_aurax11.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/test/ui_controls_factory_ozone.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/test/x11_event_sender.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_event_dispatcher.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host_observer.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host_platform.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host_platform.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host_unittest.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host_x11.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_tree_host_x11.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/aura/window_unittest.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/chromeos/touch_exploration_controller.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/mus/desktop_window_tree_host_mus.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/mus/desktop_window_tree_host_mus.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/mus/drop_target_mus.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/mus/mus_client.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/mus/native_widget_mus.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/mus/native_widget_mus.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/test/ui_controls_factory_desktop_aurax11.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_drop_target_win.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
[modify] https://crrev.com/8077b13220db6deab5e931e9917e93c870c69a7c/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h

Cc: -riajiang@chromium.org
Owner: riajiang@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment