Changeset 248391 in webkit


Ignore:
Timestamp:
Aug 7, 2019 2:49:08 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Settings: add an Engineering pane to expose useful settings for other WebKit engineers
https://bugs.webkit.org/show_bug.cgi?id=200492

Reviewed by Joseph Pecoraro.

Other WebKit engineers might find being able to see internal objects or pause in internal
scripts useful, so we should allow them to do so without having to enable Web Inspector's
debug "mode".

A new "Engineering" pane is added to the Settings Tab:

  • Debugging
    • Show WebKit-internal scripts
    • Pause in WebKit-internal scripts
  • Heap Snapshot
    • Show Internal Objects
    • Show Private Symbols
  • UserInterface/Base/Setting.js:
  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype.initialLayout):
(WI.SettingsTabContentView.prototype._createEngineeringSettingsView): Added.
(WI.SettingsTabContentView.prototype._createDebugSettingsView):

  • UserInterface/Base/Main.js:

(WI.resolvedLayoutDirection):
(WI.setLayoutDirection):

  • UserInterface/Base/Object.js:
  • UserInterface/Protocol/InspectorBackend.js:

(InspectorBackendClass):
(InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.set dumpInspectorTimeStats):
(InspectorBackendClass.prototype.get dumpInspectorTimeStats):
(InspectorBackendClass.prototype.set filterMultiplexingBackendInspectorProtocolMessages):
(InspectorBackendClass.prototype.get filterMultiplexingBackendInspectorProtocolMessages):

  • UserInterface/Protocol/RemoteObject.js:

(WI.RemoteObject.prototype.findFunctionSourceCodeLocation):

  • UserInterface/Debug/Bootstrap.js:

(WI.runBootstrapOperations):

  • UserInterface/Debug/UncaughtExceptionReporter.js:

(handleUncaughtExceptionRecord):

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype._updateOwnerStyleText):

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration.prototype.update):

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager):
(WI.DebuggerManager.prototype.initializeTarget):
(WI.DebuggerManager.prototype.get knownNonResourceScripts):
(WI.DebuggerManager.prototype.debuggerDidPause):
(WI.DebuggerManager.prototype.scriptDidParse):
(WI.DebuggerManager.prototype._handleEngineeringShowInternalScriptsSettingChanged): Added.
(WI.DebuggerManager.prototype._handleEngineeringPauseForInternalScriptsSettingChanged): Added.
(WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange): Deleted.
(WI.DebuggerManager.prototype._debugUIEnabledDidChange): Deleted.

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype._appendLocationLink):

  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):

  • UserInterface/Views/OpenResourceDialog.js:

(WI.OpenResourceDialog.prototype._addScriptsForTarget):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor):

  • UserInterface/Views/StackTraceView.js:

(WI.StackTraceView):

  • UserInterface/Views/View.js:

(WI.View.prototype._layoutSubtree):

