Gallery: Random fixes for the Viewport class.
commit823c3c0e97230ec5b4f451e725f7d8993d852e05
authorhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Jul 2014 08:57:11 +0000 (17 08:57 +0000)
committerhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Jul 2014 08:57:11 +0000 (17 08:57 +0000)
treef23c7818bb9c6abbd6afc99293a6e93619a02bcf
parent33371b3f00c98d19ba2a22326cb0b3ba6616c15b
Gallery: Random fixes for the Viewport class.

The CL do:

* Remove the device rect argument from paintDeviceRect because the rectangle can
be calculated from other arguments.

* Remove setByFrame(AndFit) helper functions that are used only once each to simplify
the Viewport class.

* Rename getScreenClipped with getImageBoundsOnScreenClipped. The old name
  sounds it retuns the bounds of screen.

* Add getImageElementBounds to obtain the bounds before applying zoom and
  offset.

BUG=245926
TEST=manually

Review URL: https://codereview.chromium.org/398263002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283719 0039d316-1c4b-4281-b951-d872f2087c98
ui/file_manager/gallery/js/image_editor/commands.js
ui/file_manager/gallery/js/image_editor/image_editor.js
ui/file_manager/gallery/js/image_editor/image_transform.js
ui/file_manager/gallery/js/image_editor/image_util.js
ui/file_manager/gallery/js/image_editor/image_view.js
ui/file_manager/gallery/js/image_editor/viewport.js
ui/file_manager/gallery/js/slide_mode.js