[webkit-changes] [WebKit/WebKit] 33603f: Web Inspector: add support for `ignoreList` in sou...
Devin Rousso
noreply at github.com
Thu Sep 19 01:23:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 33603fbb606c9966fb1e5a6fdcd2caba8e027f1b
https://github.com/WebKit/WebKit/commit/33603fbb606c9966fb1e5a6fdcd2caba8e027f1b
Author: Devin Rousso <hi at devinrousso.com>
Date: 2024-09-19 (Thu, 19 Sep 2024)
Changed paths:
M LayoutTests/inspector/debugger/resources/source-map.js.map
M LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-inner-expected.txt
M LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-inner.html
M LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-middle-expected.txt
M LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-middle.html
M LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-outer-expected.txt
M LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-outer.html
M Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js
M Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js
M Source/WebInspectorUI/UserInterface/Models/SourceMap.js
M Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js
Log Message:
-----------
Web Inspector: add support for `ignoreList` in sourcemaps
https://bugs.webkit.org/show_bug.cgi?id=275673
Reviewed by Yusuke Suzuki.
This allows source map generating tools to specify a new `ignoreList` top-level property that will cause Web Inspector to ignore/blackbox the corresponding resource (with each value being an index in the `sources` top-level property) by default.
For example, this could be used to automatically mark any sources loaded from `node_modules` as being ignored by default since that's usually not 1st party code.
* Source/WebInspectorUI/UserInterface/Models/SourceMap.js:
(WI.SourceMap):
(WI.SourceMap.prototype.get resources):
(WI.SourceMap.prototype.resourceForURL):
(WI.SourceMap.prototype.calculateBlackboxSourceRangesForProtocol):
(WI.SourceMap.prototype._parseMap):
(WI.SourceMap.prototype.addResource): Deleted.
(WI.SourceMap.prototype.sources): Deleted.
* Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js:
(WI.SourceMapResource):
(WI.SourceMapResource.prototype.get ignored): Added.
(WI.SourceMapResource.prototype.set ignored): Added.
Parse `ignoreList` and store whether a given resource should be ignored/blackboxed by default.
* Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.blackboxDataForSourceCode):
(WI.DebuggerManager.prototype.setShouldBlackboxScript):
If a `WI.SourceMapResource` is ignored/blackboxed by default, treat it as though it was `WI.DebuggerManager.BlackboxType.URL`.
Also allow the developer to un-ignore the `WI.SourceMapResource` to allow pausing in it if they "disagree" with the source map.
* Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype._sourceMapLoadAndParseSucceeded):
Drive-by: Adjust how `WI.SourceMapResource` are associated with `WI.SourceMap`.
* LayoutTests/inspector/debugger/resources/source-map.js.map:
* LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-inner.html:
* LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-inner-expected.txt:
* LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-middle.html:
* LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-middle-expected.txt:
* LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-outer.html:
* LayoutTests/inspector/debugger/setShouldBlackboxURL-source-map-outer-expected.txt:
Canonical link: https://commits.webkit.org/283903@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list