Changeset 96585 in webkit


Ignore:
Timestamp:
Oct 4, 2011 5:32:51 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

Web Inspector: add compiler source mapping support to RawSourceCode.
https://bugs.webkit.org/show_bug.cgi?id=68891

Reviewed by Pavel Feldman.

Source/WebCore:

  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/front-end/BreakpointManager.js:

(WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
(WebInspector.BreakpointManager.prototype.setBreakpoint):
(WebInspector.BreakpointManager.prototype._materializeBreakpoint):

  • inspector/front-end/CompilerSourceMappingProvider.js: Added.

(WebInspector.CompilerSourceMappingProvider):
(WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping):
(WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode):

  • inspector/front-end/DebuggerPresentationModel.js:

(WebInspector.DebuggerPresentationModel.prototype.continueToLine):

  • inspector/front-end/RawSourceCode.js:

(WebInspector.RawSourceCode.prototype.setCompilerSourceMappingProvider):
(WebInspector.RawSourceCode.prototype._resourceFinished):
(WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
(WebInspector.RawSourceCode.prototype._updateSourceMapping):
(WebInspector.RawSourceCode.prototype._createSourceMapping.didLoadSourceMapping):
(WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
(WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
(WebInspector.RawSourceCode.CompilerSourceMapping):
(WebInspector.RawSourceCode.CompilerSourceMapping.prototype.rawLocationToUILocation):
(WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation):
(WebInspector.RawSourceCode.CompilerSourceMapping.prototype.get uiSourceCodeList):
(WebInspector.CompilerSourceMappingProvider):
(WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping):
(WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode):

  • inspector/front-end/UISourceCodeContentProviders.js:

(WebInspector.CompilerSourceMappingContentProvider):
(WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):

  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/inspector.html:

LayoutTests:

  • inspector/debugger/breakpoint-manager.html:
  • inspector/debugger/raw-source-code-expected.txt:
  • inspector/debugger/raw-source-code.html:
Location:
trunk
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96583 r96585  
     12011-09-29  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: add compiler source mapping support to RawSourceCode.
     4        https://bugs.webkit.org/show_bug.cgi?id=68891
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/debugger/breakpoint-manager.html:
     9        * inspector/debugger/raw-source-code-expected.txt:
     10        * inspector/debugger/raw-source-code.html:
     11
    1122011-10-04  Hans Wennborg  <hans@chromium.org>
    213
  • trunk/LayoutTests/inspector/debugger/breakpoint-manager.html

    r96097 r96585  
    7070    var uiSourceCodeA = createUISourceCode("a.js", "a.js",
    7171            function(rawLocation) { return rawLocation; },
    72             function(lineNumber, columnNumber) { return { scriptId: "a.js", lineNumber: lineNumber, columnNumber: columnNumber }; });
     72            function(uiSourceCode, lineNumber) { return { scriptId: "a.js", lineNumber: lineNumber, columnNumber: 0 }; });
    7373    var uiSourceCodeB = createUISourceCode("b.js", "b.js",
    7474            function(rawLocation) { return rawLocation; },
    75             function(lineNumber, columnNumber) { return { scriptId: "b.js", lineNumber: lineNumber, columnNumber: columnNumber }; });
     75            function(uiSourceCode, lineNumber) { return { scriptId: "b.js", lineNumber: lineNumber, columnNumber: 0 }; });
    7676
    7777    function createBreakpointManager(breakpoints)
     
    206206            var uiSourceCodeC = createUISourceCode("c.js", "c.js",
    207207                    function(rawLocation) { return rawLocation; },
    208                     function(lineNumber, columnNumber) { return { scriptId: "c.js", lineNumber: lineNumber, columnNumber: columnNumber }; });
     208                    function(uiSourceCode, lineNumber) { return { scriptId: "c.js", lineNumber: lineNumber, columnNumber: 0 }; });
    209209            var uiSourceCodeCFormatted = createUISourceCode("deobfuscated:c.js", "c.js",
    210210                    function(rawLocation) { return { lineNumber: rawLocation.lineNumber * 2, columnNumber: rawLocation.columnNumber * 2 }; },
    211                     function(lineNumber, columnNumber) { return { scriptId: "c.js", lineNumber: Math.floor(lineNumber / 2), columnNumber: Math.floor(columnNumber / 2) }; });
     211                    function(uiSourceCode, lineNumber) { return { scriptId: "c.js", lineNumber: Math.floor(lineNumber / 2), columnNumber: 0 }; });
    212212
    213213            breakpointManager.uiSourceCodeAdded(uiSourceCodeC);
  • trunk/LayoutTests/inspector/debugger/raw-source-code-expected.txt

    r94760 r96585  
    1616Running: testFormattingWithPendingResource
    1717
     18Running: testCompilerSourceMapping
     19
  • trunk/LayoutTests/inspector/debugger/raw-source-code.html

    r96097 r96585  
    112112            InspectorTest.assertEquals(rawSourceCode, uiSourceCode.rawSourceCode);
    113113            checkUILocation(uiSourceCode, 0, 5, sourceMapping.rawLocationToUILocation(createRawLocation(0, 5)));
    114             checkRawLocation(script, 0, 10, sourceMapping.uiLocationToRawLocation(0, 10));
     114            checkRawLocation(script, 10, 0, sourceMapping.uiLocationToRawLocation(uiSourceCode, 10));
    115115            uiSourceCode.requestContent(didRequestContent);
    116116
     
    175175                rawSourceCode.forceUpdateSourceMapping();
    176176                checkUILocation(uiSourceCode, 1, 20, sourceMapping.rawLocationToUILocation(createRawLocation(1, 20)));
    177                 checkRawLocation(script1, 1, 20, sourceMapping.uiLocationToRawLocation(1, 20));
    178                 checkRawLocation(script2, 6, 2, sourceMapping.uiLocationToRawLocation(6, 2));
     177                checkRawLocation(script1, 1, 0, sourceMapping.uiLocationToRawLocation(uiSourceCode, 1));
     178                checkRawLocation(script2, 6, 0, sourceMapping.uiLocationToRawLocation(uiSourceCode, 6));
    179179
    180180                next();
     
    284284            var uiSourceCode = sourceMapping.uiSourceCode;
    285285            checkUILocation(uiSourceCode, 1, 2, sourceMapping.rawLocationToUILocation(createRawLocation(1, 2)));
    286             checkRawLocation(script, 1, 2, sourceMapping.uiLocationToRawLocation(1, 2));
     286            checkRawLocation(script, 2, 0, sourceMapping.uiLocationToRawLocation(uiSourceCode, 2));
    287287            uiSourceCode.requestContent(didRequestContent);
    288288
     
    302302                var uiSourceCode = sourceMapping.uiSourceCode;
    303303                checkUILocation(uiSourceCode, 2, 4, sourceMapping.rawLocationToUILocation(createRawLocation(1, 2)));
    304                 checkRawLocation(script, 1, 2, sourceMapping.uiLocationToRawLocation(2, 4));
     304                checkRawLocation(script, 1, 0, sourceMapping.uiLocationToRawLocation(uiSourceCode, 2));
    305305                uiSourceCode.requestContent(didRequestFormattedContent);
    306306            }
     
    320320                var uiSourceCode = sourceMapping.uiSourceCode;
    321321                checkUILocation(uiSourceCode, 1, 2, sourceMapping.rawLocationToUILocation(createRawLocation(1, 2)));
    322                 checkRawLocation(script, 1, 2, sourceMapping.uiLocationToRawLocation(1, 2));
     322                checkRawLocation(script, 2, 0, sourceMapping.uiLocationToRawLocation(uiSourceCode, 2));
    323323                uiSourceCode.requestContent(didRequestNotFormattedContent);
    324324            }
     
    349349                var uiSourceCode = sourceMapping.uiSourceCode;
    350350                checkUILocation(uiSourceCode, 2, 4, sourceMapping.rawLocationToUILocation(createRawLocation(1, 2)));
    351                 checkRawLocation(script, 1, 2, sourceMapping.uiLocationToRawLocation(2, 4));
     351                checkRawLocation(script, 1, 0, sourceMapping.uiLocationToRawLocation(uiSourceCode, 2));
     352                next();
     353            }
     354        },
     355
     356        function testCompilerSourceMapping(next)
     357        {
     358            function createCompilerSourceMappingMock()
     359            {
     360                return {
     361                    compiledLocationToSourceLocation: function(lineNumber, columnNumber)
     362                    {
     363                        if (lineNumber < 10)
     364                            return { sourceURL: "source1.js", lineNumber: lineNumber * 2, columnNumber: columnNumber * 2 };
     365                        return { sourceURL: "source2.js", lineNumber: (lineNumber - 10) * 2, columnNumber: columnNumber * 2 };
     366                    },
     367                    sourceLocationToCompiledLocation: function(sourceURL, lineNumber)
     368                    {
     369                        if (sourceURL === "source1.js")
     370                            return { lineNumber: Math.floor(lineNumber / 2), columnNumber: 0 };
     371                        return { lineNumber: Math.floor(lineNumber / 2) + 10, columnNumber: 0 };
     372                    },
     373                    sources: function() { return ["source1.js", "source2.js"]; }
     374                };
     375            }
     376            function createCompilerSourceMappingProviderMock()
     377            {
     378                return {
     379                    loadSourceMapping: function(callback) { callback(createCompilerSourceMappingMock()); },
     380                    loadSourceCode: function(url, callback) { callback("<content of " + url + ">"); }
     381                }
     382            }
     383
     384            var script = createScriptMock("compiled.js", 0, 0, true, "<script source>");
     385            var resource = createPendingResourceMock("script", "<resource content>");
     386            var rawSourceCode = createRawSourceCode(script, resource);
     387            var uiSourceCodeList;
     388
     389            waitForSourceMappingEvent(rawSourceCode, checkMapping);
     390            rawSourceCode.setCompilerSourceMappingProvider(createCompilerSourceMappingProviderMock());
     391            function checkMapping()
     392            {
     393                var sourceMapping = rawSourceCode.sourceMapping;
     394                uiSourceCodeList = sourceMapping.uiSourceCodeList;
     395                var uiSourceCodeByURL = {};
     396                for (var i = 0; i < uiSourceCodeList.length; ++i)
     397                    uiSourceCodeByURL[uiSourceCodeList[i].url] = uiSourceCodeList[i];
     398                checkUILocation(uiSourceCodeByURL["source1.js"], 2, 4, sourceMapping.rawLocationToUILocation(createRawLocation(1, 2)));
     399                checkUILocation(uiSourceCodeByURL["source2.js"], 10, 40, sourceMapping.rawLocationToUILocation(createRawLocation(15, 20)));
     400                checkRawLocation(script, 1, 0, sourceMapping.uiLocationToRawLocation(uiSourceCodeByURL["source1.js"], 2));
     401                checkRawLocation(script, 15, 0, sourceMapping.uiLocationToRawLocation(uiSourceCodeByURL["source2.js"], 10));
     402
     403                uiSourceCodeList[0].requestContent(didRequestContent1);
     404            }
     405
     406            function didRequestContent1(mimeType, content)
     407            {
     408                InspectorTest.assertEquals("text/javascript", mimeType);
     409                InspectorTest.assertEquals("<content of source1.js>", content);
     410                uiSourceCodeList[1].requestContent(didRequestContent2);
     411            }
     412
     413            function didRequestContent2(mimeType, content)
     414            {
     415                InspectorTest.assertEquals("text/javascript", mimeType);
     416                InspectorTest.assertEquals("<content of source2.js>", content);
    352417                next();
    353418            }
  • trunk/Source/WebCore/ChangeLog

    r96584 r96585  
     12011-09-29  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: add compiler source mapping support to RawSourceCode.
     4        https://bugs.webkit.org/show_bug.cgi?id=68891
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * WebCore.gypi:
     9        * WebCore.vcproj/WebCore.vcproj:
     10        * inspector/front-end/BreakpointManager.js:
     11        (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
     12        (WebInspector.BreakpointManager.prototype.setBreakpoint):
     13        (WebInspector.BreakpointManager.prototype._materializeBreakpoint):
     14        * inspector/front-end/CompilerSourceMappingProvider.js: Added.
     15        (WebInspector.CompilerSourceMappingProvider):
     16        (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping):
     17        (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode):
     18        * inspector/front-end/DebuggerPresentationModel.js:
     19        (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
     20        * inspector/front-end/RawSourceCode.js:
     21        (WebInspector.RawSourceCode.prototype.setCompilerSourceMappingProvider):
     22        (WebInspector.RawSourceCode.prototype._resourceFinished):
     23        (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
     24        (WebInspector.RawSourceCode.prototype._updateSourceMapping):
     25        (WebInspector.RawSourceCode.prototype._createSourceMapping.didLoadSourceMapping):
     26        (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
     27        (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
     28        (WebInspector.RawSourceCode.CompilerSourceMapping):
     29        (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.rawLocationToUILocation):
     30        (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation):
     31        (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.get uiSourceCodeList):
     32        (WebInspector.CompilerSourceMappingProvider):
     33        (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping):
     34        (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode):
     35        * inspector/front-end/UISourceCodeContentProviders.js:
     36        (WebInspector.CompilerSourceMappingContentProvider):
     37        (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
     38        * inspector/front-end/WebKit.qrc:
     39        * inspector/front-end/inspector.html:
     40
    1412011-10-04  Pavel Feldman  <pfeldman@google.com>
    242
  • trunk/Source/WebCore/WebCore.gypi

    r96584 r96585  
    62166216            'inspector/front-end/Color.js',
    62176217            'inspector/front-end/CompilerSourceMapping.js',
     6218            'inspector/front-end/CompilerSourceMappingProvider.js',
    62186219            'inspector/front-end/ConsoleMessage.js',
    62196220            'inspector/front-end/ConsoleModel.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r96584 r96585  
    6910269102                                </File>
    6910369103                                <File
     69104                                        RelativePath="..\inspector\front-end\CompilerSourceMappingProvider.js"
     69105                                        >
     69106                                </File>
     69107                                <File
    6910469108                                        RelativePath="..\inspector\front-end\ConsoleMessage.js"
    6910569109                                        >
  • trunk/Source/WebCore/inspector/front-end/BreakpointManager.js

    r96575 r96585  
    5858            var breakpoint = breakpoints[lineNumber];
    5959            breakpoint.uiSourceCode = uiSourceCode;
    60             this._materializeBreakpoint(breakpoint);
     60            this._materializeBreakpoint(breakpoint, uiSourceCode.rawSourceCode.sourceMapping, uiSourceCode);
    6161            if (breakpoint._debuggerLocation)
    6262                this._breakpointDebuggerLocationChanged(breakpoint);
     
    7878        breakpoint.uiSourceCode = uiSourceCode;
    7979        this._addBreakpointToUI(breakpoint);
    80         this._materializeBreakpoint(breakpoint);
     80        this._materializeBreakpoint(breakpoint, uiSourceCode.rawSourceCode.sourceMapping, uiSourceCode);
    8181    },
    8282
     
    9090    },
    9191
    92     _materializeBreakpoint: function(breakpoint)
     92    _materializeBreakpoint: function(breakpoint, sourceMapping, uiSourceCode)
    9393    {
    9494        if (!breakpoint.enabled || breakpoint._materialized)
     
    9696
    9797        breakpoint._materialized = true;
    98         var rawLocation = breakpoint.uiSourceCode.rawSourceCode.sourceMapping.uiLocationToRawLocation(breakpoint.lineNumber, 0);
     98        var rawLocation = sourceMapping.uiLocationToRawLocation(uiSourceCode, breakpoint.lineNumber);
    9999        this._setBreakpointInDebugger(breakpoint, rawLocation);
    100100    },
  • trunk/Source/WebCore/inspector/front-end/ContentProviders.js

    r96579 r96585  
    163163 * @implements {WebInspector.ContentProvider}
    164164 */
     165WebInspector.CompilerSourceMappingContentProvider = function(sourceURL, compilerSourceMappingProvider)
     166{
     167    this._mimeType = "text/javascript";
     168    this._sourceURL = sourceURL;
     169    this._compilerSourceMappingProvider = compilerSourceMappingProvider;
     170};
     171
     172WebInspector.CompilerSourceMappingContentProvider.prototype = {
     173    requestContent: function(callback)
     174    {
     175        function didLoadSourceCode(sourceCode)
     176        {
     177            callback(this._mimeType, sourceCode);
     178        }
     179        this._compilerSourceMappingProvider.loadSourceCode(this._sourceURL, didLoadSourceCode.bind(this));
     180    }
     181}
     182
     183WebInspector.CompilerSourceMappingContentProvider.prototype.__proto__ = WebInspector.ContentProvider.prototype;
     184
     185/**
     186 * @constructor
     187 * @implements {WebInspector.ContentProvider}
     188 */
    165189WebInspector.StaticContentProvider = function(mimeType, content)
    166190{
  • trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

    r96579 r96585  
    284284    continueToLine: function(uiSourceCode, lineNumber)
    285285    {
    286         var rawLocation = uiSourceCode.rawSourceCode.sourceMapping.uiLocationToRawLocation(lineNumber, 0);
     286        // FIXME: use RawSourceCode.uiLocationToRawLocation.
     287        var rawLocation = uiSourceCode.rawSourceCode.sourceMapping.uiLocationToRawLocation(uiSourceCode, lineNumber);
    287288        WebInspector.debuggerModel.continueToLocation(rawLocation);
    288289    },
  • trunk/Source/WebCore/inspector/front-end/RawSourceCode.js

    r96313 r96585  
    7979    },
    8080
     81    setCompilerSourceMappingProvider: function(provider)
     82    {
     83        if (provider)
     84            this._useTemporaryContent = false;
     85        this._compilerSourceMappingProvider = provider;
     86        this._updateSourceMapping();
     87    },
     88
    8189    contentEdited: function()
    8290    {
     
    8694    _resourceFinished: function()
    8795    {
     96        if (this._compilerSourceMappingProvider)
     97            return;
    8898        this._useTemporaryContent = false;
    8999        this._updateSourceMapping();
     
    121131        this._updateNeeded = false;
    122132
    123         var originalContentProvider = this._createContentProvider();
    124         this._createSourceMapping(originalContentProvider, didCreateSourceMapping.bind(this));
    125 
    126         function didCreateSourceMapping(contentProvider, mapping)
     133        this._createSourceMapping(didCreateSourceMapping.bind(this));
     134
     135        function didCreateSourceMapping(sourceMapping)
    127136        {
    128137            this._updatingSourceMapping = false;
    129138            if (!this._updateNeeded)
    130                 this._saveSourceMapping(contentProvider, mapping);
     139                this._saveSourceMapping(sourceMapping);
    131140            else
    132141                this._updateSourceMapping();
     
    143152    },
    144153
    145     _createSourceMapping: function(originalContentProvider, callback)
    146     {
     154    _createSourceMapping: function(callback)
     155    {
     156        if (this._compilerSourceMappingProvider) {
     157            function didLoadSourceMapping(compilerSourceMapping)
     158            {
     159                var uiSourceCodeList = [];
     160                var sourceURLs = compilerSourceMapping.sources();
     161                for (var i = 0; i < sourceURLs.length; ++i) {
     162                    var sourceURL = sourceURLs[i];
     163                    var contentProvider = new WebInspector.CompilerSourceMappingContentProvider(sourceURL, this._compilerSourceMappingProvider);
     164                    var uiSourceCode = new WebInspector.UISourceCode(sourceURL, sourceURL, this.isContentScript, this, contentProvider);
     165                    uiSourceCodeList.push(uiSourceCode);
     166                }
     167                var sourceMapping = new WebInspector.RawSourceCode.CompilerSourceMapping(this, uiSourceCodeList, compilerSourceMapping);
     168                callback(sourceMapping);
     169            }
     170            this._compilerSourceMappingProvider.loadSourceMapping(didLoadSourceMapping.bind(this));
     171            return;
     172        }
     173
     174        var originalContentProvider = this._createContentProvider();
    147175        if (!this._formatted) {
    148176            var uiSourceCode = new WebInspector.UISourceCode(this.id, this.url, this.isContentScript, this, originalContentProvider);
     
    194222    },
    195223
    196     uiLocationToRawLocation: function(lineNumber, columnNumber)
    197     {
    198         var rawLocation = { lineNumber: lineNumber, columnNumber: columnNumber };
     224    uiLocationToRawLocation: function(uiSourceCode, lineNumber)
     225    {
     226        console.assert(uiSourceCode === this._uiSourceCode);
     227        var rawLocation = { lineNumber: lineNumber, columnNumber: 0 };
    199228        rawLocation.scriptId = this._rawSourceCode._scriptForRawLocation(rawLocation.lineNumber, rawLocation.columnNumber).scriptId;
    200229        return rawLocation;
     
    224253    },
    225254
    226     uiLocationToRawLocation: function(lineNumber, columnNumber)
    227     {
    228         var rawLocation = this._mapping.formattedToOriginal({ lineNumber: lineNumber, columnNumber: columnNumber });
     255    uiLocationToRawLocation: function(uiSourceCode, lineNumber)
     256    {
     257        console.assert(uiSourceCode === this._uiSourceCode);
     258        var rawLocation = this._mapping.formattedToOriginal({ lineNumber: lineNumber, columnNumber: 0 });
    229259        rawLocation.scriptId = this._rawSourceCode._scriptForRawLocation(rawLocation.lineNumber, rawLocation.columnNumber).scriptId;
    230260        return rawLocation;
     
    234264    {
    235265        return this._uiSourceCode;
     266    }
     267}
     268
     269/**
     270 * @constructor
     271 */
     272WebInspector.RawSourceCode.CompilerSourceMapping = function(rawSourceCode, uiSourceCodeList, mapping)
     273{
     274    this._rawSourceCode = rawSourceCode;
     275    this._uiSourceCodeList = uiSourceCodeList;
     276    this._mapping = mapping;
     277    this._uiSourceCodeByURL = {};
     278    for (var i = 0; i < uiSourceCodeList.length; ++i)
     279        this._uiSourceCodeByURL[uiSourceCodeList[i].url] = uiSourceCodeList[i];
     280}
     281
     282WebInspector.RawSourceCode.CompilerSourceMapping.prototype = {
     283    rawLocationToUILocation: function(rawLocation)
     284    {
     285        var location = this._mapping.compiledLocationToSourceLocation(rawLocation.lineNumber, rawLocation.columnNumber);
     286        var uiSourceCode = this._uiSourceCodeByURL[location.sourceURL];
     287        return new WebInspector.UILocation(uiSourceCode, location.lineNumber, location.columnNumber);
     288    },
     289
     290    uiLocationToRawLocation: function(uiSourceCode, lineNumber)
     291    {
     292        var rawLocation = this._mapping.sourceLocationToCompiledLocation(uiSourceCode.url, lineNumber);
     293        rawLocation.scriptId = this._rawSourceCode._scriptForRawLocation(rawLocation.lineNumber, rawLocation.columnNumber).scriptId;
     294        return rawLocation;
     295    },
     296
     297    get uiSourceCodeList()
     298    {
     299        return this._uiSourceCodeList;
    236300    }
    237301}
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r96584 r96585  
    1717    <file>Color.js</file>
    1818    <file>CompilerSourceMapping.js</file>
     19    <file>CompilerSourceMappingProvider.js</file>
    1920    <file>ConsoleMessage.js</file>
    2021    <file>ConsoleModel.js</file>
  • trunk/Source/WebCore/inspector/front-end/inspector.html

    r96584 r96585  
    165165    <script type="text/javascript" src="RawSourceCode.js"></script>
    166166    <script type="text/javascript" src="CompilerSourceMapping.js"></script>
     167    <script type="text/javascript" src="CompilerSourceMappingProvider.js"></script>
    167168    <script type="text/javascript" src="DOMAgent.js"></script>
    168169    <script type="text/javascript" src="TimelineAgent.js"></script>
Note: See TracChangeset for help on using the changeset viewer.