WebKit Bugzilla
Attachment 358338 Details for
Bug 193148
: Web Inspector: Add a Setting Toggle for Source Maps
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
source-maps-1.patch (text/plain), 4.58 KB, created by
Joseph Pecoraro
on 2019-01-04 11:06:38 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-01-04 11:06:38 PST
Size:
4.58 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 4109c8dd233..9d242d169b4 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-04 Joseph Pecoraro <pecoraro@apple.com> >+ >+ Web Inspector: Add a Setting Toggle for Source Maps >+ https://bugs.webkit.org/show_bug.cgi?id=193148 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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 <pecoraro@apple.com> > > Web Inspector: Include `globalThis` in default JavaScript completions >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index aa78eeb05fb..0721c095899 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -362,6 +362,7 @@ localizedStrings["Enable Program"] = "Enable Program"; > 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["Sockets"] = "Sockets"; > 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"; >diff --git a/Source/WebInspectorUI/UserInterface/Base/Setting.js b/Source/WebInspectorUI/UserInterface/Base/Setting.js >index d0508a33170..0f6db171e2b 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Setting.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Setting.js >@@ -114,6 +114,7 @@ WI.settings = { > 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), >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js b/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js >index 0344e5545df..444cd90bad3 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js >@@ -108,6 +108,9 @@ WI.NetworkManager = class NetworkManager extends WI.Object > > 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) >diff --git a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >index 60511de3b2d..d123dc00b75 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js >@@ -207,6 +207,7 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi > 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(); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193148
: 358338