PDF Viewer Update: Ignore rounding error for zoom-changed event dispatch
The viewport zoom can have a non-integer value, but, currently, when focus passes through the zoom input, the 'zoom-changed' event is dispatched for the integer value. Consequently, on the blurring of the zoom input, the zoom of the PDF content slightly changes to the nearest integer value of the viewport zoom, even though the value in the zoom indicator does not change. To fix this, only dispatch the zoom-change' event when the difference of the input value and the viewport zoom value is less than 0.5. Change-Id: I8380d148cbd3219c34c56a51af47c2e9a351efd4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436856Reviewed-by:John Lee <johntlee@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Cr-Commit-Position: refs/heads/master@{#811754}
Showing
Please register or sign in to comment