Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (248390 => 248391)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-08-07 21:49:08 UTC (rev 248391)
@@ -1,3 +1,74 @@
+2019-08-07 Devin Rousso <[email protected]>
+
+ 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):
+
2019-08-07 Nikita Vasilyev <[email protected]>
Web Inspector: RTL: content of Variables section should always be LTR
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -2703,22 +2703,23 @@
WI.resolvedLayoutDirection = function()
{
- let layoutDirection = WI.settings.layoutDirection.value;
- if (layoutDirection === WI.LayoutDirection.System)
+ let layoutDirection = WI.settings.debugLayoutDirection.value;
+ if (!WI.isDebugUIEnabled() || layoutDirection === WI.LayoutDirection.System)
layoutDirection = InspectorFrontendHost.userInterfaceLayoutDirection();
-
return layoutDirection;
};
WI.setLayoutDirection = function(value)
{
+ console.assert(WI.isDebugUIEnabled());
+
if (!Object.values(WI.LayoutDirection).includes(value))
WI.reportInternalError("Unknown layout direction requested: " + value);
- if (value === WI.settings.layoutDirection.value)
+ if (value === WI.settings.debugLayoutDirection.value)
return;
- WI.settings.layoutDirection.value = value;
+ WI.settings.debugLayoutDirection.value = value;
if (WI.resolvedLayoutDirection() === WI.LayoutDirection.RTL && WI._dockConfiguration === WI.DockConfiguration.Right)
WI._dockLeft();
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Object.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Object.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Object.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -218,7 +218,6 @@
PageArchiveStarted: "page-archive-started",
PageArchiveEnded: "page-archive-ended",
ExtraDomainsActivated: "extra-domains-activated",
- DebugUIEnabledDidChange: "debug-ui-enabled-did-change",
VisibilityStateDidChange: "visibility-state-did-change",
TransitionPageTarget: "transition-page-target",
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -187,14 +187,21 @@
experimentalEnableStylesIcons: new WI.Setting("experimental-styles-icons", false),
experimentalEnableStylesJumpToEffective: new WI.Setting("experimental-styles-jump-to-effective", false),
- // DebugUI
- autoLogProtocolMessages: new WI.Setting("auto-collect-protocol-messages", false),
- autoLogTimeStats: new WI.Setting("auto-collect-time-stats", false),
- enableLayoutFlashing: new WI.Setting("enable-layout-flashing", false),
- enableStyleEditingDebugMode: new WI.Setting("enable-style-editing-debug-mode", false),
- enableUncaughtExceptionReporter: new WI.Setting("enable-uncaught-exception-reporter", true),
- filterMultiplexingBackendInspectorProtocolMessages: new WI.Setting("filter-multiplexing-backend-inspector-protocol-messages", true),
- layoutDirection: new WI.Setting("layout-direction-override", "system"),
- pauseForInternalScripts: new WI.Setting("pause-for-internal-scripts", false),
- debugShowInternalObjectsInHeapSnapshot: new WI.Setting("debug-show-internal-objects-in-heap-snapshot", false),
+ // Protocol
+ protocolAutoLogMessages: new WI.Setting("protocol-auto-log-messages", false),
+ protocolAutoLogTimeStats: new WI.Setting("protocol-auto-log-time-stats", false),
+ protocolFilterMultiplexingBackendMessages: new WI.Setting("protocol-filter-multiplexing-backend-messages", true),
+
+ // Engineering
+ engineeringShowInternalScripts: new WI.Setting("engineering-show-internal-scripts", false),
+ engineeringPauseForInternalScripts: new WI.Setting("engineering-pause-for-internal-scripts", false),
+ engineeringShowInternalObjectsInHeapSnapshot: new WI.Setting("engineering-show-internal-objects-in-heap-snapshot", false),
+ engineeringShowPrivateSymbolsInHeapSnapshot: new WI.Setting("engineering-show-private-symbols-in-heap-snapshot", false),
+
+ // Debug
+ debugShowConsoleEvaluations: new WI.Setting("debug-show-console-evaluations", false),
+ debugEnableLayoutFlashing: new WI.Setting("debug-enable-layout-flashing", false),
+ debugEnableStyleEditingDebugMode: new WI.Setting("debug-enable-style-editing-debug-mode", false),
+ debugEnableUncaughtExceptionReporter: new WI.Setting("debug-enable-uncaught-exception-reporter", true),
+ debugLayoutDirection: new WI.Setting("debug-layout-direction-override", "system"),
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -29,8 +29,6 @@
{
super();
- WI.notifications.addEventListener(WI.Notification.DebugUIEnabledDidChange, this._debugUIEnabledDidChange, this);
-
WI.Breakpoint.addEventListener(WI.Breakpoint.Event.DisplayLocationDidChange, this._breakpointDisplayLocationDidChange, this);
WI.Breakpoint.addEventListener(WI.Breakpoint.Event.DisabledStateDidChange, this._breakpointDisabledStateDidChange, this);
WI.Breakpoint.addEventListener(WI.Breakpoint.Event.ConditionDidChange, this._breakpointEditablePropertyDidChange, this);
@@ -45,7 +43,10 @@
WI.targetManager.addEventListener(WI.TargetManager.Event.TargetRemoved, this._targetRemoved, this);
- WI.settings.pauseForInternalScripts.addEventListener(WI.Setting.Event.Changed, this._pauseForInternalScriptsDidChange, this);
+ if (WI.isEngineeringBuild) {
+ WI.settings.engineeringShowInternalScripts.addEventListener(WI.Setting.Event.Changed, this._handleEngineeringShowInternalScriptsSettingChanged, this);
+ WI.settings.engineeringPauseForInternalScripts.addEventListener(WI.Setting.Event.Changed, this._handleEngineeringPauseForInternalScriptsSettingChanged, this);
+ }
WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
@@ -146,9 +147,11 @@
if (target.DebuggerAgent.setAsyncStackTraceDepth)
target.DebuggerAgent.setAsyncStackTraceDepth(this._asyncStackTraceDepthSetting.value);
- // COMPATIBILITY (iOS 12): DebuggerAgent.setPauseForInternalScripts did not exist yet.
- if (target.DebuggerAgent.setPauseForInternalScripts)
- target.DebuggerAgent.setPauseForInternalScripts(WI.settings.pauseForInternalScripts.value);
+ if (WI.isEngineeringBuild) {
+ // COMPATIBILITY (iOS 12): DebuggerAgent.setPauseForInternalScripts did not exist yet.
+ if (target.DebuggerAgent.setPauseForInternalScripts)
+ target.DebuggerAgent.setPauseForInternalScripts(WI.settings.engineeringPauseForInternalScripts.value);
+ }
if (this.paused)
targetData.pauseIfNeeded();
@@ -319,13 +322,13 @@
{
let knownScripts = [];
- for (let [target, targetData] of this._targetDebuggerDataMap) {
+ for (let targetData of this._targetDebuggerDataMap.values()) {
for (let script of targetData.scripts) {
if (script.resource)
continue;
- if (isWebInspectorConsoleEvaluationScript(script.sourceURL))
+ if ((!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value) && isWebInspectorConsoleEvaluationScript(script.sourceURL))
continue;
- if (!WI.isDebugUIEnabled() && isWebKitInternalScript(script.sourceURL))
+ if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(script.sourceURL))
continue;
knownScripts.push(script);
}
@@ -621,7 +624,7 @@
continue;
// Exclude the case where the call frame is in the inspector code.
- if (!WI.isDebugUIEnabled() && isWebKitInternalScript(sourceCodeLocation.sourceCode.sourceURL))
+ if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(sourceCodeLocation.sourceCode.sourceURL))
continue;
let scopeChain = this._scopeChainFromPayload(target, callFramePayload.scopeChain);
@@ -710,7 +713,7 @@
return;
}
- if (!WI.isDebugUIEnabled() && isWebKitInternalScript(sourceURL))
+ if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(sourceURL))
return;
let range = new WI.TextRange(startLine, startColumn, endLine, endColumn);
@@ -740,12 +743,11 @@
if (isWebKitInternalScript(script.sourceURL)) {
this._internalWebKitScripts.push(script);
- if (!WI.isDebugUIEnabled())
+ if (!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value)
return;
}
- // Console expressions are not added to the UI by default.
- if (isWebInspectorConsoleEvaluationScript(script.sourceURL))
+ if ((!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value) && isWebInspectorConsoleEvaluationScript(script.sourceURL))
return;
this.dispatchEventToListeners(WI.DebuggerManager.Event.ScriptAdded, {script});
@@ -1191,11 +1193,18 @@
this.dispatchEventToListeners(WI.DebuggerManager.Event.Resumed);
}
- _pauseForInternalScriptsDidChange(event)
+ _handleEngineeringShowInternalScriptsSettingChanged(event)
{
+ let eventType = WI.settings.engineeringShowInternalScripts.value ? WI.DebuggerManager.Event.ScriptAdded : WI.DebuggerManager.Event.ScriptRemoved;
+ for (let script of this._internalWebKitScripts)
+ this.dispatchEventToListeners(eventType, {script});
+ }
+
+ _handleEngineeringPauseForInternalScriptsSettingChanged(event)
+ {
for (let target of WI.targets) {
if (target.DebuggerAgent.setPauseForInternalScripts)
- target.DebuggerAgent.setPauseForInternalScripts(WI.settings.pauseForInternalScripts.value);
+ target.DebuggerAgent.setPauseForInternalScripts(WI.settings.engineeringPauseForInternalScripts.value);
}
}
@@ -1356,13 +1365,6 @@
}
return probeSet;
}
-
- _debugUIEnabledDidChange()
- {
- let eventType = WI.isDebugUIEnabled() ? WI.DebuggerManager.Event.ScriptAdded : WI.DebuggerManager.Event.ScriptRemoved;
- for (let script of this._internalWebKitScripts)
- this.dispatchEventToListeners(eventType, {script});
- }
};
WI.DebuggerManager.Event = {
Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -25,6 +25,18 @@
WI.isEngineeringBuild = true;
+// Disable Pause in Internal Scripts if Show Internal Scripts is dibbled.
+WI.settings.engineeringShowInternalScripts.addEventListener(WI.Setting.Event.Changed, (event) => {
+ if (!WI.settings.engineeringShowInternalScripts.value)
+ WI.settings.engineeringPauseForInternalScripts.value = false;
+}, WI.settings.engineeringPauseForInternalScripts);
+
+// Enable Show Internal Scripts if Pause in Internal Scripts is enabled.
+WI.settings.engineeringPauseForInternalScripts.addEventListener(WI.Setting.Event.Changed, (event) => {
+ if (WI.settings.engineeringPauseForInternalScripts.value)
+ WI.settings.engineeringShowInternalScripts.value = true;
+}, WI.settings.engineeringShowInternalScripts);
+
// This function is invoked after the inspector has loaded and has a backend target.
WI.runBootstrapOperations = function() {
WI.showDebugUISetting = new WI.Setting("show-debug-ui", false);
@@ -95,7 +107,7 @@
}
applyDumpMessagesState(nextState);
});
- WI.settings.autoLogProtocolMessages.addEventListener(WI.Setting.Event.Changed, () => {
+ WI.settings.protocolAutoLogMessages.addEventListener(WI.Setting.Event.Changed, () => {
if (ignoreChangesToState)
return;
applyDumpMessagesState(dumpMessagesCurrentState());
@@ -119,7 +131,6 @@
WI.showDebugUISetting.addEventListener(WI.Setting.Event.Changed, () => {
updateDebugUI();
- WI.notifications.dispatchEventToListeners(WI.Notification.DebugUIEnabledDidChange);
});
updateDebugUI();
Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -94,7 +94,7 @@
function handleUncaughtExceptionRecord(exceptionRecord) {
try {
- if (!WI.settings.enableUncaughtExceptionReporter.value)
+ if (WI.isDebugUIEnabled() && !WI.settings.debugEnableUncaughtExceptionReporter.value)
return;
} catch { }
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -463,7 +463,7 @@
console.assert(oldText === styleText.slice(range.startOffset, range.endOffset), "_styleSheetTextRange data is invalid.");
- if (WI.settings.enableStyleEditingDebugMode.value) {
+ if (WI.isDebugUIEnabled() && WI.settings.debugEnableStyleEditingDebugMode.value) {
let prefix = styleText.slice(0, range.startOffset);
let postfix = styleText.slice(range.endOffset);
console.info(`${prefix}%c${oldText}%c${newText}%c${postfix}`, `background: hsl(356, 100%, 90%); color: black`, `background: hsl(100, 100%, 91%); color: black`, `background: transparent`);
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -124,7 +124,7 @@
// ^
// update only happens here
if (this._updatesInProgressCount > 0 && !options.forceUpdate) {
- if (WI.settings.enableStyleEditingDebugMode.value && text !== this._text)
+ if (WI.isDebugUIEnabled() && WI.settings.debugEnableStyleEditingDebugMode.value && text !== this._text)
console.warn("Style modified while editing:", text);
return;
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -45,8 +45,8 @@
for (let debuggableType of Object.values(WI.DebuggableType))
this._supportedDomainsForDebuggableType.set(debuggableType, []);
- WI.settings.autoLogProtocolMessages.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
- WI.settings.autoLogTimeStats.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
+ WI.settings.protocolAutoLogMessages.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
+ WI.settings.protocolAutoLogTimeStats.addEventListener(WI.Setting.Event.Changed, this._startOrStopAutomaticTracing, this);
this._startOrStopAutomaticTracing();
this.currentDispatchState = {
@@ -71,7 +71,7 @@
set dumpInspectorProtocolMessages(value)
{
// Implicitly cause automatic logging to start if it's allowed.
- WI.settings.autoLogProtocolMessages.value = value;
+ WI.settings.protocolAutoLogMessages.value = value;
this._defaultTracer.dumpMessagesToConsole = value;
}
@@ -78,12 +78,12 @@
get dumpInspectorProtocolMessages()
{
- return WI.settings.autoLogProtocolMessages.value;
+ return WI.settings.protocolAutoLogMessages.value;
}
set dumpInspectorTimeStats(value)
{
- WI.settings.autoLogTimeStats.value = value;
+ WI.settings.protocolAutoLogTimeStats.value = value;
if (!this.dumpInspectorProtocolMessages)
this.dumpInspectorProtocolMessages = true;
@@ -93,12 +93,12 @@
get dumpInspectorTimeStats()
{
- return WI.settings.autoLogTimeStats.value;
+ return WI.settings.protocolAutoLogTimeStats.value;
}
set filterMultiplexingBackendInspectorProtocolMessages(value)
{
- WI.settings.filterMultiplexingBackendInspectorProtocolMessages.value = value;
+ WI.settings.protocolFilterMultiplexingBackendMessages.value = value;
this._defaultTracer.filterMultiplexingBackend = value;
}
@@ -105,7 +105,7 @@
get filterMultiplexingBackendInspectorProtocolMessages()
{
- return WI.settings.filterMultiplexingBackendInspectorProtocolMessages.value;
+ return WI.settings.protocolFilterMultiplexingBackendMessages.value;
}
set customTracer(tracer)
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -617,7 +617,7 @@
var location = response.location;
var sourceCode = WI.debuggerManager.scriptForIdentifier(location.scriptId, this._target);
- if (!sourceCode || (!WI.isDebugUIEnabled() && isWebKitInternalScript(sourceCode.sourceURL))) {
+ if (!sourceCode || ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(sourceCode.sourceURL))) {
result.resolve(WI.RemoteObject.SourceCodeLocationPromise.NoSourceFound);
return;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotEdgeProxy.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotEdgeProxy.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotEdgeProxy.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -44,7 +44,7 @@
isPrivateSymbol()
{
- if (WI.isDebugUIEnabled())
+ if (WI.isEngineeringBuild && WI.settings.engineeringShowPrivateSymbolsInHeapSnapshot.value)
return false;
return typeof this.data ="" "string" && this.data.startsWith("PrivateSymbol");
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -402,7 +402,7 @@
});
}
- if (callFrame && (!callFrame.isConsoleEvaluation || WI.isDebugUIEnabled())) {
+ if (callFrame && (!callFrame.isConsoleEvaluation || (WI.isDebugUIEnabled() && WI.settings.debugShowConsoleEvaluations.value))) {
const showFunctionName = !!callFrame.functionName;
var locationElement = new WI.CallFrameView(callFrame, showFunctionName);
locationElement.classList.add("console-message-location");
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -216,7 +216,7 @@
populateTopLevel()
{
// Populate the first level with the different classes.
- let skipInternalOnlyObjects = !WI.settings.debugShowInternalObjectsInHeapSnapshot.value;
+ let skipInternalOnlyObjects = !WI.isEngineeringBuild || !WI.settings.engineeringShowInternalObjectsInHeapSnapshot.value;
for (let [className, {size, retainedSize, count, internalCount, deadCount, objectCount}] of this.heapSnapshot.categories) {
console.assert(count > 0);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -327,8 +327,10 @@
continue;
if (script.dynamicallyAddedScriptElement)
continue;
- if (isWebKitInternalScript(script.sourceURL) || isWebInspectorConsoleEvaluationScript(script.sourceURL))
+ if ((!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value) || isWebInspectorConsoleEvaluationScript(script.sourceURL))
continue;
+ if ((!WI.isEngineeringBuild || !WI.settings.engineeringShowInternalScripts.value) && isWebKitInternalScript(script.sourceURL))
+ continue;
this._addResource(script, suppressFilterUpdate);
}
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -167,7 +167,10 @@
this._createConsoleSettingsView();
this._createExperimentalSettingsView();
- WI.notifications.addEventListener(WI.Notification.DebugUIEnabledDidChange, this._updateDebugSettingsViewVisibility, this);
+ if (WI.isEngineeringBuild)
+ this._createEngineeringSettingsView();
+
+ WI.showDebugUISetting.addEventListener(WI.Setting.Event.Changed, this._updateDebugSettingsViewVisibility, this);
this._updateDebugSettingsViewVisibility();
this.selectedSettingsView = this._settingsViews[0];
@@ -374,6 +377,25 @@
this.addSettingsView(experimentalSettingsView);
}
+ _createEngineeringSettingsView()
+ {
+ // These settings are only ever shown in engineering builds, so the strings are unlocalized.
+
+ let engineeringSettingsView = new WI.SettingsView("engineering", WI.unlocalizedString("Engineering"));
+
+ let debuggingGroup = engineeringSettingsView.addGroup(WI.unlocalizedString("Debugging:"));
+ debuggingGroup.addSetting(WI.settings.engineeringShowInternalScripts, WI.unlocalizedString("Show WebKit-internal scripts"));
+ debuggingGroup.addSetting(WI.settings.engineeringPauseForInternalScripts, WI.unlocalizedString("Pause in WebKit-internal scripts"));
+
+ engineeringSettingsView.addSeparator();
+
+ let heapSnapshotGroup = engineeringSettingsView.addGroup(WI.unlocalizedString("Heap Snapshot:"));
+ heapSnapshotGroup.addSetting(WI.settings.engineeringShowInternalObjectsInHeapSnapshot, WI.unlocalizedString("Show Internal Objects"));
+ heapSnapshotGroup.addSetting(WI.settings.engineeringShowPrivateSymbolsInHeapSnapshot, WI.unlocalizedString("Show Private Symbols"));
+
+ this.addSettingsView(engineeringSettingsView);
+ }
+
_createDebugSettingsView()
{
if (this._debugSettingsView)
@@ -385,30 +407,29 @@
let protocolMessagesGroup = this._debugSettingsView.addGroup(WI.unlocalizedString("Protocol Logging:"));
- let autoLogProtocolMessagesEditor = protocolMessagesGroup.addSetting(WI.settings.autoLogProtocolMessages, WI.unlocalizedString("Messages"));
- WI.settings.autoLogProtocolMessages.addEventListener(WI.Setting.Event.Changed, () => {
- autoLogProtocolMessagesEditor.value = InspectorBackend.dumpInspectorProtocolMessages;
+ let protocolAutoLogMessagesEditor = protocolMessagesGroup.addSetting(WI.settings.protocolAutoLogMessages, WI.unlocalizedString("Messages"));
+ WI.settings.protocolAutoLogMessages.addEventListener(WI.Setting.Event.Changed, () => {
+ protocolAutoLogMessagesEditor.value = InspectorBackend.dumpInspectorProtocolMessages;
});
- protocolMessagesGroup.addSetting(WI.settings.autoLogTimeStats, WI.unlocalizedString("Time Stats"));
+ protocolMessagesGroup.addSetting(WI.settings.protocolAutoLogTimeStats, WI.unlocalizedString("Time Stats"));
this._debugSettingsView.addSeparator();
- this._debugSettingsView.addSetting(WI.unlocalizedString("Layout Flashing:"), WI.settings.enableLayoutFlashing, WI.unlocalizedString("Draw borders when a view performs a layout"));
+ this._debugSettingsView.addSetting(WI.unlocalizedString("Debugging:"), WI.settings.debugShowConsoleEvaluations, WI.unlocalizedString("Show Console Evaluations"));
this._debugSettingsView.addSeparator();
- this._debugSettingsView.addSetting(WI.unlocalizedString("Styles:"), WI.settings.enableStyleEditingDebugMode, WI.unlocalizedString("Enable style editing debug mode"));
+ this._debugSettingsView.addSetting(WI.unlocalizedString("Layout Flashing:"), WI.settings.debugEnableLayoutFlashing, WI.unlocalizedString("Draw borders when a view performs a layout"));
this._debugSettingsView.addSeparator();
- this._debugSettingsView.addSetting(WI.unlocalizedString("Heap Snapshot:"), WI.settings.debugShowInternalObjectsInHeapSnapshot, WI.unlocalizedString("Show Internal Objects"));
+ this._debugSettingsView.addSetting(WI.unlocalizedString("Styles:"), WI.settings.debugEnableStyleEditingDebugMode, WI.unlocalizedString("Enable style editing debug mode"));
this._debugSettingsView.addSeparator();
- this._debugSettingsView.addSetting(WI.unlocalizedString("Debugging:"), WI.settings.pauseForInternalScripts, WI.unlocalizedString("Pause in WebKit-internal scripts"));
- this._debugSettingsView.addSetting(WI.unlocalizedString("Uncaught Exception Reporter:"), WI.settings.enableUncaughtExceptionReporter, WI.unlocalizedString("Enabled"));
+ this._debugSettingsView.addSetting(WI.unlocalizedString("Uncaught Exception Reporter:"), WI.settings.debugEnableUncaughtExceptionReporter, WI.unlocalizedString("Enabled"));
this._debugSettingsView.addSeparator();
@@ -419,9 +440,11 @@
];
let layoutDirectionEditor = this._debugSettingsView.addGroupWithCustomSetting(WI.unlocalizedString("Layout Direction:"), WI.SettingEditor.Type.Select, {values: layoutDirectionValues});
- layoutDirectionEditor.value = WI.settings.layoutDirection.value;
+ layoutDirectionEditor.value = WI.settings.debugLayoutDirection.value;
layoutDirectionEditor.addEventListener(WI.SettingEditor.Event.ValueDidChange, () => { WI.setLayoutDirection(layoutDirectionEditor.value); });
+ this._debugSettingsView.addSeparator();
+
let resetInspectorButton = document.createElement("button");
resetInspectorButton.textContent = WI.unlocalizedString("Reset Web Inspector");
resetInspectorButton.addEventListener("click", (event) => {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -676,7 +676,7 @@
_updateDebugLockStatus()
{
- if (!this._style || !WI.settings.enableStyleEditingDebugMode.value)
+ if (!this._style || !WI.isDebugUIEnabled() || !WI.settings.debugEnableStyleEditingDebugMode.value)
return;
this.element.classList.toggle("debug-style-locked", this._style.locked);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -35,7 +35,7 @@
for (var callFrame of stackTrace.callFrames) {
if (!callFrame.sourceCodeLocation && callFrame.functionName === null)
continue;
- if (callFrame.isConsoleEvaluation && !WI.isDebugUIEnabled())
+ if (callFrame.isConsoleEvaluation && (!WI.isDebugUIEnabled() || !WI.settings.debugShowConsoleEvaluations.value))
continue;
var callFrameElement = new WI.CallFrameView(callFrame, true);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/View.js (248390 => 248391)
--- trunk/Source/WebInspectorUI/UserInterface/Views/View.js 2019-08-07 21:32:46 UTC (rev 248390)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/View.js 2019-08-07 21:49:08 UTC (rev 248391)
@@ -295,7 +295,7 @@
// Ensure that the initial layout override doesn't affects to subviews.
this._layoutReason = savedLayoutReason;
- if (WI.settings.enableLayoutFlashing.value)
+ if (WI.isDebugUIEnabled() && WI.settings.debugEnableLayoutFlashing.value)
this._drawLayoutFlashingOutline(isInitialLayout);
for (let view of this._subviews) {