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

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

Issue 2800573002: DevTools: editing property values should wrap object literals similar to console (Closed)
Patch Set: Created 3 years, 8 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 e4731e87f991fd9dfe089f354655f702d76bce6a..0e2954077ca2ab9f1f5cfdb1f6cb8fbba362e18d 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
@@ -888,7 +888,7 @@ ObjectUI.ObjectPropertyTreeElement = class extends UI.TreeElement {
*/
_applyExpression(expression) {
var property = SDK.RemoteObject.toCallArgument(this.property.symbol || this.property.name);
- expression = expression.trim();
+ expression = SDK.RuntimeModel.wrapObjectLiteralExpressionIfNeeded(expression.trim());
lushnikov 2017/04/08 00:11:09 why can't we always surround with parentheses? + @
kozy 2017/04/20 00:17:20 it changes semantic.
if (expression)
this.property.parentObject.setPropertyValue(property, expression, callback.bind(this));
else

Powered by Google App Engine
This is Rietveld 408576698