Changeset 245165 in webkit
- Timestamp:
- May 9, 2019 5:12:31 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r245060 r245165 1 2019-05-09 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith') 4 https://bugs.webkit.org/show_bug.cgi?id=196662 5 <rdar://problem/49659633> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/ConsoleMessageView.js: 10 (WI.ConsoleMessageView.prototype._appendLocationLink): 11 (WI.ConsoleMessageView.prototype._linkifyLocation): Deleted. 12 13 * UserInterface/Base/Main.js: 14 (WI.linkifyLocation): 15 (WI.linkifySourceCode): Added. 16 Split the logic into two functions, as there's no need to re-fetch the `SourceCode` from a 17 given url if you already have the `SourceCode` in the caller. 18 1 19 2019-05-08 Ryan Haddad <ryanhaddad@apple.com> 2 20 -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r244318 r245165 2850 2850 { 2851 2851 var sourceCode = WI.sourceCodeForURL(url); 2852 2853 if (!sourceCode) { 2854 var anchor = document.createElement("a"); 2855 anchor.href = url; 2856 anchor.lineNumber = sourceCodePosition.lineNumber; 2857 if (options.className) 2858 anchor.className = options.className; 2859 anchor.append(WI.displayNameForURL(url) + ":" + sourceCodePosition.lineNumber); 2860 return anchor; 2861 } 2862 2852 if (sourceCode) 2853 return WI.linkifySourceCode(sourceCode); 2854 2855 var anchor = document.createElement("a"); 2856 anchor.href = url; 2857 anchor.lineNumber = sourceCodePosition.lineNumber; 2858 if (options.className) 2859 anchor.className = options.className; 2860 anchor.append(WI.displayNameForURL(url) + ":" + sourceCodePosition.lineNumber); 2861 return anchor; 2862 }; 2863 2864 WI.linkifySourceCode = function(sourceCode, sourceCodePosition, options = {}) 2865 { 2863 2866 let sourceCodeLocation = sourceCode.createSourceCodeLocation(sourceCodePosition.lineNumber, sourceCodePosition.columnNumber); 2864 2867 let linkElement = WI.createSourceCodeLocationLink(sourceCodeLocation, { -
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
r243355 r245165 377 377 return; 378 378 379 var link = this._linkifyLocation(result.sourceCode.sourceURL || result.sourceCode.url, result.lineNumber, result.columnNumber); 379 let link = WI.linkifySourceCode(result.sourceCode, new WI.SourceCodePosition(result.lineNumber, result.columnNumber), { 380 className: "console-message-url", 381 ignoreNetworkTab: true, 382 ignoreSearchTab: true, 383 }); 380 384 link.classList.add("console-message-location"); 381 385 … … 767 771 } 768 772 769 _linkifyLocation(url, lineNumber, columnNumber)770 {771 const options = {772 className: "console-message-url",773 ignoreNetworkTab: true,774 ignoreSearchTab: true,775 };776 return WI.linkifyLocation(url, new WI.SourceCodePosition(lineNumber, columnNumber), options);777 }778 779 773 _userProvidedColumnNames(columnNamesArgument) 780 774 {
Note: See TracChangeset
for help on using the changeset viewer.