| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 * @implements {WebInspector.ContentProvider} | 29 * @implements {WebInspector.ContentProvider} |
| 30 * @param {!WebInspector.DebuggerModel} debuggerModel | 30 * @param {!WebInspector.DebuggerModel} debuggerModel |
| 31 * @param {string} scriptId | 31 * @param {string} scriptId |
| 32 * @param {string} sourceURL | 32 * @param {string} sourceURL |
| 33 * @param {number} startLine | 33 * @param {number} startLine |
| 34 * @param {number} startColumn | 34 * @param {number} startColumn |
| 35 * @param {number} endLine | 35 * @param {number} endLine |
| 36 * @param {number} endColumn | 36 * @param {number} endColumn |
| 37 * @param {boolean} isContentScript | 37 * @param {boolean} isContentScript |
| 38 * @param {boolean} isInternalScript | 38 * @param {boolean} isInternalScript |
| 39 * @param {boolean} isLiveEdit |
| 39 * @param {string=} sourceMapURL | 40 * @param {string=} sourceMapURL |
| 40 * @param {boolean=} hasSourceURL | 41 * @param {boolean=} hasSourceURL |
| 41 */ | 42 */ |
| 42 WebInspector.Script = function(debuggerModel, scriptId, sourceURL, startLine, st
artColumn, endLine, endColumn, isContentScript, isInternalScript, sourceMapURL,
hasSourceURL) | 43 WebInspector.Script = function(debuggerModel, scriptId, sourceURL, startLine, st
artColumn, endLine, endColumn, isContentScript, isInternalScript, isLiveEdit, so
urceMapURL, hasSourceURL) |
| 43 { | 44 { |
| 44 WebInspector.SDKObject.call(this, debuggerModel.target()); | 45 WebInspector.SDKObject.call(this, debuggerModel.target()); |
| 45 this.debuggerModel = debuggerModel; | 46 this.debuggerModel = debuggerModel; |
| 46 this.scriptId = scriptId; | 47 this.scriptId = scriptId; |
| 47 this.sourceURL = sourceURL; | 48 this.sourceURL = sourceURL; |
| 48 this.lineOffset = startLine; | 49 this.lineOffset = startLine; |
| 49 this.columnOffset = startColumn; | 50 this.columnOffset = startColumn; |
| 50 this.endLine = endLine; | 51 this.endLine = endLine; |
| 51 this.endColumn = endColumn; | 52 this.endColumn = endColumn; |
| 52 this._isContentScript = isContentScript; | 53 this._isContentScript = isContentScript; |
| 53 this._isInternalScript = isInternalScript; | 54 this._isInternalScript = isInternalScript; |
| 55 this._isLiveEdit = isLiveEdit; |
| 54 this.sourceMapURL = sourceMapURL; | 56 this.sourceMapURL = sourceMapURL; |
| 55 this.hasSourceURL = hasSourceURL; | 57 this.hasSourceURL = hasSourceURL; |
| 56 } | 58 } |
| 57 | 59 |
| 58 WebInspector.Script.Events = { | 60 WebInspector.Script.Events = { |
| 59 ScriptEdited: "ScriptEdited", | 61 ScriptEdited: "ScriptEdited", |
| 60 SourceMapURLAdded: "SourceMapURLAdded", | 62 SourceMapURLAdded: "SourceMapURLAdded", |
| 61 } | 63 } |
| 62 | 64 |
| 63 WebInspector.Script.sourceURLRegex = /\n[\040\t]*\/\/[@#]\ssourceURL=\s*(\S*?)\s
*$/mg; | 65 WebInspector.Script.sourceURLRegex = /\n[\040\t]*\/\/[@#]\ssourceURL=\s*(\S*?)\s
*$/mg; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 83 | 85 |
| 84 /** | 86 /** |
| 85 * @return {boolean} | 87 * @return {boolean} |
| 86 */ | 88 */ |
| 87 isInternalScript: function() | 89 isInternalScript: function() |
| 88 { | 90 { |
| 89 return this._isInternalScript; | 91 return this._isInternalScript; |
| 90 }, | 92 }, |
| 91 | 93 |
| 92 /** | 94 /** |
| 95 * @return {boolean} |
| 96 */ |
| 97 isLiveEdit: function() |
| 98 { |
| 99 return this._isLiveEdit; |
| 100 }, |
| 101 |
| 102 /** |
| 93 * @override | 103 * @override |
| 94 * @return {string} | 104 * @return {string} |
| 95 */ | 105 */ |
| 96 contentURL: function() | 106 contentURL: function() |
| 97 { | 107 { |
| 98 return this.sourceURL; | 108 return this.sourceURL; |
| 99 }, | 109 }, |
| 100 | 110 |
| 101 /** | 111 /** |
| 102 * @override | 112 * @override |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 /** | 265 /** |
| 256 * @return {boolean} | 266 * @return {boolean} |
| 257 */ | 267 */ |
| 258 isInlineScriptWithSourceURL: function() | 268 isInlineScriptWithSourceURL: function() |
| 259 { | 269 { |
| 260 return !!this.hasSourceURL && this.isInlineScript(); | 270 return !!this.hasSourceURL && this.isInlineScript(); |
| 261 }, | 271 }, |
| 262 | 272 |
| 263 __proto__: WebInspector.SDKObject.prototype | 273 __proto__: WebInspector.SDKObject.prototype |
| 264 } | 274 } |
| OLD | NEW |