Bug 1455462 - Part 2. Use the rounded zoom value of devtool panel. r=jdescottes

This patch will use rounded zoom value of dev tool panel.
This changes will ensure the zoom value test.

MozReview-Commit-ID: JvSdZUbpeCH

--HG--
extra : rebase_source : 390361836735f7bb1edeb28ad9e6ff40bb51e97f
This commit is contained in:
Mantaroh Yoshinaga 2018-05-11 09:08:09 +09:00
parent 9c2ce884eb
commit c91355132f

View File

@ -50,6 +50,8 @@ exports.register = function(window) {
// cap zoom value
zoomValue = Math.max(newValue, MIN_ZOOM);
zoomValue = Math.min(zoomValue, MAX_ZOOM);
// Prevent the floating-point error. (e.g. 1.1 + 0.1 = 1.2000000000000002)
zoomValue = Math.round(zoomValue * 10) / 10;
contViewer.fullZoom = zoomValue;