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

Issue 11361186: ui: Add methods to clamp Sizes, Points, and Vectors from above or below. (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
Reviewers:
slavi, sky, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, backer, piman
Visibility:
Public.

Description

ui: Add methods to clamp Sizes, Points, and Vectors from above or below. Tests: PointTest.Clamp PointTest.ClampF SizeTest.Clamp SizeTest.ClampF Vector2dTest.Clamp Vector2dTest.ClampF Vector3dTest.ClampF R=sky,enne BUG=147395 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=167014

Patch Set 1 #

Patch Set 2 : BottomRight #

Total comments: 3

Patch Set 3 : rename #

Patch Set 4 : varnames #

Total comments: 2

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -60 lines) Patch
M cc/geometry.h View 1 chunk +0 lines, -45 lines 0 comments Download
M cc/layer_impl.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M cc/page_scale_animation.cc View 1 2 2 chunks +5 lines, -8 lines 0 comments Download
M cc/tiled_layer.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/point_base.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/point_unittest.cc View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
M ui/gfx/size_base.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/size_unittest.cc View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
M ui/gfx/vector2d.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/vector2d_f.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/vector2d_unittest.cc View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
M ui/gfx/vector3d_f.h View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M ui/gfx/vector3d_unittest.cc View 1 2 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
danakj
sky please review ui/gfx enne please review cc
8 years, 1 month ago (2012-11-09 16:44:19 UTC) #1
sky
https://codereview.chromium.org/11361186/diff/4001/ui/gfx/point_base.h File ui/gfx/point_base.h (right): https://codereview.chromium.org/11361186/diff/4001/ui/gfx/point_base.h#newcode44 ui/gfx/point_base.h:44: void ClampFromAbove(const Class& other) { Is there some other ...
8 years, 1 month ago (2012-11-09 18:23:11 UTC) #2
danakj
https://codereview.chromium.org/11361186/diff/4001/ui/gfx/size_base.h File ui/gfx/size_base.h (right): https://codereview.chromium.org/11361186/diff/4001/ui/gfx/size_base.h#newcode38 ui/gfx/size_base.h:38: void ClampFromAbove(const Class& other) { On 2012/11/09 18:23:12, sky ...
8 years, 1 month ago (2012-11-09 18:24:25 UTC) #3
danakj
PTAL ClampToMax() ClampToMin()
8 years, 1 month ago (2012-11-09 18:54:55 UTC) #4
danakj
Also considered: ClampIfLargerThan() clamps <= something ClampIfSmallerThan() clamps >= something Please place your votes here.
8 years, 1 month ago (2012-11-09 18:59:13 UTC) #5
slavi
On 2012/11/09 18:59:13, danakj wrote: > Also considered: > ClampIfLargerThan() clamps <= something > ClampIfSmallerThan() ...
8 years, 1 month ago (2012-11-09 19:15:18 UTC) #6
slavi
https://codereview.chromium.org/11361186/diff/16/ui/gfx/vector3d_f.h File ui/gfx/vector3d_f.h (right): https://codereview.chromium.org/11361186/diff/16/ui/gfx/vector3d_f.h#newcode48 ui/gfx/vector3d_f.h:48: x_ = x_ <= max.x_ ? x_ : max.x_; ...
8 years, 1 month ago (2012-11-09 19:15:26 UTC) #7
danakj
https://codereview.chromium.org/11361186/diff/16/ui/gfx/vector3d_f.h File ui/gfx/vector3d_f.h (right): https://codereview.chromium.org/11361186/diff/16/ui/gfx/vector3d_f.h#newcode48 ui/gfx/vector3d_f.h:48: x_ = x_ <= max.x_ ? x_ : max.x_; ...
8 years, 1 month ago (2012-11-09 19:54:57 UTC) #8
danakj
On Fri, Nov 9, 2012 at 2:15 PM, <skaslev@chromium.org> wrote: > On 2012/11/09 18:59:13, danakj ...
8 years, 1 month ago (2012-11-09 19:56:26 UTC) #9
sky
LGTM New names are much better!
8 years, 1 month ago (2012-11-09 21:41:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11361186/16
8 years, 1 month ago (2012-11-09 21:42:15 UTC) #11
commit-bot: I haz the power
Failed to apply patch for ui/gfx/point_base.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years, 1 month ago (2012-11-09 21:42:18 UTC) #12
commit-bot: I haz the power
8 years, 1 month ago (2012-11-09 21:47:55 UTC) #13

Powered by Google App Engine
This is Rietveld 408576698