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 Review URL: https://codereview.chromium.org/402863002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284654 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment