| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 * @override | 83 * @override |
| 84 * @param {!WebInspector.UISourceCode} uiSourceCode | 84 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 85 * @param {number} lineNumber | 85 * @param {number} lineNumber |
| 86 * @param {number} columnNumber | 86 * @param {number} columnNumber |
| 87 * @return {?WebInspector.DebuggerModel.Location} | 87 * @return {?WebInspector.DebuggerModel.Location} |
| 88 */ | 88 */ |
| 89 uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber) | 89 uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber) |
| 90 { | 90 { |
| 91 var scripts = this._scriptsForUISourceCode(uiSourceCode); | 91 var scripts = this._scriptsForUISourceCode(uiSourceCode); |
| 92 console.assert(scripts.length); | 92 console.assert(scripts.length); |
| 93 var script = scripts[0]; | 93 var script = scripts[scripts.length - 1]; |
| 94 if (script.isInlineScriptWithSourceURL()) | 94 if (script.isInlineScriptWithSourceURL()) |
| 95 return this._debuggerModel.createRawLocation(script, lineNumber + sc
ript.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset)
; | 95 return this._debuggerModel.createRawLocation(script, lineNumber + sc
ript.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset)
; |
| 96 return this._debuggerModel.createRawLocation(script, lineNumber, columnN
umber); | 96 return this._debuggerModel.createRawLocation(script, lineNumber, columnN
umber); |
| 97 }, | 97 }, |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * @param {!WebInspector.Script} script | 100 * @param {!WebInspector.Script} script |
| 101 */ | 101 */ |
| 102 addScript: function(script) | 102 addScript: function(script) |
| 103 { | 103 { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 */ | 283 */ |
| 284 WebInspector.ResourceScriptFile = function(resourceScriptMapping, uiSourceCode,
scripts) | 284 WebInspector.ResourceScriptFile = function(resourceScriptMapping, uiSourceCode,
scripts) |
| 285 { | 285 { |
| 286 console.assert(scripts.length); | 286 console.assert(scripts.length); |
| 287 | 287 |
| 288 this._resourceScriptMapping = resourceScriptMapping; | 288 this._resourceScriptMapping = resourceScriptMapping; |
| 289 this._uiSourceCode = uiSourceCode; | 289 this._uiSourceCode = uiSourceCode; |
| 290 this._uiSourceCode.forceLoadOnCheckContent(); | 290 this._uiSourceCode.forceLoadOnCheckContent(); |
| 291 | 291 |
| 292 if (this._uiSourceCode.contentType().isScript()) | 292 if (this._uiSourceCode.contentType().isScript()) |
| 293 this._script = scripts[0]; | 293 this._script = scripts[scripts.length - 1]; |
| 294 | 294 |
| 295 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyChanged, this._workingCopyChanged, this); | 295 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyChanged, this._workingCopyChanged, this); |
| 296 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyCommitted, this._workingCopyCommitted, this); | 296 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyCommitted, this._workingCopyCommitted, this); |
| 297 } | 297 } |
| 298 | 298 |
| 299 /** @enum {symbol} */ | 299 /** @enum {symbol} */ |
| 300 WebInspector.ResourceScriptFile.Events = { | 300 WebInspector.ResourceScriptFile.Events = { |
| 301 DidMergeToVM: Symbol("DidMergeToVM"), | 301 DidMergeToVM: Symbol("DidMergeToVM"), |
| 302 DidDivergeFromVM: Symbol("DidDivergeFromVM"), | 302 DidDivergeFromVM: Symbol("DidDivergeFromVM"), |
| 303 } | 303 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 /** | 482 /** |
| 483 * @return {boolean} | 483 * @return {boolean} |
| 484 */ | 484 */ |
| 485 hasSourceMapURL: function() | 485 hasSourceMapURL: function() |
| 486 { | 486 { |
| 487 return this._script && !!this._script.sourceMapURL; | 487 return this._script && !!this._script.sourceMapURL; |
| 488 }, | 488 }, |
| 489 | 489 |
| 490 __proto__: WebInspector.Object.prototype | 490 __proto__: WebInspector.Object.prototype |
| 491 } | 491 } |
| OLD | NEW |