Location:
trunk/Source/WebInspectorUI
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r248390 r248391  
     12019-08-07  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Settings: add an Engineering pane to expose useful settings for other WebKit engineers
     4        https://bugs.webkit.org/show_bug.cgi?id=200492
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        Other WebKit engineers might find being able to see internal objects or pause in internal
     9        scripts useful, so we should allow them to do so without having to enable Web Inspector's
     10        debug "mode".
     11
     12        A new "Engineering" pane is added to the Settings Tab:
     13         - Debugging
     14            - Show WebKit-internal scripts
     15            - Pause in WebKit-internal scripts
     16         - Heap Snapshot
     17            - Show Internal Objects
     18            - Show Private Symbols
     19
     20        * UserInterface/Base/Setting.js:
     21        * UserInterface/Views/SettingsTabContentView.js:
     22        (WI.SettingsTabContentView.prototype.initialLayout):
     23        (WI.SettingsTabContentView.prototype._createEngineeringSettingsView): Added.
     24        (WI.SettingsTabContentView.prototype._createDebugSettingsView):
     25
     26        * UserInterface/Base/Main.js:
     27        (WI.resolvedLayoutDirection):
     28        (WI.setLayoutDirection):
     29        * UserInterface/Base/Object.js:
     30
     31        * UserInterface/Protocol/InspectorBackend.js:
     32        (InspectorBackendClass):
     33        (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
     34        (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
     35        (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
     36        (InspectorBackendClass.prototype.get dumpInspectorTimeStats):
     37        (InspectorBackendClass.prototype.set filterMultiplexingBackendInspectorProtocolMessages):
     38        (InspectorBackendClass.prototype.get filterMultiplexingBackendInspectorProtocolMessages):
     39        * UserInterface/Protocol/RemoteObject.js:
     40        (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
     41        * UserInterface/Debug/Bootstrap.js:
     42        (WI.runBootstrapOperations):
     43        * UserInterface/Debug/UncaughtExceptionReporter.js:
     44        (handleUncaughtExceptionRecord):
     45        * UserInterface/Models/CSSProperty.js:
     46        (WI.CSSProperty.prototype._updateOwnerStyleText):
     47        * UserInterface/Models/CSSStyleDeclaration.js:
     48        (WI.CSSStyleDeclaration.prototype.update):
     49        * UserInterface/Controllers/DebuggerManager.js:
     50        (WI.DebuggerManager):
     51        (WI.DebuggerManager.prototype.initializeTarget):
     52        (WI.DebuggerManager.prototype.get knownNonResourceScripts):
     53        (WI.DebuggerManager.prototype.debuggerDidPause):
     54        (WI.DebuggerManager.prototype.scriptDidParse):
     55        (WI.DebuggerManager.prototype._handleEngineeringShowInternalScriptsSettingChanged): Added.
     56        (WI.DebuggerManager.prototype._handleEngineeringPauseForInternalScriptsSettingChanged): Added.
     57        (WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange): Deleted.
     58        (WI.DebuggerManager.prototype._debugUIEnabledDidChange): Deleted.
     59        * UserInterface/Views/ConsoleMessageView.js:
     60        (WI.ConsoleMessageView.prototype._appendLocationLink):
     61        * UserInterface/Views/HeapSnapshotDataGridTree.js:
     62        (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
     63        * UserInterface/Views/OpenResourceDialog.js:
     64        (WI.OpenResourceDialog.prototype._addScriptsForTarget):
     65        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
     66        (WI.SpreadsheetCSSStyleDeclarationEditor):
     67        * UserInterface/Views/StackTraceView.js:
     68        (WI.StackTraceView):
     69        * UserInterface/Views/View.js:
     70        (WI.View.prototype._layoutSubtree):
     71
    1722019-08-07  Nikita Vasilyev  <nvasilyev@apple.com>
    273
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r248287 r248391  
    27042704WI.resolvedLayoutDirection = function()
    27052705{
    2706     let layoutDirection = WI.settings.layoutDirection.value;
    2707     if (layoutDirection === WI.LayoutDirection.System)
     2706    let layoutDirection = WI.settings.debugLayoutDirection.value;
     2707    if (!WI.isDebugUIEnabled() || layoutDirection === WI.LayoutDirection.System)
    27082708        layoutDirection = InspectorFrontendHost.userInterfaceLayoutDirection();
    2709 
    27102709    return layoutDirection;
    27112710};
     
    27132712WI.setLayoutDirection = function(value)
    27142713{
     2714    console.assert(WI.isDebugUIEnabled());
     2715
    27152716    if (!Object.values(WI.LayoutDirection).includes(value))
    27162717        WI.reportInternalError("Unknown layout direction requested: " + value);
    27172718
    2718     if (value === WI.settings.layoutDirection.value)
    2719         return;
    2720 
    2721     WI.settings.layoutDirection.value = value;
     2719    if (value === WI.settings.debugLayoutDirection.value)
     2720        return;
     2721
     2722    WI.settings.debugLayoutDirection.value = value;
    27222723
    27232724    if (WI.resolvedLayoutDirection() === WI.LayoutDirection.RTL && WI._dockConfiguration === WI.DockConfiguration.Right)
  • trunk/Source/WebInspectorUI/UserInterface/Base/Object.js

    r240952 r248391  
    219219    PageArchiveEnded: "page-archive-ended",
    220220    ExtraDomainsActivated: "extra-domains-activated",
    221     DebugUIEnabledDidChange: "debug-ui-enabled-did-change",
    222221    VisibilityStateDidChange: "visibility-state-did-change",
    223222    TransitionPageTarget: "transition-page-target",
  • trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js

    r248287 r248391  
    188188    experimentalEnableStylesJumpToEffective: new WI.Setting("experimental-styles-jump-to-effective", false),
    189189
    190     // DebugUI
    191     autoLogProtocolMessages: new WI.Setting("auto-collect-protocol-messages", false),
    192     autoLogTimeStats: new WI.Setting("auto-collect-time-stats", false),
    193     enableLayoutFlashing: new WI.Setting("enable-layout-flashing", false),
    194     enableStyleEditingDebugMode: new WI.Setting("enable-style-editing-debug-mode", false),
    195     enableUncaughtExceptionReporter: new WI.Setting("enable-uncaught-exception-reporter", true),
    196     filterMultiplexingBackendInspectorProtocolMessages: new WI.Setting("filter-multiplexing-backend-inspector-protocol-messages", true),
    197     layoutDirection: new WI.Setting("layout-direction-override", "system"),
    198     pauseForInternalScripts: new WI.Setting("pause-for-internal-scripts", false),
    199     debugShowInternalObjectsInHeapSnapshot: new WI.Setting("debug-show-internal-objects-in-heap-snapshot", false),
     190    // Protocol
     191    protocolAutoLogMessages: new WI.Setting("protocol-auto-log-messages", false),
     192    protocolAutoLogTimeStats: new WI.Setting("protocol-auto-log-time-stats", false),
     193    protocolFilterMultiplexingBackendMessages: new WI.Setting("protocol-filter-multiplexing-backend-messages", true),
     194
     195    // Engineering
     196    engineeringShowInternalScripts: new WI.Setting("engineering-show-internal-scripts", false),
     197    engineeringPauseForInternalScripts: new WI.Setting("engineering-pause-for-internal-scripts", false),
     198    engineeringShowInternalObjectsInHeapSnapshot: new WI.Setting("engineering-show-internal-objects-in-heap-snapshot", false),
     199    engineeringShowPrivateSymbolsInHeapSnapshot: new WI.Setting("engineering-show-private-symbols-in-heap-snapshot", false),
     200
     201    // Debug
     202    debugShowConsoleEvaluations: new WI.Setting("debug-show-console-evaluations", false),
     203    debugEnableLayoutFlashing: new WI.Setting("debug-enable-layout-flashing", false),
     204    debugEnableStyleEditingDebugMode: new WI.Setting("debug-enable-style-editing-debug-mode", false),
     205    debugEnableUncaughtExceptionReporter: new WI.Setting("debug-enable-uncaught-exception-reporter", true),
     206    debugLayoutDirection: new WI.Setting("debug-layout-direction-override", "system"),
    200207};
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js

    r248201 r248391  
    3030        super();
    3131
    32         WI.notifications.addEventListener(WI.Notification.DebugUIEnabledDidChange, this._debugUIEnabledDidChange, this);
    33 
    3432        WI.Breakpoint.addEventListener(WI.Breakpoint.Event.DisplayLocationDidChange, this._breakpointDisplayLocationDidChange, this);
    3533        WI.Breakpoint.addEventListener(WI.Breakpoint.Event.DisabledStateDidChange, this._breakpointDisabledStateDidChange, this);
     
    4644        WI.targetManager.addEventListener(WI.TargetManager.Event.TargetRemoved, this._targetRemoved, this);
    4745
    48         WI.settings.pauseForInternalScripts.addEventListener(WI.Setting.Event.Changed, this._pauseForInternalScriptsDidChange, this);
     46        if (WI.isEngineeringBuild) {
     47            WI.settings.engineeringShowInternalScripts.addEventListener(WI.Setting.Event.Changed, this._handleEngineeringShowInternalScriptsSettingChanged, this);
     48            WI.settings.engineeringPauseForInternalScripts.addEventListener(WI.Setting.Event.Changed, this._handleEngineeringPauseForInternalScriptsSettingChanged, this);
     49        }
    4950
    5051        WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
     
    147148            target.DebuggerAgent.setAsyncStackTraceDepth(this._asyncStackTraceDepthSetting.value);
    148149
    149         // COMPATIBILITY (iOS 12): DebuggerAgent.setPauseForInternalScripts did not exist yet.
    150         if (target.DebuggerAgent.setPauseForInternalScripts)
    151             target.DebuggerAgent.setPauseForInternalScripts(WI.settings.pauseForInternalScripts.value);
     150        if (WI.isEngineeringBuild) {
     151            // COMPATIBILITY (iOS 12): DebuggerAgent.setPauseForInternalScripts did not exist yet.
     152            if (target.DebuggerAgent.setPauseForInternalScripts)
     153                target.DebuggerAgent.setPauseForInternalScripts(WI.settings.engineeringPauseForInternalScripts.value);
     154        }
    152155
    153156        if (this.paused)
     
    320323        let knownScripts = [];
    321324
    322         for (let [target, targetData] of this._targetDebuggerDataMap) {
     325        for (let targetData of this._targetDebuggerDataMap.values()) {
    323326            for (let script of targetData.scripts) {
    324327                if (script.resource)
    325328                    continue;
    326                 if (isWebInspectorConsoleEvaluationScript(script.sourceURL))
     329                if ((!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value) && isWebInspectorConsoleEvaluationScript(script.sourceURL))
    327330                    continue;
    328                 if (!WI.isDebugUIEnabled() && isWebKitInternalScript(script.sourceURL))
     331                if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(script.sourceURL))
    329332                    continue;
    330333                knownScripts.push(script);
     
    622625
    623626            // Exclude the case where the call frame is in the inspector code.
    624             if (!WI.isDebugUIEnabled() && isWebKitInternalScript(sourceCodeLocation.sourceCode.sourceURL))
     627            if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(sourceCodeLocation.sourceCode.sourceURL))
    625628                continue;
    626629
     
    711714        }
    712715
    713         if (!WI.isDebugUIEnabled() && isWebKitInternalScript(sourceURL))
     716        if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(sourceURL))
    714717            return;
    715718
     
    741744        if (isWebKitInternalScript(script.sourceURL)) {
    742745            this._internalWebKitScripts.push(script);
    743             if (!WI.isDebugUIEnabled())
     746            if (!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value)
    744747                return;
    745748        }
    746749
    747         // Console expressions are not added to the UI by default.
    748         if (isWebInspectorConsoleEvaluationScript(script.sourceURL))
     750        if ((!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value) && isWebInspectorConsoleEvaluationScript(script.sourceURL))
    749751            return;
    750752
     
    11921194    }
    11931195
    1194     _pauseForInternalScriptsDidChange(event)
     1196    _handleEngineeringShowInternalScriptsSettingChanged(event)
     1197    {
     1198        let eventType = WI.settings.engineeringShowInternalScripts.value ? WI.DebuggerManager.Event.ScriptAdded : WI.DebuggerManager.Event.ScriptRemoved;
     1199        for (let script of this._internalWebKitScripts)
     1200            this.dispatchEventToListeners(eventType, {script});
     1201    }
     1202
     1203    _handleEngineeringPauseForInternalScriptsSettingChanged(event)
    11951204    {
    11961205        for (let target of WI.targets) {
    11971206            if (target.DebuggerAgent.setPauseForInternalScripts)
    1198                 target.DebuggerAgent.setPauseForInternalScripts(WI.settings.pauseForInternalScripts.value);
     1207                target.DebuggerAgent.setPauseForInternalScripts(WI.settings.engineeringPauseForInternalScripts.value);
    11991208        }
    12001209    }
     
    13561365        }
    13571366        return probeSet;
    1358     }
    1359 
    1360     _debugUIEnabledDidChange()
    1361     {
    1362         let eventType = WI.isDebugUIEnabled() ? WI.DebuggerManager.Event.ScriptAdded : WI.DebuggerManager.Event.ScriptRemoved;
    1363         for (let script of this._internalWebKitScripts)
    1364             this.dispatchEventToListeners(eventType, {script});
    13651367    }
    13661368};
  • trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js

    r242410 r248391  
    2525
    2626WI.isEngineeringBuild = true;
     27
     28// Disable Pause in Internal Scripts if Show Internal Scripts is dibbled.
     29WI.settings.engineeringShowInternalScripts.addEventListener(WI.Setting.Event.Changed, (event) => {
     30    if (!WI.settings.engineeringShowInternalScripts.value)
     31        WI.settings.engineeringPauseForInternalScripts.value = false;
     32}, WI.settings.engineeringPauseForInternalScripts);
     33
     34// Enable Show Internal Scripts if Pause in Internal Scripts is enabled.
     35WI.settings.engineeringPauseForInternalScripts.addEventListener(WI.Setting.Event.Changed, (event) => {
     36    if (WI.settings.engineeringPauseForInternalScripts.value)
     37        WI.settings.engineeringShowInternalScripts.value = true;
     38}, WI.settings.engineeringShowInternalScripts);
    2739
    2840// This function is invoked after the inspector has loaded and has a backend target.
     
    96108        applyDumpMessagesState(nextState);
    97109    });
    98     WI.settings.autoLogProtocolMessages.addEventListener(WI.Setting.Event.Changed, () => {
     110    WI.settings.protocolAutoLogMessages.addEventListener(WI.Setting.Event.Changed, () => {
    99111        if (ignoreChangesToState)
    100112            return;
     
    120132    WI.showDebugUISetting.addEventListener(WI.Setting.Event.Changed, () => {
    121133        updateDebugUI();
    122         WI.notifications.dispatchEventToListeners(WI.Notification.DebugUIEnabledDidChange);
    123134    });
    124135
  • trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js

    r240647 r248391  
    9595function handleUncaughtExceptionRecord(exceptionRecord) {
    9696    try {
    97         if (!WI.settings.enableUncaughtExceptionReporter.value)
     97        if (WI.isDebugUIEnabled() && !WI.settings.debugEnableUncaughtExceptionReporter.value)
    9898            return;
    9999    } catch { }
  • trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js

    r248328 r248391  
    464464        console.assert(oldText === styleText.slice(range.startOffset, range.endOffset), "_styleSheetTextRange data is invalid.");
    465465
    466         if (WI.settings.enableStyleEditingDebugMode.value) {
     466        if (WI.isDebugUIEnabled() && WI.settings.debugEnableStyleEditingDebugMode.value) {
    467467            let prefix = styleText.slice(0, range.startOffset);
    468468            let postfix = styleText.slice(range.endOffset);
  • trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js

    r248327 r248391  
    125125        //                                  update only happens here
    126126        if (this._updatesInProgressCount > 0 && !options.forceUpdate) {
    127             if (WI.settings.enableStyleEditingDebugMode.value && text !== this._text)
     127            if (WI.isDebugUIEnabled() && WI.settings.debugEnableStyleEditingDebugMode.value && text !== this._text)
    128128                console.warn("Style modified while editing:", text);
    129129
  • trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js

    r242606 r248391  
    4646            this._supportedDomainsForDebuggableType.set(debuggableType, []);
    4747
    48         WI.settings.autoLogProtocolMessages.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
    49         WI.settings.autoLogTimeStats.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
     48        WI.settings.protocolAutoLogMessages.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
     49        WI.settings.protocolAutoLogTimeStats.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
    5050        this._startOrStopAutomaticTracing();
    5151
     
    7272    {
    7373        // Implicitly cause automatic logging to start if it's allowed.
    74         WI.settings.autoLogProtocolMessages.value = value;
     74        WI.settings.protocolAutoLogMessages.value = value;
    7575
    7676        this._defaultTracer.dumpMessagesToConsole = value;
     
    7979    get dumpInspectorProtocolMessages()
    8080    {
    81         return WI.settings.autoLogProtocolMessages.value;
     81        return WI.settings.protocolAutoLogMessages.value;
    8282    }
    8383
    8484    set dumpInspectorTimeStats(value)
    8585    {
    86         WI.settings.autoLogTimeStats.value = value;
     86        WI.settings.protocolAutoLogTimeStats.value = value;
    8787
    8888        if (!this.dumpInspectorProtocolMessages)
     
    9494    get dumpInspectorTimeStats()
    9595    {
    96         return WI.settings.autoLogTimeStats.value;
     96        return WI.settings.protocolAutoLogTimeStats.value;
    9797    }
    9898
    9999    set filterMultiplexingBackendInspectorProtocolMessages(value)
    100100    {
    101         WI.settings.filterMultiplexingBackendInspectorProtocolMessages.value = value;
     101        WI.settings.protocolFilterMultiplexingBackendMessages.value = value;
    102102
    103103        this._defaultTracer.filterMultiplexingBackend = value;
     
    106106    get filterMultiplexingBackendInspectorProtocolMessages()
    107107    {
    108         return WI.settings.filterMultiplexingBackendInspectorProtocolMessages.value;
     108        return WI.settings.protocolFilterMultiplexingBackendMessages.value;
    109109    }
    110110
  • trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js

    r246046 r248391  
    618618            var sourceCode = WI.debuggerManager.scriptForIdentifier(location.scriptId, this._target);
    619619
    620             if (!sourceCode || (!WI.isDebugUIEnabled() && isWebKitInternalScript(sourceCode.sourceURL))) {
     620            if (!sourceCode || ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(sourceCode.sourceURL))) {
    621621                result.resolve(WI.RemoteObject.SourceCodeLocationPromise.NoSourceFound);
    622622                return;
  • trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotEdgeProxy.js

    r220119 r248391  
    4545    isPrivateSymbol()
    4646    {
    47         if (WI.isDebugUIEnabled())
     47        if (WI.isEngineeringBuild && WI.settings.engineeringShowPrivateSymbolsInHeapSnapshot.value)
    4848            return false;
    4949
  • trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js

    r248287 r248391  
    403403        }
    404404
    405         if (callFrame && (!callFrame.isConsoleEvaluation || WI.isDebugUIEnabled())) {
     405        if (callFrame && (!callFrame.isConsoleEvaluation || (WI.isDebugUIEnabled() && WI.settings.debugShowConsoleEvaluations.value))) {
    406406            const showFunctionName = !!callFrame.functionName;
    407407            var locationElement = new WI.CallFrameView(callFrame, showFunctionName);
  • trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js

    r241787 r248391  
    217217    {
    218218        // Populate the first level with the different classes.
    219         let skipInternalOnlyObjects = !WI.settings.debugShowInternalObjectsInHeapSnapshot.value;
     219        let skipInternalOnlyObjects = !WI.isEngineeringBuild || !WI.settings.engineeringShowInternalObjectsInHeapSnapshot.value;
    220220
    221221        for (let [className, {size, retainedSize, count, internalCount, deadCount, objectCount}] of this.heapSnapshot.categories) {
  • trunk/Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js

    r244363 r248391  
    328328            if (script.dynamicallyAddedScriptElement)
    329329                continue;
    330             if (isWebKitInternalScript(script.sourceURL) || isWebInspectorConsoleEvaluationScript(script.sourceURL))
     330            if ((!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value) || isWebInspectorConsoleEvaluationScript(script.sourceURL))
     331                continue;
     332            if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(script.sourceURL))
    331333                continue;
    332334            this._addResource(script, suppressFilterUpdate);
  • trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

    r248287 r248391  
    168168        this._createExperimentalSettingsView();
    169169
    170         WI.notifications.addEventListener(WI.Notification.DebugUIEnabledDidChange, this._updateDebugSettingsViewVisibility, this);
     170        if (WI.isEngineeringBuild)
     171            this._createEngineeringSettingsView();
     172
     173        WI.showDebugUISetting.addEventListener(WI.Setting.Event.Changed, this._updateDebugSettingsViewVisibility, this);
    171174        this._updateDebugSettingsViewVisibility();
    172175
     
    375378    }
    376379
     380    _createEngineeringSettingsView()
     381    {
     382        // These settings are only ever shown in engineering builds, so the strings are unlocalized.
     383
     384        let engineeringSettingsView = new WI.SettingsView("engineering", WI.unlocalizedString("Engineering"));
     385
     386        let debuggingGroup = engineeringSettingsView.addGroup(WI.unlocalizedString("Debugging:"));
     387        debuggingGroup.addSetting(WI.settings.engineeringShowInternalScripts, WI.unlocalizedString("Show WebKit-internal scripts"));
     388        debuggingGroup.addSetting(WI.settings.engineeringPauseForInternalScripts, WI.unlocalizedString("Pause in WebKit-internal scripts"));
     389
     390        engineeringSettingsView.addSeparator();
     391
     392        let heapSnapshotGroup = engineeringSettingsView.addGroup(WI.unlocalizedString("Heap Snapshot:"));
     393        heapSnapshotGroup.addSetting(WI.settings.engineeringShowInternalObjectsInHeapSnapshot, WI.unlocalizedString("Show Internal Objects"));
     394        heapSnapshotGroup.addSetting(WI.settings.engineeringShowPrivateSymbolsInHeapSnapshot, WI.unlocalizedString("Show Private Symbols"));
     395
     396        this.addSettingsView(engineeringSettingsView);
     397    }
     398
    377399    _createDebugSettingsView()
    378400    {
     
    386408        let protocolMessagesGroup = this._debugSettingsView.addGroup(WI.unlocalizedString("Protocol Logging:"));
    387409
    388         let autoLogProtocolMessagesEditor = protocolMessagesGroup.addSetting(WI.settings.autoLogProtocolMessages, WI.unlocalizedString("Messages"));
    389         WI.settings.autoLogProtocolMessages.addEventListener(WI.Setting.Event.Changed, () => {
    390             autoLogProtocolMessagesEditor.value = InspectorBackend.dumpInspectorProtocolMessages;
     410        let protocolAutoLogMessagesEditor = protocolMessagesGroup.addSetting(WI.settings.protocolAutoLogMessages, WI.unlocalizedString("Messages"));
     411        WI.settings.protocolAutoLogMessages.addEventListener(WI.Setting.Event.Changed, () => {
     412            protocolAutoLogMessagesEditor.value = InspectorBackend.dumpInspectorProtocolMessages;
    391413        });
    392414
    393         protocolMessagesGroup.addSetting(WI.settings.autoLogTimeStats, WI.unlocalizedString("Time Stats"));
     415        protocolMessagesGroup.addSetting(WI.settings.protocolAutoLogTimeStats, WI.unlocalizedString("Time Stats"));
    394416
    395417        this._debugSettingsView.addSeparator();
    396418
    397         this._debugSettingsView.addSetting(WI.unlocalizedString("Layout Flashing:"), WI.settings.enableLayoutFlashing, WI.unlocalizedString("Draw borders when a view performs a layout"));
     419        this._debugSettingsView.addSetting(WI.unlocalizedString("Debugging:"), WI.settings.debugShowConsoleEvaluations, WI.unlocalizedString("Show Console Evaluations"));
    398420
    399421        this._debugSettingsView.addSeparator();
    400422
    401         this._debugSettingsView.addSetting(WI.unlocalizedString("Styles:"), WI.settings.enableStyleEditingDebugMode, WI.unlocalizedString("Enable style editing debug mode"));
     423        this._debugSettingsView.addSetting(WI.unlocalizedString("Layout Flashing:"), WI.settings.debugEnableLayoutFlashing, WI.unlocalizedString("Draw borders when a view performs a layout"));
    402424
    403425        this._debugSettingsView.addSeparator();
    404426
    405         this._debugSettingsView.addSetting(WI.unlocalizedString("Heap Snapshot:"), WI.settings.debugShowInternalObjectsInHeapSnapshot, WI.unlocalizedString("Show Internal Objects"));
     427        this._debugSettingsView.addSetting(WI.unlocalizedString("Styles:"), WI.settings.debugEnableStyleEditingDebugMode, WI.unlocalizedString("Enable style editing debug mode"));
    406428
    407429        this._debugSettingsView.addSeparator();
    408430
    409         this._debugSettingsView.addSetting(WI.unlocalizedString("Debugging:"), WI.settings.pauseForInternalScripts, WI.unlocalizedString("Pause in WebKit-internal scripts"));
    410 
    411         this._debugSettingsView.addSetting(WI.unlocalizedString("Uncaught Exception Reporter:"), WI.settings.enableUncaughtExceptionReporter, WI.unlocalizedString("Enabled"));
     431
     432        this._debugSettingsView.addSetting(WI.unlocalizedString("Uncaught Exception Reporter:"), WI.settings.debugEnableUncaughtExceptionReporter, WI.unlocalizedString("Enabled"));
    412433
    413434        this._debugSettingsView.addSeparator();
     
    420441
    421442        let layoutDirectionEditor = this._debugSettingsView.addGroupWithCustomSetting(WI.unlocalizedString("Layout Direction:"), WI.SettingEditor.Type.Select, {values: layoutDirectionValues});
    422         layoutDirectionEditor.value = WI.settings.layoutDirection.value;
     443        layoutDirectionEditor.value = WI.settings.debugLayoutDirection.value;
    423444        layoutDirectionEditor.addEventListener(WI.SettingEditor.Event.ValueDidChange, () => { WI.setLayoutDirection(layoutDirectionEditor.value); });
     445
     446        this._debugSettingsView.addSeparator();
    424447
    425448        let resetInspectorButton = document.createElement("button");
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js

    r248202 r248391  
    677677    _updateDebugLockStatus()
    678678    {
    679         if (!this._style || !WI.settings.enableStyleEditingDebugMode.value)
     679        if (!this._style || !WI.isDebugUIEnabled() || !WI.settings.debugEnableStyleEditingDebugMode.value)
    680680            return;
    681681
  • trunk/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js

    r220119 r248391  
    3636            if (!callFrame.sourceCodeLocation && callFrame.functionName === null)
    3737                continue;
    38             if (callFrame.isConsoleEvaluation && !WI.isDebugUIEnabled())
     38            if (callFrame.isConsoleEvaluation && (!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value))
    3939                continue;
    4040
  • trunk/Source/WebInspectorUI/UserInterface/Views/View.js

    r244264 r248391  
    296296        this._layoutReason = savedLayoutReason;
    297297
    298         if (WI.settings.enableLayoutFlashing.value)
     298        if (WI.isDebugUIEnabled() && WI.settings.debugEnableLayoutFlashing.value)
    299299            this._drawLayoutFlashingOutline(isInitialLayout);
    300300
Note: See TracChangeset for help on using the changeset viewer.