RESOLVED FIXED 106795
Web Inspector: Introduce file mapping allowing to map network loaded scripts and stylesheets to file system files.
https://bugs.webkit.org/show_bug.cgi?id=106795
Summary Web Inspector: Introduce file mapping allowing to map network loaded scripts ...
Vsevolod Vlasov
Reported 2013-01-14 07:43:41 PST
Introduced file mapping for inspector. FileMapping is essentially an array of MappingEntries where each MappingEntry is a pair of urlPrefix and pathPrefix. When scripts and stylesheets are mapped to uiSourceCodes FileMapping methods are used to establish prefix based matching with file system uiSourceCodes if possible.
Attachments
Patch (40.02 KB, patch)
2013-01-14 08:43 PST, Vsevolod Vlasov
no flags
Patch (36.34 KB, patch)
2013-01-15 08:33 PST, Vsevolod Vlasov
pfeldman: review+
Vsevolod Vlasov
Comment 1 2013-01-14 08:43:32 PST
Pavel Feldman
Comment 2 2013-01-14 09:02:10 PST
Comment on attachment 182583 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182583&action=review > Source/WebCore/inspector/front-end/BreakpointManager.js:453 > + var url = WebInspector.fileMapping.urlForUISourceCode(this._primaryUILocation.uiSourceCode); I think I like it more the way it was before. I.e. if each UISourceCode has exactly one (or zero) URLs and that URL does not change during the UISourceCode lifetime, why not to store it internally? External mapping just adds indirection. Look at the way you bloat the code.
Vsevolod Vlasov
Comment 3 2013-01-15 08:33:09 PST
Pavel Feldman
Comment 4 2013-01-16 01:27:38 PST
Comment on attachment 182781 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182781&action=review > LayoutTests/inspector/file-mapping.html:40 > + InspectorTest.assertEquals(fileMapping.uriForURL("http://www.example.com"), "uri:/home/example.com", "fileMapping.uriForURL failed."); Please never use assertEquals, do InspectorTest.addResult(fileMapping.uriForURL("http://www.example.com")) instead; It greatly improves debuggability.
Vsevolod Vlasov
Comment 5 2013-01-16 02:28:07 PST
Note You need to log in before you can comment on or make changes to this bug.