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

Unified Diff: third_party/WebKit/Source/devtools/front_end/object_ui/RemoteObjectPreviewFormatter.js

Issue 2717853002: DevTools: iterate on object preview style (Closed)
Patch Set: rebased Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/object_ui/RemoteObjectPreviewFormatter.js
diff --git a/third_party/WebKit/Source/devtools/front_end/object_ui/RemoteObjectPreviewFormatter.js b/third_party/WebKit/Source/devtools/front_end/object_ui/RemoteObjectPreviewFormatter.js
index dd79f6adeafb22aacbcac21f06311549671b8c6c..632b2de7ff3359dd4d3179d90faea3abdf5f70a3 100644
--- a/third_party/WebKit/Source/devtools/front_end/object_ui/RemoteObjectPreviewFormatter.js
+++ b/third_party/WebKit/Source/devtools/front_end/object_ui/RemoteObjectPreviewFormatter.js
@@ -26,7 +26,9 @@ ObjectUI.RemoteObjectPreviewFormatter = class {
appendObjectPreview(parentElement, preview, isEntry) {
const previewExperimentEnabled = Runtime.experiments.isEnabled('objectPreviews');
var description = preview.description;
- if (preview.type !== 'object' || preview.subtype === 'null' || (previewExperimentEnabled && isEntry)) {
+ var subTypesWithoutValuePreview = new Set(['null', 'regexp', 'error', 'internal#entry']);
+ if (preview.type !== 'object' || subTypesWithoutValuePreview.has(preview.subtype) ||
+ (previewExperimentEnabled && isEntry)) {
parentElement.appendChild(this.renderPropertyPreview(preview.type, preview.subtype, description));
return;
}
@@ -54,8 +56,10 @@ ObjectUI.RemoteObjectPreviewFormatter = class {
this._appendArrayPropertiesPreview(propertiesElement, preview);
else
this._appendObjectPropertiesPreview(propertiesElement, preview);
- if (preview.overflow)
- propertiesElement.createChild('span').textContent = '\u2026';
+ if (preview.overflow) {
+ var ellipsisText = propertiesElement.textContent.length > 1 ? ',\u00a0\u2026' : '\u2026';
+ propertiesElement.createChild('span').textContent = ellipsisText;
+ }
propertiesElement.createTextChild(isArrayOrTypedArray ? ']' : '}');
}
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698