Revert to old rect conversion behavior
commit6d06578dba7958fb3962182a880fe6aa679c19ae
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 26 Oct 2012 19:48:42 +0000 (26 19:48 +0000)
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 26 Oct 2012 19:48:42 +0000 (26 19:48 +0000)
tree0fa53fc1e0868705a28bcf10ac257aa2601dd0c6
parent4413c9c60eae804d2bc63734ed6cddf7474891c5
Revert to old rect conversion behavior

With https://chromiumcodereview.appspot.com/10996037, some rect conversion behaviors changed and regressions were introduced. To ensure that no more appear, this CL reverts the behavior changes introduced by the previous patch.

The old behavior was to convert from RectF to Rect by flooring the position and size. Ideally, this old behavior would not appear in the public API to discourage its use, but the legacy behavior is required in enough places that it seems worse to duplicate the ToFlooredRect function at each call site. Instead, I've named the function ToFlooredRectDeprecated to discourage its use in new code. I've included unit tests to ensure that this function replicates the old behavior.

BUG=None
TEST=RectTest.ToFlooredRect

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164383 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/renderer_host/backing_store_mac.mm
content/renderer/browser_plugin/browser_plugin_backing_store.cc
content/renderer/render_widget.cc
ui/gfx/image/image_skia_operations.cc
ui/gfx/rect_conversions.cc
ui/gfx/rect_conversions.h
ui/gfx/rect_unittest.cc