| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 * @param {!WebInspector.UILocation} uiLocation | 307 * @param {!WebInspector.UILocation} uiLocation |
| 308 */ | 308 */ |
| 309 _updateAnchor: function(anchor, uiLocation) | 309 _updateAnchor: function(anchor, uiLocation) |
| 310 { | 310 { |
| 311 anchor[WebInspector.Linkifier._uiLocationSymbol] = uiLocation; | 311 anchor[WebInspector.Linkifier._uiLocationSymbol] = uiLocation; |
| 312 this._formatter.formatLiveAnchor(anchor, uiLocation); | 312 this._formatter.formatLiveAnchor(anchor, uiLocation); |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 | 315 |
| 316 /** | 316 /** |
| 317 * @param {!Element} anchor |
| 318 * @return {?WebInspector.UILocation} uiLocation |
| 319 */ |
| 320 WebInspector.Linkifier.uiLocationByAnchor = function(anchor) |
| 321 { |
| 322 return anchor[WebInspector.Linkifier._uiLocationSymbol]; |
| 323 } |
| 324 |
| 325 /** |
| 317 * @constructor | 326 * @constructor |
| 318 * @implements {WebInspector.LinkifierFormatter} | 327 * @implements {WebInspector.LinkifierFormatter} |
| 319 * @param {number=} maxLength | 328 * @param {number=} maxLength |
| 320 */ | 329 */ |
| 321 WebInspector.Linkifier.DefaultFormatter = function(maxLength) | 330 WebInspector.Linkifier.DefaultFormatter = function(maxLength) |
| 322 { | 331 { |
| 323 this._maxLength = maxLength; | 332 this._maxLength = maxLength; |
| 324 } | 333 } |
| 325 | 334 |
| 326 WebInspector.Linkifier.DefaultFormatter.prototype = { | 335 WebInspector.Linkifier.DefaultFormatter.prototype = { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); | 414 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
| 406 if (!debuggerModel) | 415 if (!debuggerModel) |
| 407 return ""; | 416 return ""; |
| 408 var script = debuggerModel.scriptForId(scriptId); | 417 var script = debuggerModel.scriptForId(scriptId); |
| 409 if (!script) | 418 if (!script) |
| 410 return ""; | 419 return ""; |
| 411 var location = /** @type {!WebInspector.DebuggerModel.Location} */ (debugger
Model.createRawLocation(script, lineNumber, columnNumber || 0)); | 420 var location = /** @type {!WebInspector.DebuggerModel.Location} */ (debugger
Model.createRawLocation(script, lineNumber, columnNumber || 0)); |
| 412 var uiLocation = /** @type {!WebInspector.UILocation} */ (WebInspector.debug
gerWorkspaceBinding.rawLocationToUILocation(location)); | 421 var uiLocation = /** @type {!WebInspector.UILocation} */ (WebInspector.debug
gerWorkspaceBinding.rawLocationToUILocation(location)); |
| 413 return uiLocation.linkText(); | 422 return uiLocation.linkText(); |
| 414 } | 423 } |
| OLD | NEW |