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

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

Issue 2717853002: DevTools: iterate on object preview style (Closed)
Patch Set: unhide experiment and fix ellipsis Created 3 years, 10 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/ObjectPropertiesSection.js
diff --git a/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js b/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
index 24307f6add19147fe4b8ab407041ca07726214c1..b2eb7ea87c5a81bbf44d3e935e00e4df483c9df7 100644
--- a/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
+++ b/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
@@ -686,8 +686,7 @@ ObjectUI.ObjectPropertyTreeElement = class extends UI.TreeElement {
* @return {boolean}
*/
ondblclick(event) {
- var inEditableElement = event.target.isSelfOrDescendant(this.valueElement) ||
- (this.expandedValueElement && event.target.isSelfOrDescendant(this.expandedValueElement));
+ var inEditableElement = event.target.isSelfOrDescendant(this.valueElement);
if (!this.property.value.customPreview() && inEditableElement && (this.property.writable || this.property.setter))
this._startEditing();
return false;
@@ -701,49 +700,6 @@ ObjectUI.ObjectPropertyTreeElement = class extends UI.TreeElement {
this._updateExpandable();
}
- /**
- * @override
- */
- onexpand() {
- this._showExpandedValueElement(true);
- }
-
- /**
- * @override
- */
- oncollapse() {
- this._showExpandedValueElement(false);
- }
-
- /**
- * @param {boolean} value
- */
- _showExpandedValueElement(value) {
- if (!this.expandedValueElement)
- return;
- if (value)
- this.listItemElement.replaceChild(this.expandedValueElement, this.valueElement);
- else
- this.listItemElement.replaceChild(this.valueElement, this.expandedValueElement);
- }
-
- /**
- * @param {!SDK.RemoteObject} value
- * @return {?Element}
- */
- _createExpandedValueElement(value) {
- var needsAlternateValue = value.hasChildren && !value.customPreview() && value.subtype !== 'node' &&
- value.type !== 'function' && (value.type !== 'object' || value.preview);
- if (!needsAlternateValue)
- return null;
-
- var valueElement = createElementWithClass('span', 'value');
- valueElement.setTextContentTruncatedIfNeeded(value.description || '');
- valueElement.classList.add('object-value-' + (value.subtype || value.type));
- valueElement.title = value.description || '';
- return valueElement;
- }
-
update() {
this.nameElement = ObjectUI.ObjectPropertiesSection.createNameElement(this.property.name);
if (!this.property.enumerable)
@@ -771,10 +727,6 @@ ObjectUI.ObjectPropertyTreeElement = class extends UI.TreeElement {
this.valueElement.title = Common.UIString('No property getter');
}
- var valueText = this.valueElement.textContent;
- if (this.property.value && valueText && !this.property.wasThrown)
- this.expandedValueElement = this._createExpandedValueElement(this.property.value);
-
this.listItemElement.removeChildren();
this.listItemElement.appendChildren(this.nameElement, separatorElement, this.valueElement);
}

Powered by Google App Engine
This is Rietveld 408576698