Title: [239635] trunk/Source/WebInspectorUI
- Revision
- 239635
- Author
- commit-qu...@webkit.org
- Date
- 2019-01-04 13:27:34 -0800 (Fri, 04 Jan 2019)
Log Message
Web Inspector: Add a Setting Toggle for Source Maps
https://bugs.webkit.org/show_bug.cgi?id=193148
Patch by Joseph Pecoraro <pecor...@apple.com> on 2019-01-04
Reviewed by Devin Rousso.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.downloadSourceMap):
Don't download source maps if the setting is disabled.
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
Settings toggle for source maps. Enabled by default.
* Localizations/en.lproj/localizedStrings.js:
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (239634 => 239635)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-01-04 21:22:30 UTC (rev 239634)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-01-04 21:27:34 UTC (rev 239635)
@@ -1,5 +1,23 @@
2019-01-04 Joseph Pecoraro <pecor...@apple.com>
+ Web Inspector: Add a Setting Toggle for Source Maps
+ https://bugs.webkit.org/show_bug.cgi?id=193148
+
+ Reviewed by Devin Rousso.
+
+ * UserInterface/Controllers/NetworkManager.js:
+ (WI.NetworkManager.prototype.downloadSourceMap):
+ Don't download source maps if the setting is disabled.
+
+ * UserInterface/Base/Setting.js:
+ * UserInterface/Views/SettingsTabContentView.js:
+ (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
+ Settings toggle for source maps. Enabled by default.
+
+ * Localizations/en.lproj/localizedStrings.js:
+
+2019-01-04 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: Include `globalThis` in default _javascript_ completions
https://bugs.webkit.org/show_bug.cgi?id=193147
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (239634 => 239635)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-01-04 21:22:30 UTC (rev 239634)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-01-04 21:27:34 UTC (rev 239635)
@@ -362,6 +362,7 @@
localizedStrings["Enable all breakpoints (%s)"] = "Enable all breakpoints (%s)";
localizedStrings["Enable breakpoints"] = "Enable breakpoints";
localizedStrings["Enable paint flashing"] = "Enable paint flashing";
+localizedStrings["Enable source maps"] = "Enable source maps";
localizedStrings["Enabled"] = "Enabled";
localizedStrings["Encoded"] = "Encoded";
localizedStrings["Encoding"] = "Encoding";
@@ -873,6 +874,7 @@
localizedStrings["Sort Ascending"] = "Sort Ascending";
localizedStrings["Sort Descending"] = "Sort Descending";
localizedStrings["Source"] = "Source";
+localizedStrings["Source maps:"] = "Source maps:";
localizedStrings["Sources"] = "Sources";
localizedStrings["Space"] = "Space";
localizedStrings["Spaces"] = "Spaces";
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js (239634 => 239635)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js 2019-01-04 21:22:30 UTC (rev 239634)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js 2019-01-04 21:27:34 UTC (rev 239635)
@@ -114,6 +114,7 @@
indentWithTabs: new WI.Setting("indent-with-tabs", false),
resourceCachingDisabled: new WI.Setting("disable-resource-caching", false),
selectedNetworkDetailContentViewIdentifier: new WI.Setting("network-detail-content-view-identifier", "preview"),
+ sourceMapsEnabled: new WI.Setting("source-maps-enabled", true),
showAllRequestsBreakpoint: new WI.Setting("show-all-requests-breakpoint", true),
showAssertionFailuresBreakpoint: new WI.Setting("show-assertion-failures-breakpoint", true),
showCanvasPath: new WI.Setting("show-canvas-path", false),
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js (239634 => 239635)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js 2019-01-04 21:22:30 UTC (rev 239634)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js 2019-01-04 21:27:34 UTC (rev 239635)
@@ -108,6 +108,9 @@
downloadSourceMap(sourceMapURL, baseURL, originalSourceCode)
{
+ if (!WI.settings.sourceMapsEnabled.value)
+ return;
+
// The baseURL could have come from a "//# sourceURL". Attempt to get a
// reasonable absolute URL for the base by using the main resource's URL.
if (WI.networkManager.mainFrame)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js (239634 => 239635)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js 2019-01-04 21:22:30 UTC (rev 239634)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js 2019-01-04 21:27:34 UTC (rev 239635)
@@ -207,6 +207,7 @@
generalSettingsView.addSeparator();
generalSettingsView.addSetting(WI.UIString("Debugger:"), WI.settings.showScopeChainOnPause, WI.UIString("Show Scope Chain on pause"));
+ generalSettingsView.addSetting(WI.UIString("Source maps:"), WI.settings.sourceMapsEnabled, WI.UIString("Enable source maps"));
generalSettingsView.addSeparator();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes