Rename ClampToMin and ClampToMax
commita4a08d0b3d83eae6b232636e4d07a9b0e70594ed
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 30 May 2013 00:18:00 +0000 (30 00:18 +0000)
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 30 May 2013 00:18:00 +0000 (30 00:18 +0000)
treee114801e823f885d91437929ebc349e28dc25281
parent1764980dfa80e1f3e61e283de71ed3c3a707700c
Rename ClampToMin and ClampToMax

I find these function names confusing. I have to stop and read the code each
time I try to use them to figure out what they're going to do.

Part of the confusion is that ClampToMin sets the components to the _maximum_
of the two sizes/vectors. It's also not clear from the function name which of
the two objects is acting as the 'Min'. This is mitigated by the parameter names
and local variables passed to the function, but it would be nice if the name
of the function itself made this clear.

a.ClampToLowerBound(b) makes it clear both that b is acting as the lower bound
and how and when a is going to be altered.

Other names I've considered (for ClampToMin -- the suggestions for ClampToMax
are analagous):
  ClampIfSmallerThan(other)
  SetComponentsToMax(other)
  Union(other) (for sizes)

R=danakj,sky
BUG=None

Review URL: https://chromiumcodereview.appspot.com/14367021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203017 0039d316-1c4b-4281-b951-d872f2087c98
30 files changed:
cc/input/page_scale_animation.cc
cc/layers/layer_impl.cc
cc/layers/picture_layer_impl.cc
cc/layers/scrollbar_layer.cc
cc/layers/tiled_layer.cc
cc/trees/layer_tree_impl.cc
chrome/browser/ui/app_list/app_list_service_mac.mm
chrome/browser/ui/views/app_list/app_list_controller_win.cc
chrome/browser/ui/views/find_bar_view.cc
chrome/browser/ui/views/location_bar/ev_bubble_view.cc
chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
content/browser/renderer_host/render_widget_host_view_android.cc
ui/compositor/layer.cc
ui/gfx/point_base.h
ui/gfx/point_unittest.cc
ui/gfx/size_base.h
ui/gfx/size_unittest.cc
ui/gfx/vector2d.h
ui/gfx/vector2d_f.h
ui/gfx/vector2d_unittest.cc
ui/gfx/vector3d_f.h
ui/gfx/vector3d_unittest.cc
ui/message_center/views/message_center_view.cc
ui/message_center/views/notifier_settings_view.cc
ui/views/bubble/bubble_border.cc
ui/views/bubble/bubble_frame_view.cc
ui/views/controls/button/label_button.cc
ui/views/controls/scrollbar/kennedy_scroll_bar.cc
ui/views/controls/tabbed_pane/tabbed_pane.cc
ui/views/examples/progress_bar_example.cc