Web Inspector: Zoom level UI out of sync with setting value
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 22:47:23 +0000 (22:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 22:47:23 +0000 (22:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=168522

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-02-17
Reviewed by Brian Burg.

* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView):
Trigger a layout whenever the zoomFactor setting is changed. This is needed since the
zoomFactor setting can also be modified by global keyboard shortcuts.

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

index 879b7c0..8c68d43 100644 (file)
@@ -1,3 +1,15 @@
+2017-02-17  Devin Rousso  <dcrousso+webkit@gmail.com>
+
+        Web Inspector: Zoom level UI out of sync with setting value
+        https://bugs.webkit.org/show_bug.cgi?id=168522
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WebInspector.SettingsTabContentView):
+        Trigger a layout whenever the zoomFactor setting is changed. This is needed since the
+        zoomFactor setting can also be modified by global keyboard shortcuts.
+
 2017-02-17  Brian Burg  <bburg@apple.com>
 
         Web Inspector: Loc: Zoom level in Settings tab needs to use localized formatting
index af0fc6d..09ab4cb 100644 (file)
@@ -35,7 +35,9 @@ WebInspector.SettingsTabContentView = class SettingsTabContentView extends WebIn
         // Ensures that the Settings tab is displayable from a pinned tab bar item.
         tabBarItem.representedObject = this;
 
-        WebInspector.notifications.addEventListener(WebInspector.Notification.DebugUIEnabledDidChange, this.needsLayout.bind(this, WebInspector.View.LayoutReason.Dirty));
+        let boundNeedsLayout = this.needsLayout.bind(this, WebInspector.View.LayoutReason.Dirty);
+        WebInspector.notifications.addEventListener(WebInspector.Notification.DebugUIEnabledDidChange, boundNeedsLayout);
+        WebInspector.settings.zoomFactor.addEventListener(WebInspector.Setting.Event.Changed, boundNeedsLayout);
     }
 
     static tabInfo()