REGRESSION(r214494): Web Inspector: Ignore cache button does not work in Network tab
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 16:03:09 +0000 (16:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 16:03:09 +0000 (16:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177114
<rdar://problem/34505265>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-19
Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WI.loaded):
We need to register the settings change handler regardless of what the
initial value of the setting is.

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

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

index 613ea4b..66b1cb0 100644 (file)
@@ -1,3 +1,16 @@
+2017-09-19  Joseph Pecoraro  <pecoraro@apple.com>
+
+        REGRESSION(r214494): Web Inspector: Ignore cache button does not work in Network tab
+        https://bugs.webkit.org/show_bug.cgi?id=177114
+        <rdar://problem/34505265>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Base/Main.js:
+        (WI.loaded):
+        We need to register the settings change handler regardless of what the
+        initial value of the setting is.
+
 2017-09-18  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: RemoteObject.resolveNode should return a Promise
index 13ca7a2..5d422f9 100644 (file)
@@ -183,8 +183,9 @@ WI.loaded = function()
 
     // COMPATIBILITY (iOS 10.3): Network.setDisableResourceCaching did not exist.
     this.resourceCachingDisabledSetting = new WI.Setting("disable-resource-caching", false);
-    if (window.NetworkAgent && NetworkAgent.setResourceCachingDisabled && this.resourceCachingDisabledSetting.value) {
-        NetworkAgent.setResourceCachingDisabled(true);
+    if (window.NetworkAgent && NetworkAgent.setResourceCachingDisabled) {
+        if (this.resourceCachingDisabledSetting.value)
+            NetworkAgent.setResourceCachingDisabled(true);
         this.resourceCachingDisabledSetting.addEventListener(WI.Setting.Event.Changed, this._resourceCachingDisabledSettingChanged, this);
     }