Title: [254727] trunk/Source/WebInspectorUI
Revision
254727
Author
[email protected]
Date
2020-01-16 17:14:40 -0800 (Thu, 16 Jan 2020)

Log Message

Web Inspector: show the device settings menu when Web Inspector's debug mode is enabled
https://bugs.webkit.org/show_bug.cgi?id=206311

Reviewed by Brian Burg.

This only has an effect when Web Inspector is opened and the debug mode is enabled. If so,
the device settings toolbar icon will appear regardless of whether the inspected target is
a remote device or not. Disabling debug mode will not immediately remove the device settings
toolbar icon, but it will not reappear when Web Inspector is next opened (to allow for taking
screenshots and other such things).

* UserInterface/Base/Main.js:
(WI.contentLoaded):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (254726 => 254727)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-01-17 01:08:21 UTC (rev 254726)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-01-17 01:14:40 UTC (rev 254727)
@@ -1,3 +1,19 @@
+2020-01-16  Devin Rousso  <[email protected]>
+
+        Web Inspector: show the device settings menu when Web Inspector's debug mode is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=206311
+
+        Reviewed by Brian Burg.
+
+        This only has an effect when Web Inspector is opened and the debug mode is enabled. If so,
+        the device settings toolbar icon will appear regardless of whether the inspected target is
+        a remote device or not. Disabling debug mode will not immediately remove the device settings
+        toolbar icon, but it will not reappear when Web Inspector is next opened (to allow for taking
+        screenshots and other such things).
+
+        * UserInterface/Base/Main.js:
+        (WI.contentLoaded):
+
 2020-01-16  Nikita Vasilyev  <[email protected]>
 
         REGRESSION(r251487): Web Inspector: selected color in color picker has wrong lightness

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (254726 => 254727)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2020-01-17 01:08:21 UTC (rev 254726)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2020-01-17 01:14:40 UTC (rev 254727)
@@ -400,7 +400,7 @@
     WI._inspectModeToolbarButton.addEventListener(WI.ButtonNavigationItem.Event.Clicked, WI._toggleInspectMode);
 
     // COMPATIBILITY (iOS 12.2): Page.overrideSetting did not exist.
-    if (InspectorFrontendHost.isRemote && InspectorBackend.hasCommand("Page.overrideUserAgent") && InspectorBackend.hasCommand("Page.overrideSetting")) {
+    if ((InspectorFrontendHost.isRemote || WI.isDebugUIEnabled()) && InspectorBackend.hasCommand("Page.overrideUserAgent") && InspectorBackend.hasCommand("Page.overrideSetting")) {
         const deviceSettingsTooltip = WI.UIString("Device Settings");
         WI._deviceSettingsToolbarButton = new WI.ActivateButtonToolbarItem("device-settings", deviceSettingsTooltip, deviceSettingsTooltip, "Images/Device.svg");
         WI._deviceSettingsToolbarButton.addEventListener(WI.ButtonNavigationItem.Event.Clicked, WI._handleDeviceSettingsToolbarButtonClicked);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to