| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 * @override | 84 * @override |
| 85 * @param {!WebInspector.UISourceCode} uiSourceCode | 85 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 86 * @param {number} lineNumber | 86 * @param {number} lineNumber |
| 87 * @param {number} columnNumber | 87 * @param {number} columnNumber |
| 88 * @return {?WebInspector.DebuggerModel.Location} | 88 * @return {?WebInspector.DebuggerModel.Location} |
| 89 */ | 89 */ |
| 90 uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber) | 90 uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber) |
| 91 { | 91 { |
| 92 var scripts = this._scriptsForUISourceCode(uiSourceCode); | 92 var scripts = this._scriptsForUISourceCode(uiSourceCode); |
| 93 console.assert(scripts.length); | 93 console.assert(scripts.length); |
| 94 var script = scripts[0]; | 94 var script = scripts[scripts.length - 1]; |
| 95 if (script.isInlineScriptWithSourceURL()) | 95 if (script.isInlineScriptWithSourceURL()) |
| 96 return this._debuggerModel.createRawLocation(script, lineNumber + sc
ript.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset)
; | 96 return this._debuggerModel.createRawLocation(script, lineNumber + sc
ript.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset)
; |
| 97 return this._debuggerModel.createRawLocation(script, lineNumber, columnN
umber); | 97 return this._debuggerModel.createRawLocation(script, lineNumber, columnN
umber); |
| 98 }, | 98 }, |
| 99 | 99 |
| 100 /** | 100 /** |
| 101 * @param {!WebInspector.Script} script | 101 * @param {!WebInspector.Script} script |
| 102 */ | 102 */ |
| 103 addScript: function(script) | 103 addScript: function(script) |
| 104 { | 104 { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 * @param {!Array.<!WebInspector.Script>} scripts | 274 * @param {!Array.<!WebInspector.Script>} scripts |
| 275 */ | 275 */ |
| 276 WebInspector.ResourceScriptFile = function(resourceScriptMapping, uiSourceCode,
scripts) | 276 WebInspector.ResourceScriptFile = function(resourceScriptMapping, uiSourceCode,
scripts) |
| 277 { | 277 { |
| 278 console.assert(scripts.length); | 278 console.assert(scripts.length); |
| 279 | 279 |
| 280 this._resourceScriptMapping = resourceScriptMapping; | 280 this._resourceScriptMapping = resourceScriptMapping; |
| 281 this._uiSourceCode = uiSourceCode; | 281 this._uiSourceCode = uiSourceCode; |
| 282 | 282 |
| 283 if (this._uiSourceCode.contentType().isScript()) | 283 if (this._uiSourceCode.contentType().isScript()) |
| 284 this._script = scripts[0]; | 284 this._script = scripts[scripts.length - 1]; |
| 285 | 285 |
| 286 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyChanged, this._workingCopyChanged, this); | 286 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyChanged, this._workingCopyChanged, this); |
| 287 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyCommitted, this._workingCopyCommitted, this); | 287 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyCommitted, this._workingCopyCommitted, this); |
| 288 } | 288 } |
| 289 | 289 |
| 290 /** @enum {symbol} */ | 290 /** @enum {symbol} */ |
| 291 WebInspector.ResourceScriptFile.Events = { | 291 WebInspector.ResourceScriptFile.Events = { |
| 292 DidMergeToVM: Symbol("DidMergeToVM"), | 292 DidMergeToVM: Symbol("DidMergeToVM"), |
| 293 DidDivergeFromVM: Symbol("DidDivergeFromVM"), | 293 DidDivergeFromVM: Symbol("DidDivergeFromVM"), |
| 294 } | 294 } |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 /** | 464 /** |
| 465 * @return {boolean} | 465 * @return {boolean} |
| 466 */ | 466 */ |
| 467 hasSourceMapURL: function() | 467 hasSourceMapURL: function() |
| 468 { | 468 { |
| 469 return this._script && !!this._script.sourceMapURL; | 469 return this._script && !!this._script.sourceMapURL; |
| 470 }, | 470 }, |
| 471 | 471 |
| 472 __proto__: WebInspector.Object.prototype | 472 __proto__: WebInspector.Object.prototype |
| 473 } | 473 } |
| OLD | NEW |