Changeset 257873 in webkit


Ignore:
Timestamp:
Mar 4, 2020 12:47:22 PM (4 years ago)
Author:
Devin Rousso
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):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r257871 r257873  
     12020-03-04  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: the execution context picker is shown on pages with only one execution context if there are internal execution contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=208502
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Views/QuickConsole.js:
     9        (WI.QuickConsole.prototype._updateActiveExecutionContextDisplay):
     10        (WI.QuickConsole.prototype._handleEngineeringShowInternalExecutionContextsSettingChanged):
     11
    1122020-03-04  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js

    r257759 r257873  
    200200        }
    201201
    202         if (WI.networkManager.frames.length === 1 && WI.networkManager.mainFrame.executionContextList.contexts.length === 1 && !WI.targetManager.workerTargets.length) {
    203             toggleHidden(true);
    204             return;
     202        if (WI.networkManager.frames.length === 1 && !WI.targetManager.workerTargets.length) {
     203            let mainFrameContexts = WI.networkManager.mainFrame.executionContextList.contexts;
     204            let contextsToShow = mainFrameContexts.filter((context) => context.type !== WI.ExecutionContext.Type.Internal || WI.settings.engineeringShowInternalExecutionContexts.value);
     205            if (contextsToShow.length <= 1) {
     206                toggleHidden(true);
     207                return;
     208            }
    205209        }
    206210
     
    336340    _handleEngineeringShowInternalExecutionContextsSettingChanged(event)
    337341    {
     342        this._updateActiveExecutionContextDisplay();
     343
    338344        if (WI.runtimeManager.activeExecutionContext.type !== WI.ExecutionContext.Type.Internal)
    339345            return;
Note: See TracChangeset for help on using the changeset viewer.