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

Issue 1417023002: Remove some implicit Point to PointF conversions, add helpers. (Closed)

Created:
5 years, 2 months ago by danakj
Modified:
5 years, 2 months ago
Reviewers:
sky
CC:
chromium-reviews, tdanderson+views_chromium.org, plundblad+watch_chromium.org, aboxhall+watch_chromium.org, tfarina, nektar+watch_chromium.org, yuzo+watch_chromium.org, je_julie, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, piman, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove some implicit Point to PointF conversions, add helpers. This adds gfx::ScaleTo{Floored,Ceiled,Rounded}Point() helpers similar to those that exist for Rect and Size. It uses those helpers to scale integer points to integer points, and avoid implicit conversions to PointFs in the calling code. Also removes some implicit conversions to PointF with ui::SelectionBounds. R=sadrul, sky BUG=342848 Committed: https://crrev.com/34a8990806a42ee9356ce5b2f932057169c03a90 Cr-Commit-Position: refs/heads/master@{#355451}

Patch Set 1 #

Patch Set 2 : pointfconvert-views: . #

Patch Set 3 : pointfconvert-views: . #

Patch Set 4 : pointfconvert-views: . #

Patch Set 5 : pointfconvert-views: . #

Patch Set 6 : pointfconvert-views: extrachange #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -37 lines) Patch
M ash/touch/touch_uma.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tabs/window_finder_x11.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/base/cursor/cursor_util.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/base/x/x11_util.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/display.cc View 1 2 1 chunk +5 lines, -8 lines 0 comments Download
M ui/gfx/geometry/dip_util.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M ui/gfx/geometry/point.h View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M ui/gfx/geometry/point.cc View 1 2 3 4 2 chunks +37 lines, -0 lines 2 comments Download
M ui/gfx/image/image_skia_operations.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/win/dpi.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/touchui/touch_selection_controller_impl.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M ui/views/touchui/touch_selection_controller_impl_unittest.cc View 3 chunks +11 lines, -7 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 2 chunks +4 lines, -5 lines 0 comments Download
M ui/wm/core/default_screen_position_client.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (3 generated)
danakj
This hits implicit point->pointf for selection bounds code and some scaling code. Should be simple, ...
5 years, 2 months ago (2015-10-20 21:03:16 UTC) #1
danakj
The last file was using ScaleToFlooredPoint type helpers, so I rolled most of those type ...
5 years, 2 months ago (2015-10-20 21:45:50 UTC) #3
sky
https://codereview.chromium.org/1417023002/diff/100001/ui/gfx/geometry/point.cc File ui/gfx/geometry/point.cc (right): https://codereview.chromium.org/1417023002/diff/100001/ui/gfx/geometry/point.cc#newcode73 ui/gfx/geometry/point.cc:73: Point ScaleToCeiledPoint(const Point& point, float scale) { WDYT of ...
5 years, 2 months ago (2015-10-21 16:45:00 UTC) #5
danakj
https://codereview.chromium.org/1417023002/diff/100001/ui/gfx/geometry/point.cc File ui/gfx/geometry/point.cc (right): https://codereview.chromium.org/1417023002/diff/100001/ui/gfx/geometry/point.cc#newcode73 ui/gfx/geometry/point.cc:73: Point ScaleToCeiledPoint(const Point& point, float scale) { On 2015/10/21 ...
5 years, 2 months ago (2015-10-21 17:55:41 UTC) #6
sky
Ugh, ok. Go with what you have. LGTM
5 years, 2 months ago (2015-10-21 21:58:28 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1417023002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1417023002/100001
5 years, 2 months ago (2015-10-21 23:12:33 UTC) #9
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 2 months ago (2015-10-22 00:25:02 UTC) #10
commit-bot: I haz the power
5 years, 2 months ago (2015-10-22 00:25:53 UTC) #11
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/34a8990806a42ee9356ce5b2f932057169c03a90
Cr-Commit-Position: refs/heads/master@{#355451}

Powered by Google App Engine
This is Rietveld 408576698