Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: Source/devtools/front_end/audits/AuditFormatters.js

Issue 659573005: DevTools: NetworkPanel: show link where resource timing is explained. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/components/ShortcutsScreen.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 }, 70 },
71 71
72 /** 72 /**
73 * @param {string} url 73 * @param {string} url
74 * @param {string=} displayText 74 * @param {string=} displayText
75 * @param {boolean=} allowExternalNavigation 75 * @param {boolean=} allowExternalNavigation
76 * @return {!Element} 76 * @return {!Element}
77 */ 77 */
78 url: function(url, displayText, allowExternalNavigation) 78 url: function(url, displayText, allowExternalNavigation)
79 { 79 {
80 var a = createElement("a"); 80 return WebInspector.createAnchor(url, displayText, !allowExternalNavigat ion);
81 a.href = sanitizeHref(url);
82 a.title = url;
83 a.textContent = displayText || url;
84 if (allowExternalNavigation)
85 a.target = "_blank";
86 return a;
87 }, 81 },
88 82
89 /** 83 /**
90 * @param {string} url 84 * @param {string} url
91 * @param {number=} line 85 * @param {number=} line
92 * @return {!Element} 86 * @return {!Element}
93 */ 87 */
94 resourceLink: function(url, line) 88 resourceLink: function(url, line)
95 { 89 {
96 // FIXME: use WebInspector.Linkifier 90 // FIXME: use WebInspector.Linkifier
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 { 138 {
145 if (value instanceof Array) 139 if (value instanceof Array)
146 return value.map(this.partiallyApply.bind(this, formatters, thisArgu ment)); 140 return value.map(this.partiallyApply.bind(this, formatters, thisArgu ment));
147 if (typeof value === "object" && typeof formatters[value.type] === "func tion" && value.arguments) 141 if (typeof value === "object" && typeof formatters[value.type] === "func tion" && value.arguments)
148 return formatters[value.type].apply(thisArgument, value.arguments); 142 return formatters[value.type].apply(thisArgument, value.arguments);
149 return value; 143 return value;
150 } 144 }
151 } 145 }
152 146
153 WebInspector.auditFormatters = new WebInspector.AuditFormatters(); 147 WebInspector.auditFormatters = new WebInspector.AuditFormatters();
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/components/ShortcutsScreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698