WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105764
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
Details
Formatted Diff
Diff
Patch
(38.25 KB, patch)
2012-12-27 03:22 PST
,
Alexander Pavlov (apavlov)
vsevik
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2012-12-26 05:34:37 PST
Created
attachment 180742
[details]
Patch
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
Created
attachment 180786
[details]
Patch
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
Committed
r138500
: <
http://trac.webkit.org/changeset/138500
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug