| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @implements {WebInspector.TargetManager.Observer} | 32 * @implements {WebInspector.TargetManager.Observer} |
| 33 * @unrestricted | 33 * @unrestricted |
| 34 */ | 34 */ |
| 35 WebInspector.Linkifier = class { | 35 WebInspector.Linkifier = class { |
| 36 /** | 36 /** |
| 37 * @param {number=} maxLengthForDisplayedURLs | 37 * @param {number=} maxLengthForDisplayedURLs |
| 38 * @param {boolean=} useLinkDecorator |
| 38 */ | 39 */ |
| 39 constructor(maxLengthForDisplayedURLs) { | 40 constructor(maxLengthForDisplayedURLs, useLinkDecorator) { |
| 40 this._maxLength = maxLengthForDisplayedURLs || WebInspector.Linkifier.MaxLen
gthForDisplayedURLs; | 41 this._maxLength = maxLengthForDisplayedURLs || WebInspector.Linkifier.MaxLen
gthForDisplayedURLs; |
| 41 /** @type {!Map<!WebInspector.Target, !Array<!Element>>} */ | 42 /** @type {!Map<!WebInspector.Target, !Array<!Element>>} */ |
| 42 this._anchorsByTarget = new Map(); | 43 this._anchorsByTarget = new Map(); |
| 43 /** @type {!Map<!WebInspector.Target, !WebInspector.LiveLocationPool>} */ | 44 /** @type {!Map<!WebInspector.Target, !WebInspector.LiveLocationPool>} */ |
| 44 this._locationPoolByTarget = new Map(); | 45 this._locationPoolByTarget = new Map(); |
| 46 this._useLinkDecorator = true; |
| 47 WebInspector.Linkifier._instances.add(this); |
| 45 WebInspector.targetManager.observeTargets(this); | 48 WebInspector.targetManager.observeTargets(this); |
| 46 } | 49 } |
| 47 | 50 |
| 48 /** | 51 /** |
| 52 * @param {!WebInspector.LinkDecorator} decorator |
| 53 */ |
| 54 static setLinkDecorator(decorator) { |
| 55 console.assert(!WebInspector.Linkifier._decorator, 'Cannot re-register link
decorator.'); |
| 56 WebInspector.Linkifier._decorator = decorator; |
| 57 decorator.addEventListener(WebInspector.LinkDecorator.Events.LinkIconChanged
, onLinkIconChanged); |
| 58 for (var linkifier of WebInspector.Linkifier._instances) |
| 59 linkifier._updateAllAnchorDecorations(); |
| 60 |
| 61 /** |
| 62 * @param {!WebInspector.Event} event |
| 63 */ |
| 64 function onLinkIconChanged(event) { |
| 65 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */(event.data); |
| 66 var links = uiSourceCode[WebInspector.Linkifier._sourceCodeAnchors] || []; |
| 67 for (var link of links) |
| 68 WebInspector.Linkifier._updateLinkDecorations(link); |
| 69 } |
| 70 } |
| 71 |
| 72 _updateAllAnchorDecorations() { |
| 73 for (var anchors of this._anchorsByTarget.values()) { |
| 74 for (var anchor of anchors) |
| 75 WebInspector.Linkifier._updateLinkDecorations(anchor); |
| 76 } |
| 77 } |
| 78 |
| 79 /** |
| 49 * @param {?WebInspector.Linkifier.LinkHandler} handler | 80 * @param {?WebInspector.Linkifier.LinkHandler} handler |
| 50 */ | 81 */ |
| 51 static setLinkHandler(handler) { | 82 static setLinkHandler(handler) { |
| 52 WebInspector.Linkifier._linkHandler = handler; | 83 WebInspector.Linkifier._linkHandler = handler; |
| 53 } | 84 } |
| 54 | 85 |
| 55 /** | 86 /** |
| 56 * @param {string} url | 87 * @param {string} url |
| 57 * @param {number=} lineNumber | 88 * @param {number=} lineNumber |
| 58 * @return {boolean} | 89 * @return {boolean} |
| (...skipping 15 matching lines...) Expand all Loading... |
| 74 */ | 105 */ |
| 75 static linkifyUsingRevealer(revealable, text, fallbackHref, fallbackLineNumber
, title, classes) { | 106 static linkifyUsingRevealer(revealable, text, fallbackHref, fallbackLineNumber
, title, classes) { |
| 76 var a = createElement('a'); | 107 var a = createElement('a'); |
| 77 a.className = (classes || '') + ' webkit-html-resource-link'; | 108 a.className = (classes || '') + ' webkit-html-resource-link'; |
| 78 a.textContent = text.trimMiddle(WebInspector.Linkifier.MaxLengthForDisplayed
URLs); | 109 a.textContent = text.trimMiddle(WebInspector.Linkifier.MaxLengthForDisplayed
URLs); |
| 79 a.title = title || text; | 110 a.title = title || text; |
| 80 if (fallbackHref) { | 111 if (fallbackHref) { |
| 81 a.href = fallbackHref; | 112 a.href = fallbackHref; |
| 82 a.lineNumber = fallbackLineNumber; | 113 a.lineNumber = fallbackLineNumber; |
| 83 } | 114 } |
| 115 |
| 84 /** | 116 /** |
| 85 * @param {!Event} event | 117 * @param {!Event} event |
| 86 * @this {Object} | 118 * @this {Object} |
| 87 */ | 119 */ |
| 88 function clickHandler(event) { | 120 function clickHandler(event) { |
| 89 event.stopImmediatePropagation(); | 121 event.stopImmediatePropagation(); |
| 90 event.preventDefault(); | 122 event.preventDefault(); |
| 91 if (fallbackHref && WebInspector.Linkifier.handleLink(fallbackHref, fallba
ckLineNumber)) | 123 if (fallbackHref && WebInspector.Linkifier.handleLink(fallbackHref, fallba
ckLineNumber)) |
| 92 return; | 124 return; |
| 93 | 125 |
| 94 WebInspector.Revealer.reveal(this); | 126 WebInspector.Revealer.reveal(this); |
| 95 } | 127 } |
| 96 a.addEventListener('click', clickHandler.bind(revealable), false); | 128 a.addEventListener('click', clickHandler.bind(revealable), false); |
| 97 return a; | 129 return a; |
| 98 } | 130 } |
| 99 | 131 |
| 100 /** | 132 /** |
| 101 * @param {!Element} anchor | 133 * @param {!Element} anchor |
| 102 * @return {?WebInspector.UILocation} uiLocation | 134 * @return {?WebInspector.UILocation} uiLocation |
| 103 */ | 135 */ |
| 104 static uiLocationByAnchor(anchor) { | 136 static uiLocationByAnchor(anchor) { |
| 105 return anchor[WebInspector.Linkifier._uiLocationSymbol]; | 137 return anchor[WebInspector.Linkifier._uiLocationSymbol]; |
| 106 } | 138 } |
| 107 | 139 |
| 108 /** | 140 /** |
| 141 * @param {!Element} anchor |
| 142 * @param {!WebInspector.UILocation} uiLocation |
| 143 */ |
| 144 static _bindUILocation(anchor, uiLocation) { |
| 145 anchor[WebInspector.Linkifier._uiLocationSymbol] = uiLocation; |
| 146 if (!uiLocation) |
| 147 return; |
| 148 var uiSourceCode = uiLocation.uiSourceCode; |
| 149 var sourceCodeAnchors = uiSourceCode[WebInspector.Linkifier._sourceCodeAncho
rs]; |
| 150 if (!sourceCodeAnchors) { |
| 151 sourceCodeAnchors = new Set(); |
| 152 uiSourceCode[WebInspector.Linkifier._sourceCodeAnchors] = sourceCodeAnchor
s; |
| 153 } |
| 154 sourceCodeAnchors.add(anchor); |
| 155 } |
| 156 |
| 157 /** |
| 158 * @param {!Element} anchor |
| 159 */ |
| 160 static _unbindUILocation(anchor) { |
| 161 if (!anchor[WebInspector.Linkifier._uiLocationSymbol]) |
| 162 return; |
| 163 |
| 164 var uiSourceCode = anchor[WebInspector.Linkifier._uiLocationSymbol].uiSource
Code; |
| 165 anchor[WebInspector.Linkifier._uiLocationSymbol] = null; |
| 166 var sourceCodeAnchors = uiSourceCode[WebInspector.Linkifier._sourceCodeAncho
rs]; |
| 167 if (sourceCodeAnchors) |
| 168 sourceCodeAnchors.delete(anchor); |
| 169 } |
| 170 |
| 171 /** |
| 109 * @param {!WebInspector.Target} target | 172 * @param {!WebInspector.Target} target |
| 110 * @param {string} scriptId | 173 * @param {string} scriptId |
| 111 * @param {number} lineNumber | 174 * @param {number} lineNumber |
| 112 * @param {number=} columnNumber | 175 * @param {number=} columnNumber |
| 113 * @return {string} | 176 * @return {string} |
| 114 */ | 177 */ |
| 115 static liveLocationText(target, scriptId, lineNumber, columnNumber) { | 178 static liveLocationText(target, scriptId, lineNumber, columnNumber) { |
| 116 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); | 179 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
| 117 if (!debuggerModel) | 180 if (!debuggerModel) |
| 118 return ''; | 181 return ''; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 138 /** | 201 /** |
| 139 * @override | 202 * @override |
| 140 * @param {!WebInspector.Target} target | 203 * @param {!WebInspector.Target} target |
| 141 */ | 204 */ |
| 142 targetRemoved(target) { | 205 targetRemoved(target) { |
| 143 var locationPool = /** @type {!WebInspector.LiveLocationPool} */ (this._loca
tionPoolByTarget.remove(target)); | 206 var locationPool = /** @type {!WebInspector.LiveLocationPool} */ (this._loca
tionPoolByTarget.remove(target)); |
| 144 locationPool.disposeAll(); | 207 locationPool.disposeAll(); |
| 145 var anchors = this._anchorsByTarget.remove(target); | 208 var anchors = this._anchorsByTarget.remove(target); |
| 146 for (var anchor of anchors) { | 209 for (var anchor of anchors) { |
| 147 delete anchor[WebInspector.Linkifier._liveLocationSymbol]; | 210 delete anchor[WebInspector.Linkifier._liveLocationSymbol]; |
| 211 WebInspector.Linkifier._unbindUILocation(anchor); |
| 148 var fallbackAnchor = anchor[WebInspector.Linkifier._fallbackAnchorSymbol]; | 212 var fallbackAnchor = anchor[WebInspector.Linkifier._fallbackAnchorSymbol]; |
| 149 if (fallbackAnchor) { | 213 if (fallbackAnchor) { |
| 150 anchor.href = fallbackAnchor.href; | 214 anchor.href = fallbackAnchor.href; |
| 151 anchor.lineNumber = fallbackAnchor.lineNumber; | 215 anchor.lineNumber = fallbackAnchor.lineNumber; |
| 152 anchor.title = fallbackAnchor.title; | 216 anchor.title = fallbackAnchor.title; |
| 153 anchor.className = fallbackAnchor.className; | 217 anchor.className = fallbackAnchor.className; |
| 154 anchor.textContent = fallbackAnchor.textContent; | 218 anchor.textContent = fallbackAnchor.textContent; |
| 155 delete anchor[WebInspector.Linkifier._fallbackAnchorSymbol]; | 219 delete anchor[WebInspector.Linkifier._fallbackAnchorSymbol]; |
| 156 } | 220 } |
| 157 } | 221 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 anchors.push(anchor); | 338 anchors.push(anchor); |
| 275 anchor[WebInspector.Linkifier._liveLocationSymbol] = liveLocation; | 339 anchor[WebInspector.Linkifier._liveLocationSymbol] = liveLocation; |
| 276 return anchor; | 340 return anchor; |
| 277 } | 341 } |
| 278 | 342 |
| 279 /** | 343 /** |
| 280 * @param {!WebInspector.Target} target | 344 * @param {!WebInspector.Target} target |
| 281 * @param {!Element} anchor | 345 * @param {!Element} anchor |
| 282 */ | 346 */ |
| 283 disposeAnchor(target, anchor) { | 347 disposeAnchor(target, anchor) { |
| 284 delete anchor[WebInspector.Linkifier._uiLocationSymbol]; | 348 WebInspector.Linkifier._unbindUILocation(anchor); |
| 285 delete anchor[WebInspector.Linkifier._fallbackAnchorSymbol]; | 349 delete anchor[WebInspector.Linkifier._fallbackAnchorSymbol]; |
| 286 var liveLocation = anchor[WebInspector.Linkifier._liveLocationSymbol]; | 350 var liveLocation = anchor[WebInspector.Linkifier._liveLocationSymbol]; |
| 287 if (liveLocation) | 351 if (liveLocation) |
| 288 liveLocation.dispose(); | 352 liveLocation.dispose(); |
| 289 delete anchor[WebInspector.Linkifier._liveLocationSymbol]; | 353 delete anchor[WebInspector.Linkifier._liveLocationSymbol]; |
| 290 } | 354 } |
| 291 | 355 |
| 292 /** | 356 /** |
| 293 * @param {string=} classes | 357 * @param {string=} classes |
| 294 * @return {!Element} | 358 * @return {!Element} |
| 295 */ | 359 */ |
| 296 _createAnchor(classes) { | 360 _createAnchor(classes) { |
| 297 var anchor = createElement('a'); | 361 var anchor = createElement('a'); |
| 362 if (this._useLinkDecorator) |
| 363 anchor[WebInspector.Linkifier._enableDecoratorSymbol] = true; |
| 298 anchor.className = (classes || '') + ' webkit-html-resource-link'; | 364 anchor.className = (classes || '') + ' webkit-html-resource-link'; |
| 299 | 365 |
| 300 /** | 366 /** |
| 301 * @param {!Event} event | 367 * @param {!Event} event |
| 302 */ | 368 */ |
| 303 function clickHandler(event) { | 369 function clickHandler(event) { |
| 304 var uiLocation = anchor[WebInspector.Linkifier._uiLocationSymbol]; | 370 var uiLocation = anchor[WebInspector.Linkifier._uiLocationSymbol]; |
| 305 if (!uiLocation) | 371 if (!uiLocation) |
| 306 return; | 372 return; |
| 307 | 373 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 318 for (var target of this._anchorsByTarget.keysArray()) { | 384 for (var target of this._anchorsByTarget.keysArray()) { |
| 319 this.targetRemoved(target); | 385 this.targetRemoved(target); |
| 320 this.targetAdded(target); | 386 this.targetAdded(target); |
| 321 } | 387 } |
| 322 } | 388 } |
| 323 | 389 |
| 324 dispose() { | 390 dispose() { |
| 325 for (var target of this._anchorsByTarget.keysArray()) | 391 for (var target of this._anchorsByTarget.keysArray()) |
| 326 this.targetRemoved(target); | 392 this.targetRemoved(target); |
| 327 WebInspector.targetManager.unobserveTargets(this); | 393 WebInspector.targetManager.unobserveTargets(this); |
| 394 WebInspector.Linkifier._instances.delete(this); |
| 328 } | 395 } |
| 329 | 396 |
| 330 /** | 397 /** |
| 331 * @param {!Element} anchor | 398 * @param {!Element} anchor |
| 332 * @param {!WebInspector.LiveLocation} liveLocation | 399 * @param {!WebInspector.LiveLocation} liveLocation |
| 333 */ | 400 */ |
| 334 _updateAnchor(anchor, liveLocation) { | 401 _updateAnchor(anchor, liveLocation) { |
| 402 WebInspector.Linkifier._unbindUILocation(anchor); |
| 335 var uiLocation = liveLocation.uiLocation(); | 403 var uiLocation = liveLocation.uiLocation(); |
| 336 if (!uiLocation) | 404 if (!uiLocation) |
| 337 return; | 405 return; |
| 338 anchor[WebInspector.Linkifier._uiLocationSymbol] = uiLocation; | |
| 339 this._formatLiveAnchor(anchor, uiLocation, liveLocation.isBlackboxed()); | |
| 340 } | |
| 341 | 406 |
| 342 /** | 407 WebInspector.Linkifier._bindUILocation(anchor, uiLocation); |
| 343 * @param {!Element} anchor | |
| 344 * @param {!WebInspector.UILocation} uiLocation | |
| 345 * @param {boolean} isBlackboxed | |
| 346 */ | |
| 347 _formatLiveAnchor(anchor, uiLocation, isBlackboxed) { | |
| 348 var text = uiLocation.linkText(); | 408 var text = uiLocation.linkText(); |
| 349 text = text.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, '$1\u2026'); | 409 text = text.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, '$1\u2026'); |
| 350 if (this._maxLength) | 410 if (this._maxLength) |
| 351 text = text.trimMiddle(this._maxLength); | 411 text = text.trimMiddle(this._maxLength); |
| 352 anchor.textContent = text; | 412 anchor.textContent = text; |
| 353 | 413 |
| 354 var titleText = uiLocation.uiSourceCode.url(); | 414 var titleText = uiLocation.uiSourceCode.url(); |
| 355 if (typeof uiLocation.lineNumber === 'number') | 415 if (typeof uiLocation.lineNumber === 'number') |
| 356 titleText += ':' + (uiLocation.lineNumber + 1); | 416 titleText += ':' + (uiLocation.lineNumber + 1); |
| 357 anchor.title = titleText; | 417 anchor.title = titleText; |
| 418 anchor.classList.toggle('webkit-html-blackbox-link', liveLocation.isBlackbox
ed()); |
| 419 WebInspector.Linkifier._updateLinkDecorations(anchor); |
| 420 } |
| 358 | 421 |
| 359 anchor.classList.toggle('webkit-html-blackbox-link', isBlackboxed); | 422 /** |
| 423 * @param {!Element} anchor |
| 424 */ |
| 425 static _updateLinkDecorations(anchor) { |
| 426 if (!anchor[WebInspector.Linkifier._enableDecoratorSymbol]) |
| 427 return; |
| 428 var uiLocation = anchor[WebInspector.Linkifier._uiLocationSymbol]; |
| 429 if (!WebInspector.Linkifier._decorator || !uiLocation) |
| 430 return; |
| 431 var icon = anchor[WebInspector.Linkifier._iconSymbol]; |
| 432 if (icon) |
| 433 icon.remove(); |
| 434 icon = WebInspector.Linkifier._decorator.linkIcon(uiLocation.uiSourceCode); |
| 435 if (icon) { |
| 436 icon.style.setProperty('margin-right', '2px'); |
| 437 anchor.insertBefore(icon, anchor.firstChild); |
| 438 } |
| 439 anchor[WebInspector.Linkifier._iconSymbol] = icon; |
| 360 } | 440 } |
| 361 }; | 441 }; |
| 362 | 442 |
| 443 /** @type {!Set<!WebInspector.Linkifier>} */ |
| 444 WebInspector.Linkifier._instances = new Set(); |
| 445 /** @type {?WebInspector.LinkDecorator} */ |
| 446 WebInspector.Linkifier._decorator = null; |
| 447 |
| 448 WebInspector.Linkifier._iconSymbol = Symbol('Linkifier.iconSymbol'); |
| 449 WebInspector.Linkifier._enableDecoratorSymbol = Symbol('Linkifier.enableIconsSym
bol'); |
| 450 WebInspector.Linkifier._sourceCodeAnchors = Symbol('Linkifier.anchors'); |
| 363 WebInspector.Linkifier._uiLocationSymbol = Symbol('uiLocation'); | 451 WebInspector.Linkifier._uiLocationSymbol = Symbol('uiLocation'); |
| 364 WebInspector.Linkifier._fallbackAnchorSymbol = Symbol('fallbackAnchor'); | 452 WebInspector.Linkifier._fallbackAnchorSymbol = Symbol('fallbackAnchor'); |
| 365 WebInspector.Linkifier._liveLocationSymbol = Symbol('liveLocation'); | 453 WebInspector.Linkifier._liveLocationSymbol = Symbol('liveLocation'); |
| 366 | 454 |
| 367 /** | 455 /** |
| 368 * The maximum number of characters to display in a URL. | 456 * The maximum number of characters to display in a URL. |
| 369 * @const | 457 * @const |
| 370 * @type {number} | 458 * @type {number} |
| 371 */ | 459 */ |
| 372 WebInspector.Linkifier.MaxLengthForDisplayedURLs = 150; | 460 WebInspector.Linkifier.MaxLengthForDisplayedURLs = 150; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 385 | 473 |
| 386 WebInspector.Linkifier.LinkHandler.prototype = { | 474 WebInspector.Linkifier.LinkHandler.prototype = { |
| 387 /** | 475 /** |
| 388 * @param {string} url | 476 * @param {string} url |
| 389 * @param {number=} lineNumber | 477 * @param {number=} lineNumber |
| 390 * @return {boolean} | 478 * @return {boolean} |
| 391 */ | 479 */ |
| 392 handleLink: function(url, lineNumber) {} | 480 handleLink: function(url, lineNumber) {} |
| 393 }; | 481 }; |
| 394 | 482 |
| 483 /** |
| 484 * @extends {WebInspector.EventTarget} |
| 485 * @interface |
| 486 */ |
| 487 WebInspector.LinkDecorator = function() {}; |
| 488 |
| 489 WebInspector.LinkDecorator.prototype = { |
| 490 /** |
| 491 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 492 * @return {?WebInspector.Icon} |
| 493 */ |
| 494 linkIcon: function(uiSourceCode) {} |
| 495 }; |
| 496 |
| 497 WebInspector.LinkDecorator.Events = { |
| 498 LinkIconChanged: Symbol('LinkIconChanged') |
| 499 }; |
| 395 | 500 |
| 396 /** | 501 /** |
| 397 * @param {string} string | 502 * @param {string} string |
| 398 * @param {function(string,string,number=,number=):!Node} linkifier | 503 * @param {function(string,string,number=,number=):!Node} linkifier |
| 399 * @return {!DocumentFragment} | 504 * @return {!DocumentFragment} |
| 400 */ | 505 */ |
| 401 WebInspector.linkifyStringAsFragmentWithCustomLinkifier = function(string, linki
fier) { | 506 WebInspector.linkifyStringAsFragmentWithCustomLinkifier = function(string, linki
fier) { |
| 402 var container = createDocumentFragment(); | 507 var container = createDocumentFragment(); |
| 403 var linkStringRegEx = | 508 var linkStringRegEx = |
| 404 /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/|data:|www\.)[\w$\-_+*'=\|\/\\(){}[\]^%
@&#~,:;.!?]{2,}[\w$\-_+*=\|\/\\({^%@&#~]/; | 509 /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/|data:|www\.)[\w$\-_+*'=\|\/\\(){}[\]^%
@&#~,:;.!?]{2,}[\w$\-_+*=\|\/\\({^%@&#~]/; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 | 592 |
| 488 /** | 593 /** |
| 489 * @param {!WebInspector.NetworkRequest} request | 594 * @param {!WebInspector.NetworkRequest} request |
| 490 * @return {!Element} | 595 * @return {!Element} |
| 491 */ | 596 */ |
| 492 WebInspector.linkifyRequestAsNode = function(request) { | 597 WebInspector.linkifyRequestAsNode = function(request) { |
| 493 var anchor = WebInspector.linkifyURLAsNode(request.url); | 598 var anchor = WebInspector.linkifyURLAsNode(request.url); |
| 494 anchor.requestId = request.requestId; | 599 anchor.requestId = request.requestId; |
| 495 return anchor; | 600 return anchor; |
| 496 }; | 601 }; |
| OLD | NEW |