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

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

Issue 692073003: DevTools: [SSP] update style rules of SectionPropertyTreeElements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: simplistic approach Created 6 years, 1 month 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/styles-disable-property-after-selector-edit-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 6a42183aada574a0c3fa6d3d8dea608939d737bf..6a86aabf261143db6aa1859084dc5e6d9a3243a7 100644
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -1871,8 +1871,6 @@ WebInspector.StylePropertiesSection.prototype = {
return;
}
- var selectedNode = this._parentPane._node;
-
/**
* @param {!WebInspector.CSSRule} newRule
* @this {WebInspector.StylePropertiesSection}
@@ -1892,7 +1890,7 @@ WebInspector.StylePropertiesSection.prototype = {
this.rule = newRule;
this.styleRule = { section: this, style: newRule.style, selectorText: newRule.selectorText, media: newRule.media, rule: newRule };
- this._parentPane.update(selectedNode);
+ this._parentPane._refreshUpdate(this, false);
this._parentPane._styleSheetRuleEdited(this.rule, oldSelectorRange, this.rule.selectorRange);
finishOperationAndMoveEditor.call(this, moveDirection);
@@ -1910,6 +1908,7 @@ WebInspector.StylePropertiesSection.prototype = {
// This gets deleted in finishOperationAndMoveEditor(), which is called both on success and failure.
this._parentPane._userOperation = true;
+ var selectedNode = this._parentPane._node;
this._parentPane._target.cssModel.setRuleSelector(this.rule, selectedNode ? selectedNode.id : 0, newContent, successCallback.bind(this), finishOperationAndMoveEditor.bind(this, moveDirection));
},
« no previous file with comments | « LayoutTests/inspector/elements/styles/styles-disable-property-after-selector-edit-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698