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

Issue 402863002: Specify canvas size by using CSS width/height. (Closed)

Created:
6 years, 5 months ago by hirono
Modified:
6 years, 5 months ago
Reviewers:
fukino
CC:
chromium-reviews, rginda+watch_chromium.org, mtomasz+watch_chromium.org, yoshiki+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Specify canvas size by using CSS width/height. In Gallery, the size of the slide image's canvas is scaled by window.devicePixelRatio. For example, if the devicePixelRatio is 2, the doubled size canvas is prepared and it is scaled to displaying size so that the pixels of canvas fit to the device pixels. Previously the canvas is scaled by using CSS transformation. Thus the element position is calculated by the original canvas size, and then it is scaled. This makes the position calculation of canvas complex, and it was regressed at the crrev.com/398263002. At this CL, canvas is scaled by using CSS width/height property instead of bringing back the complex position calculation. BUG=395062 TEST=manually Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284654

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Fixed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -21 lines) Patch
M ui/file_manager/gallery/js/image_editor/image_view.js View 1 2 4 chunks +18 lines, -20 lines 0 comments Download
M ui/file_manager/gallery/js/image_editor/viewport.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
hirono
PTAL the CL? Thank you!
6 years, 5 months ago (2014-07-18 11:00:53 UTC) #1
fukino
On 2014/07/18 11:00:53, hirono wrote: > PTAL the CL? Thank you! lgtm with nits.
6 years, 5 months ago (2014-07-22 05:32:06 UTC) #2
fukino
https://codereview.chromium.org/402863002/diff/20001/ui/file_manager/gallery/js/image_editor/image_view.js File ui/file_manager/gallery/js/image_editor/image_view.js (right): https://codereview.chromium.org/402863002/diff/20001/ui/file_manager/gallery/js/image_editor/image_view.js#newcode220 ui/file_manager/gallery/js/image_editor/image_view.js:220: var imageBoudns = this.viewport_.getImageElementBoundsOnScreen(); nit: imageBounds? https://codereview.chromium.org/402863002/diff/20001/ui/file_manager/gallery/js/image_editor/image_view.js#newcode228 ui/file_manager/gallery/js/image_editor/image_view.js:228: return ...
6 years, 5 months ago (2014-07-22 05:32:18 UTC) #3
hirono
Thank you! https://codereview.chromium.org/402863002/diff/20001/ui/file_manager/gallery/js/image_editor/image_view.js File ui/file_manager/gallery/js/image_editor/image_view.js (right): https://codereview.chromium.org/402863002/diff/20001/ui/file_manager/gallery/js/image_editor/image_view.js#newcode220 ui/file_manager/gallery/js/image_editor/image_view.js:220: var imageBoudns = this.viewport_.getImageElementBoundsOnScreen(); On 2014/07/22 05:32:18, ...
6 years, 5 months ago (2014-07-22 06:51:28 UTC) #4
hirono
The CQ bit was checked by hirono@chromium.org
6 years, 5 months ago (2014-07-22 07:27:53 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hirono@chromium.org/402863002/40001
6 years, 5 months ago (2014-07-22 07:28:40 UTC) #6
commit-bot: I haz the power
6 years, 5 months ago (2014-07-22 09:15:22 UTC) #7
Message was sent while issue was closed.
Change committed as 284654

Powered by Google App Engine
This is Rietveld 408576698