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

Unified Diff: Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 1192033005: DevTools: [regression] entering invalid property value in the styles sidebar results in exception. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « LayoutTests/inspector/elements/styles/cancel-upon-invalid-property-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/elements/StylesSidebarPane.js
diff --git a/Source/devtools/front_end/elements/StylesSidebarPane.js b/Source/devtools/front_end/elements/StylesSidebarPane.js
index 4e72e256873ee2f284a4f87b117fb41db17c9a9f..d2a8e3540486e30a686d779684a420001cba17f6 100644
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -2610,7 +2610,6 @@ WebInspector.StylePropertyTreeElement.prototype = {
*/
editingEnded: function(context)
{
- delete this._originalPropertyText;
this._resetMouseDownElement();
this.setExpandable(context.hasChildren);
@@ -2638,12 +2637,14 @@ WebInspector.StylePropertyTreeElement.prototype = {
_revertStyleUponEditingCanceled: function()
{
- if (this._propertyHasBeenEditedIncrementally)
+ if (this._propertyHasBeenEditedIncrementally) {
this.applyStyleText(this._originalPropertyText, false);
- else if (this._newProperty)
+ delete this._originalPropertyText;
+ } else if (this._newProperty) {
this.treeOutline.removeChild(this);
- else
+ } else {
this.updateTitle();
+ }
},
/**
« no previous file with comments | « LayoutTests/inspector/elements/styles/cancel-upon-invalid-property-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698