Title: [257873] trunk/Source/WebInspectorUI
Revision
257873
Author
drou...@apple.com
Date
2020-03-04 12:47:22 -0800 (Wed, 04 Mar 2020)

Log Message

Web Inspector: the execution context picker is shown on pages with only one execution context if there are internal execution contexts
https://bugs.webkit.org/show_bug.cgi?id=208502

Reviewed by Timothy Hatcher.

* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._updateActiveExecutionContextDisplay):
(WI.QuickConsole.prototype._handleEngineeringShowInternalExecutionContextsSettingChanged):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (257872 => 257873)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-03-04 20:35:46 UTC (rev 257872)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-03-04 20:47:22 UTC (rev 257873)
@@ -1,5 +1,16 @@
 2020-03-04  Devin Rousso  <drou...@apple.com>
 
+        Web Inspector: the execution context picker is shown on pages with only one execution context if there are internal execution contexts
+        https://bugs.webkit.org/show_bug.cgi?id=208502
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/QuickConsole.js:
+        (WI.QuickConsole.prototype._updateActiveExecutionContextDisplay):
+        (WI.QuickConsole.prototype._handleEngineeringShowInternalExecutionContextsSettingChanged):
+
+2020-03-04  Devin Rousso  <drou...@apple.com>
+
         Web Inspector: REGRESSION(?): Elements: unable to edit a tag name more than once
         https://bugs.webkit.org/show_bug.cgi?id=208586
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js (257872 => 257873)


--- trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js	2020-03-04 20:35:46 UTC (rev 257872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js	2020-03-04 20:47:22 UTC (rev 257873)
@@ -199,9 +199,13 @@
             return;
         }
 
-        if (WI.networkManager.frames.length === 1 && WI.networkManager.mainFrame.executionContextList.contexts.length === 1 && !WI.targetManager.workerTargets.length) {
-            toggleHidden(true);
-            return;
+        if (WI.networkManager.frames.length === 1 && !WI.targetManager.workerTargets.length) {
+            let mainFrameContexts = WI.networkManager.mainFrame.executionContextList.contexts;
+            let contextsToShow = mainFrameContexts.filter((context) => context.type !== WI.ExecutionContext.Type.Internal || WI.settings.engineeringShowInternalExecutionContexts.value);
+            if (contextsToShow.length <= 1) {
+                toggleHidden(true);
+                return;
+            }
         }
 
         const maxLength = 40;
@@ -335,6 +339,8 @@
 
     _handleEngineeringShowInternalExecutionContextsSettingChanged(event)
     {
+        this._updateActiveExecutionContextDisplay();
+
         if (WI.runtimeManager.activeExecutionContext.type !== WI.ExecutionContext.Type.Internal)
             return;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to