RESOLVED FIXED 20466
Editing a property without quotes should add them if possible
https://bugs.webkit.org/show_bug.cgi?id=20466
Summary Editing a property without quotes should add them if possible
Anthony Ricaud
Reported 2008-08-20 15:10:30 PDT
When editing a string property, people may not add quotes. After trying the expression entered, the inspector should try again with quotes.
Attachments
Proposed patch (3.55 KB, patch)
2008-08-20 15:17 PDT, Anthony Ricaud
timothy: review-
Comments adressed (3.54 KB, patch)
2008-08-20 18:12 PDT, Anthony Ricaud
timothy: review+
Anthony Ricaud
Comment 1 2008-08-20 15:17:06 PDT
Created attachment 22902 [details] Proposed patch
Timothy Hatcher
Comment 2 2008-08-20 15:26:30 PDT
Comment on attachment 22902 [details] Proposed patch + var result = WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false); + else + var result = InspectorController.inspectedWindow().eval(expression); + return result; no need to store in a variable, just return in the two places. + var result = this.evaluateExpression("(" + expression + ")"); // Store the result in the property. this.parentObject[this.propertyName] = result; Put a empty line between the var result and the comment. + var result = this.evaluateExpression('"' + expression + '"'); + // Store the result in the property. + this.parentObject[this.propertyName] = result; You should escape double quotes in the expression, otherwise it will fail unexpectedly. Also put a empty line between the var result and the comment. r- for now until the string is escaped. Just do expression.escapeCharacters("\"");
Anthony Ricaud
Comment 3 2008-08-20 18:12:08 PDT
Created attachment 22916 [details] Comments adressed
Timothy Hatcher
Comment 4 2008-08-21 09:36:23 PDT
Landed in r35874.
Note You need to log in before you can comment on or make changes to this bug.