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

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

Issue 2571713005: DevTools: untruncate links on console export (Closed)
Patch Set: rebase Created 3 years, 11 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 | « third_party/WebKit/Source/devtools/front_end/console/consoleView.css ('k') | no next file » | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
5 * Copyright (C) 2009 Joseph Pecoraro 5 * Copyright (C) 2009 Joseph Pecoraro
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 event.consume(true); 1954 event.consume(true);
1955 InspectorFrontendHost.openInNewTab(/** @type {string} */ (href)); 1955 InspectorFrontendHost.openInNewTab(/** @type {string} */ (href));
1956 }, false); 1956 }, false);
1957 } else { 1957 } else {
1958 a.classList.add('devtools-link-prevent-click'); 1958 a.classList.add('devtools-link-prevent-click');
1959 } 1959 }
1960 a[UI._externalLinkSymbol] = true; 1960 a[UI._externalLinkSymbol] = true;
1961 } 1961 }
1962 if (linkText !== url) 1962 if (linkText !== url)
1963 a.title = url; 1963 a.title = url;
1964 a.textContent = linkText.trimMiddle(150); 1964 a.textContent = linkText.trimMiddle(UI.MaxLengthForDisplayedURLs);
1965 a.setAttribute('target', '_blank'); 1965 a.setAttribute('target', '_blank');
1966 1966
1967 return a; 1967 return a;
1968 }; 1968 };
1969 1969
1970 UI._externalLinkSymbol = Symbol('UI._externalLink'); 1970 UI._externalLinkSymbol = Symbol('UI._externalLink');
1971 1971
1972 /** 1972 /**
1973 * @implements {UI.ContextMenu.Provider} 1973 * @implements {UI.ContextMenu.Provider}
1974 * @unrestricted 1974 * @unrestricted
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 var fileSelectorElement = createElement('input'); 2025 var fileSelectorElement = createElement('input');
2026 fileSelectorElement.type = 'file'; 2026 fileSelectorElement.type = 'file';
2027 fileSelectorElement.style.display = 'none'; 2027 fileSelectorElement.style.display = 'none';
2028 fileSelectorElement.setAttribute('tabindex', -1); 2028 fileSelectorElement.setAttribute('tabindex', -1);
2029 fileSelectorElement.onchange = onChange; 2029 fileSelectorElement.onchange = onChange;
2030 function onChange(event) { 2030 function onChange(event) {
2031 callback(fileSelectorElement.files[0]); 2031 callback(fileSelectorElement.files[0]);
2032 } 2032 }
2033 return fileSelectorElement; 2033 return fileSelectorElement;
2034 }; 2034 };
2035
2036 /**
2037 * @const
2038 * @type {number}
2039 */
2040 UI.MaxLengthForDisplayedURLs = 150;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/console/consoleView.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698