From e532ab6dab22e97b5da70b7dbb7bec4c624d1b52 Mon Sep 17 00:00:00 2001 From: "timothy@apple.com" Date: Wed, 28 Oct 2015 22:50:47 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191697 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebInspectorUI/ChangeLog | 14 ++++++++++++++ Source/WebInspectorUI/UserInterface/Base/Main.js | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog index 4ebd897..49a6d77 100644 --- a/Source/WebInspectorUI/ChangeLog +++ b/Source/WebInspectorUI/ChangeLog @@ -1,3 +1,17 @@ +2015-10-28 Timothy Hatcher + + 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 Web Inspector: Rendering Frames pie chart does not update during initial selection of a timeline range diff --git a/Source/WebInspectorUI/UserInterface/Base/Main.js b/Source/WebInspectorUI/UserInterface/Base/Main.js index 1c5b15e..2997d0b 100644 --- a/Source/WebInspectorUI/UserInterface/Base/Main.js +++ b/Source/WebInspectorUI/UserInterface/Base/Main.js @@ -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(); }; -- 1.8.3.1