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

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

Issue 2866363003: DevTools: format keys in object previews using sans serif. (Closed)
Patch Set: removed the test 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
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 31a94d7e43cb604776e67cdd94c5242de2a289bd..dd79f6adeafb22aacbcac21f06311549671b8c6c 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
@@ -46,16 +46,17 @@ ObjectUI.RemoteObjectPreviewFormatter = class {
parentElement.createChild('span', 'object-description').textContent = text + ' ';
}
- parentElement.createTextChild(isArrayOrTypedArray ? '[' : '{');
+ var propertiesElement = parentElement.createChild('span', 'object-properties-preview source-code');
+ propertiesElement.createTextChild(isArrayOrTypedArray ? '[' : '{');
if (preview.entries)
- this._appendEntriesPreview(parentElement, preview);
+ this._appendEntriesPreview(propertiesElement, preview);
else if (isArrayOrTypedArray)
- this._appendArrayPropertiesPreview(parentElement, preview);
+ this._appendArrayPropertiesPreview(propertiesElement, preview);
else
- this._appendObjectPropertiesPreview(parentElement, preview);
+ this._appendObjectPropertiesPreview(propertiesElement, preview);
if (preview.overflow)
- parentElement.createChild('span').textContent = '\u2026';
- parentElement.createTextChild(isArrayOrTypedArray ? ']' : '}');
+ propertiesElement.createChild('span').textContent = '\u2026';
+ propertiesElement.createTextChild(isArrayOrTypedArray ? ']' : '}');
}
/**
@@ -222,7 +223,7 @@ ObjectUI.RemoteObjectPreviewFormatter = class {
}
if (type === 'function') {
- span.textContent = 'function';
+ span.textContent = '\u0192';
return span;
}
@@ -237,7 +238,10 @@ ObjectUI.RemoteObjectPreviewFormatter = class {
}
if (type === 'object' && !subtype) {
- span.textContent = this._abbreviateFullQualifiedClassName(description);
+ var preview = this._abbreviateFullQualifiedClassName(description);
+ if (preview === 'Object')
+ preview = '{\u2026}';
+ span.textContent = preview;
span.title = description;
return span;
}

Powered by Google App Engine
This is Rietveld 408576698