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

Issue 1421713002: Explicitly convert Point to PointF for event code (Closed)

Created:
5 years, 2 months ago by danakj
Modified:
5 years, 1 month ago
Reviewers:
sky
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, shuchen+watch_chromium.org, dcheng, bondd+autofillwatch_chromium.org, dmazzoni+watch_chromium.org, jdduke+watch_chromium.org, tapted, tdanderson+views_chromium.org, Matt Giuca, aboxhall+watch_chromium.org, nona+watch_chromium.org, je_julie, kalyank, tdresser+watch_chromium.org, rouslan+autofill_chromium.org, mlamouri+watch-notifications_chromium.org, yuzo+watch_chromium.org, plundblad+watch_chromium.org, tfarina, nektar+watch_chromium.org, jdonnelly+autofillwatch_chromium.org, dtseng+watch_chromium.org, estade+watch_chromium.org, peter+watch_chromium.org, James Su, piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@wip
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Explicitly convert Point to PointF for event code Implicit conversions are going away, so explicitly pass PointF to things that want a PointF. BUG=342848

Patch Set 1 : pointfconvert-prod: . #

Total comments: 6

Patch Set 2 : pointfconvert-prod: . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -170 lines) Patch
M ash/autoclick/autoclick_controller.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M ash/drag_drop/drag_drop_controller.cc View 1 1 chunk +5 lines, -4 lines 0 comments Download
M ash/drag_drop/drag_drop_tracker.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/host/ash_window_tree_host.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/shelf/shelf_view.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M ash/wm/workspace/multi_window_resize_controller.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_root_view.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/app_list/folder_image.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/window_event_dispatcher.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M ui/aura/window_tree_host.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/aura/window_tree_host_x11.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/events/test/event_generator.cc View 1 14 chunks +50 lines, -74 lines 0 comments Download
M ui/message_center/views/notifier_settings_view.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/accessibility/ax_view_obj_wrapper.cc View 1 1 chunk +8 lines, -6 lines 0 comments Download
M ui/views/accessibility/native_view_accessibility.cc View 1 1 chunk +8 lines, -12 lines 0 comments Download
M ui/views/controls/button/custom_button.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M ui/views/controls/button/radio_button.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 3 chunks +12 lines, -10 lines 0 comments Download
M ui/views/controls/menu/menu_message_loop_aura.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar_button.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc View 2 chunks +4 lines, -8 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/drop_helper.cc View 3 chunks +6 lines, -8 lines 0 comments Download
M ui/views/widget/root_view.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M ui/views/widget/widget.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
danakj
5 years, 2 months ago (2015-10-22 21:54:00 UTC) #6
danakj
So now we finally get to "pass PointFs to events". In production there's not that ...
5 years, 2 months ago (2015-10-22 21:55:24 UTC) #7
sky
I'm curious. Do you have a list of the call sites that actually supply a ...
5 years, 2 months ago (2015-10-22 23:12:54 UTC) #8
danakj
On 2015/10/22 23:12:54, sky wrote: > I'm curious. Do you have a list of the ...
5 years, 2 months ago (2015-10-22 23:34:56 UTC) #9
danakj
On 2015/10/22 23:34:56, danakj wrote: > these are the ones in the linux desktop chrome ...
5 years, 2 months ago (2015-10-22 23:37:12 UTC) #10
danakj
On 2015/10/22 23:37:12, danakj wrote: > On 2015/10/22 23:34:56, danakj wrote: > > these are ...
5 years, 2 months ago (2015-10-22 23:39:41 UTC) #11
sky
https://codereview.chromium.org/1421713002/diff/40001/ash/drag_drop/drag_drop_controller.cc File ash/drag_drop/drag_drop_controller.cc (right): https://codereview.chromium.org/1421713002/diff/40001/ash/drag_drop/drag_drop_controller.cc#newcode54 ash/drag_drop/drag_drop_controller.cc:54: gfx::PointF final_origin(drag_image_bounds.origin()); You don't need the floating point until ...
5 years, 2 months ago (2015-10-23 21:13:13 UTC) #12
danakj
5 years, 2 months ago (2015-10-23 21:46:11 UTC) #13
I looked through for more of similar things and changed them to defer casting
where it looked like it made sense based on your request. PTAL

https://codereview.chromium.org/1421713002/diff/40001/ash/drag_drop/drag_drop...
File ash/drag_drop/drag_drop_controller.cc (right):

https://codereview.chromium.org/1421713002/diff/40001/ash/drag_drop/drag_drop...
ash/drag_drop/drag_drop_controller.cc:54: gfx::PointF
final_origin(drag_image_bounds.origin());
On 2015/10/23 21:13:13, sky wrote:
> You don't need the floating point until the RectF constructor below. So, keep
> this a Point until then.

Done.

https://codereview.chromium.org/1421713002/diff/40001/ash/drag_drop/drag_drop...
ash/drag_drop/drag_drop_controller.cc:59: float total_x_offset =
drag_image_offset->x();
made these ints too

https://codereview.chromium.org/1421713002/diff/40001/ui/events/test/event_ge...
File ui/events/test/event_generator.cc (right):

https://codereview.chromium.org/1421713002/diff/40001/ui/events/test/event_ge...
ui/events/test/event_generator.cc:365: gfx::PointF location(start);
I could cast |start| in the TouchEvent directly, but this variable already
exists (and needs to be float) down below, so moving up here seems ok?

https://codereview.chromium.org/1421713002/diff/40001/ui/views/controls/textf...
File ui/views/controls/textfield/textfield.cc (right):

https://codereview.chromium.org/1421713002/diff/40001/ui/views/controls/textf...
ui/views/controls/textfield/textfield.cc:1157: gfx::RectF
r1(render_text->GetCursorBounds(start_sel, true));
This one is about SelectionBounds, which are floats. I could cast in the SetEdge
instead here too, left it for now.

Powered by Google App Engine
This is Rietveld 408576698