RESOLVED FIXED105764
Web Inspector: Refactor SourceMapParser to enable range-based sourcemap
https://bugs.webkit.org/show_bug.cgi?id=105764
Summary Web Inspector: Refactor SourceMapParser to enable range-based sourcemap
Alexander Pavlov (apavlov)
Reported 2012-12-26 05:25:33 PST
Sass sourcemaps are semantically range-based rather than position-based (i.e. two sequential position mappings define a single range mapping, and positions between ranges are unmapped, that is, are mapped to themselves).
Attachments
Patch (29.78 KB, patch)
2012-12-26 05:34 PST, Alexander Pavlov (apavlov)
no flags
Patch (38.25 KB, patch)
2012-12-27 03:22 PST, Alexander Pavlov (apavlov)
vsevik: review+
Alexander Pavlov (apavlov)
Comment 1 2012-12-26 05:34:37 PST
Build Bot
Comment 2 2012-12-26 07:02:16 PST
Comment on attachment 180742 [details] Patch Attachment 180742 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15513971 New failing tests: http/tests/inspector/compiler-script-mapping.html
WebKit Review Bot
Comment 3 2012-12-26 09:20:43 PST
Comment on attachment 180742 [details] Patch Attachment 180742 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15538005 New failing tests: http/tests/inspector/compiler-script-mapping.html
Alexander Pavlov (apavlov)
Comment 4 2012-12-27 03:22:51 PST
Vsevolod Vlasov
Comment 5 2012-12-27 05:20:42 PST
Comment on attachment 180786 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180786&action=review > Source/WebCore/inspector/front-end/SourceMap.js:60 > + var result = []; return Object.keys(this._sources); > Source/WebCore/inspector/front-end/SourceMap.js:311 > + if (map.sourceRoot) We should do this only once in _parseMap > Source/WebCore/inspector/front-end/SourceMap.js:340 > + strippedMappings.push(this._mappings[i]); this._mappings.filter(filterOut...) > Source/WebCore/inspector/front-end/SourceMap.js:367 > + if (nextEntry && nextEntry[0] === lineNumber && nextEntry[1] === columnNumber) I would replace nextEntry check with index + 1 < this._mappings.length check before reading from the array. also you can reuse comparator here. > Source/WebCore/inspector/front-end/SourceMap.js:409 > +WebInspector.SourceRange = function(url, startLine, startColumn, endLine, endColumn) I would call it WebInspector.RangeBasedSourceMap.SourceRange instead
Alexander Pavlov (apavlov)
Comment 6 2012-12-27 06:15:11 PST
Note You need to log in before you can comment on or make changes to this bug.