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.
Created attachment 182583 [details]
Comment on attachment 182583 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=182583&action=review
> + 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.
Created attachment 182781 [details]
Comment on attachment 182781 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=182781&action=review
> + 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.
Committed r139860: <http://trac.webkit.org/changeset/139860>