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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
549 * @param {number=} lineNumber | 549 * @param {number=} lineNumber |
550 * @param {number=} columnNumber | 550 * @param {number=} columnNumber |
551 * @param {string=} classes | 551 * @param {string=} classes |
552 * @param {string=} tooltipText | 552 * @param {string=} tooltipText |
553 * @param {string=} urlDisplayName | 553 * @param {string=} urlDisplayName |
554 * @return {!Element} | 554 * @return {!Element} |
555 */ | 555 */ |
556 WebInspector.linkifyResourceAsNode = function(url, lineNumber, columnNumber, cla sses, tooltipText, urlDisplayName) | 556 WebInspector.linkifyResourceAsNode = function(url, lineNumber, columnNumber, cla sses, tooltipText, urlDisplayName) |
557 { | 557 { |
558 var linkText = urlDisplayName ? urlDisplayName : url ? WebInspector.displayN ameForURL(url) : WebInspector.UIString("(program)"); | 558 var linkText = urlDisplayName ? urlDisplayName : url ? WebInspector.displayN ameForURL(url) : WebInspector.UIString("(program)"); |
559 if (typeof lineNumber === "number") | 559 if (typeof lineNumber === "number" && !isNaN(lineNumber)) |
caseq
2016/03/25 02:00:59
this looks quite unfortunate, how do we get a NaN
horo
2016/03/25 04:51:45
Done.
linkifyLocation() calls linkifier.linkifySc
| |
560 linkText += ":" + (lineNumber + 1); | 560 linkText += ":" + (lineNumber + 1); |
561 var anchor = WebInspector.linkifyURLAsNode(url, linkText, classes, false, to oltipText); | 561 var anchor = WebInspector.linkifyURLAsNode(url, linkText, classes, false, to oltipText); |
562 anchor.lineNumber = lineNumber; | 562 anchor.lineNumber = lineNumber; |
563 anchor.columnNumber = columnNumber; | 563 anchor.columnNumber = columnNumber; |
564 return anchor; | 564 return anchor; |
565 } | 565 } |
566 | 566 |
567 /** | 567 /** |
568 * @param {!WebInspector.NetworkRequest} request | 568 * @param {!WebInspector.NetworkRequest} request |
569 * @return {!Element} | 569 * @return {!Element} |
570 */ | 570 */ |
571 WebInspector.linkifyRequestAsNode = function(request) | 571 WebInspector.linkifyRequestAsNode = function(request) |
572 { | 572 { |
573 var anchor = WebInspector.linkifyURLAsNode(request.url); | 573 var anchor = WebInspector.linkifyURLAsNode(request.url); |
574 anchor.requestId = request.requestId; | 574 anchor.requestId = request.requestId; |
575 return anchor; | 575 return anchor; |
576 } | 576 } |
OLD | NEW |