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

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

Issue 2521513006: DevTools: allow array previews to show static array getters (Closed)
Patch Set: Rebaseline 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
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-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/components/RemoteObjectPreviewFormatter.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js b/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
index 1fc9f74bbb4cc8793bd489b207c2b906132e84b8..5351fe2037f18496cf362ccb8f4f4ad16e6eb9b0 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
@@ -49,7 +49,7 @@ Components.RemoteObjectPreviewFormatter = class {
* @param {!Protocol.Runtime.ObjectPreview} preview
*/
_appendObjectPropertiesPreview(parentElement, preview) {
- var properties = preview.properties.slice().stableSort(compareFunctionsLast);
+ var properties = preview.properties.filter(p => p.type !== 'accessor').stableSort(compareFunctionsLast);
/**
* @param {!Protocol.Runtime.PropertyPreview} a
@@ -167,6 +167,12 @@ Components.RemoteObjectPreviewFormatter = class {
var span = createElementWithClass('span', 'object-value-' + (subtype || type));
description = description || '';
+ if (type === 'accessor') {
+ span.textContent = '(...)';
+ span.title = Common.UIString('The property is computed with a getter');
+ return span;
+ }
+
if (type === 'function') {
span.textContent = 'function';
return span;
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698