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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js

Issue 2178263003: [DevTools] Fix function property preview in ObjectPropertySection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/LayoutTests/inspector/console/console-dir-es6-expected.txt ('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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 return nameElement; 970 return nameElement;
971 } 971 }
972 972
973 /** 973 /**
974 * @param {?string=} description 974 * @param {?string=} description
975 * @return {string} valueText 975 * @return {string} valueText
976 */ 976 */
977 WebInspector.ObjectPropertiesSection.valueTextForFunctionDescription = function( description) 977 WebInspector.ObjectPropertiesSection.valueTextForFunctionDescription = function( description)
978 { 978 {
979 var text = description.replace(/^function [gs]et /, "function "); 979 var text = description.replace(/^function [gs]et /, "function ");
980 var matches = /function\s([^)]*)/.exec(text); 980 var matches = /^function\s([^)]*)/.exec(text);
981 if (!matches) { 981 if (!matches) {
982 // process shorthand methods 982 // process shorthand methods
983 matches = /[^(]*(\([^)]*)/.exec(text); 983 matches = /[^(]*(\([^)]*)/.exec(text);
984 } 984 }
985 var match = matches ? matches[1] : null; 985 var match = matches ? matches[1] : null;
986 return match ? match.replace(/\n/g, " ") + ")" : (text || ""); 986 return match ? match.replace(/\n/g, " ") + ")" : (text || "");
987 } 987 }
988 988
989 /** 989 /**
990 * @param {!WebInspector.RemoteObject} value 990 * @param {!WebInspector.RemoteObject} value
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 1260
1261 result = currentName + (result ? "." + result : ""); 1261 result = currentName + (result ? "." + result : "");
1262 current = current.parent; 1262 current = current.parent;
1263 } 1263 }
1264 var treeOutlineId = treeElement.treeOutline[WebInspector.ObjectPropertie sSectionExpandController._treeOutlineId]; 1264 var treeOutlineId = treeElement.treeOutline[WebInspector.ObjectPropertie sSectionExpandController._treeOutlineId];
1265 result = treeOutlineId + (result ? ":" + result : ""); 1265 result = treeOutlineId + (result ? ":" + result : "");
1266 treeElement[WebInspector.ObjectPropertiesSectionExpandController._cached PathSymbol] = result; 1266 treeElement[WebInspector.ObjectPropertiesSectionExpandController._cached PathSymbol] = result;
1267 return result; 1267 return result;
1268 } 1268 }
1269 } 1269 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/console/console-dir-es6-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698