Change image document zooming logic.
The current zoom logic in image documents interacts badly with use-zoom-for-dsf, in addition to having some weird behavior already. This patch changes three things: 1. When loading a large image when page zoom was not 100% the image would start at a strange scaling factor until it was clicked. This is fixed. 2. When page zoom is at 100% a large image will always scale to fit the window regardless of the device scale factor. Previously with use-zoom-for-dsf on it would scale too large for the window. 3. When an image that fits in the window is zoomed in until it doesn't it is no longer clickable. Previously it would start acting like a large image, which was strange. Also added a test suite for ImageDocument. BUG=324086,644059 Review-Url: https://codereview.chromium.org/2319863006 Cr-Commit-Position: refs/heads/master@{#419867}
Showing
Please register or sign in to comment