Web Inspector: Zoom never goes back to 100% size
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 22:50:47 +0000 (22:50 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 22:50:47 +0000 (22:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150637

Add and subtract 20% from the zoom level so the zoom factor can return
to the 1 starting zoom factor if you go back the other direction.

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector._increaseZoom): Add 0.2 instead of multiplying 1.2.
(WebInspector._decreaseZoom): Subtract 0.2 instead of multiplying 0.8.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@191697 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js

index 4ebd897..49a6d77 100644 (file)
@@ -1,3 +1,17 @@
+2015-10-28  Timothy Hatcher  <timothy@apple.com>
+
+        Web Inspector: Zoom never goes back to 100% size
+        https://bugs.webkit.org/show_bug.cgi?id=150637
+
+        Add and subtract 20% from the zoom level so the zoom factor can return
+        to the 1 starting zoom factor if you go back the other direction.
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Base/Main.js:
+        (WebInspector._increaseZoom): Add 0.2 instead of multiplying 1.2.
+        (WebInspector._decreaseZoom): Subtract 0.2 instead of multiplying 0.8.
+
 2015-10-28  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: Rendering Frames pie chart does not update during initial selection of a timeline range
index 1c5b15e..2997d0b 100644 (file)
@@ -1818,13 +1818,13 @@ WebInspector._copy = function(event)
 
 WebInspector._increaseZoom = function(event) {
     let currentZoom = InspectorFrontendHost.zoomFactor();
-    InspectorFrontendHost.setZoomFactor(currentZoom * 1.2);
+    InspectorFrontendHost.setZoomFactor(currentZoom + 0.2);
     event.preventDefault();
 };
 
 WebInspector._decreaseZoom = function(event) {
     let currentZoom = InspectorFrontendHost.zoomFactor();
-    InspectorFrontendHost.setZoomFactor(currentZoom * 0.8);
+    InspectorFrontendHost.setZoomFactor(currentZoom - 0.2);
     event.preventDefault();
 };