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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 2571713005: DevTools: untruncate links on console export (Closed)
Patch Set: test desc Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index 3a62614d4739e76dd0048d18c889ffe9fd4d1fb8..229eadba23221f90bccbc3703765c4110567c649 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -1940,7 +1940,7 @@ UI.createExternalLink = function(url, linkText, className, preventClick) {
}
if (linkText !== url)
a.title = url;
- a.textContent = linkText.trimMiddle(150);
+ a.textContent = linkText.trimMiddle(UI.MaxLengthForDisplayedURLs);
a.setAttribute('target', '_blank');
return a;
@@ -1995,3 +1995,10 @@ UI.loadImage = function(url) {
/** @type {!UI.ThemeSupport} */
UI.themeSupport;
+
+/**
+ * The maximum number of characters to display in a URL.
dgozman 2017/01/10 01:03:30 Let's remove the comment.
luoe 2017/01/10 22:21:44 Done.
+ * @const
+ * @type {number}
+ */
+UI.MaxLengthForDisplayedURLs = 150;

Powered by Google App Engine
This is Rietveld 408576698