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

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

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: A new unused variable was born Created 4 years 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/elements/StylesSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
index dd1b2fb55df797203c82aafaa53963b59226c962..4d18ad3f8c19df697e3e0c72e04b90c7b155623e 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -1513,7 +1513,6 @@ Elements.StylePropertiesSection = class {
var oldSelectorRange = rule.selectorRange();
if (!oldSelectorRange)
return Promise.resolve();
- var selectedNode = this._parentPane.node();
return rule.setSelectorText(newContent)
.then(onSelectorsUpdated.bind(this, /** @type {!SDK.CSSStyleRule} */ (rule), oldSelectorRange));
}
@@ -1719,7 +1718,6 @@ Elements.KeyframePropertiesSection = class extends Elements.StylePropertiesSecti
var oldRange = rule.key().range;
if (!oldRange)
return Promise.resolve();
- var selectedNode = this._parentPane.node();
return rule.setKeyText(newContent).then(updateSourceRanges.bind(this));
}
@@ -2535,7 +2533,7 @@ Elements.StylePropertyTreeElement = class extends TreeElement {
var isEditingName = context.isEditingName;
// Determine where to move to before making changes
- var createNewProperty, moveToPropertyName, moveToSelector;
+ var createNewProperty, moveToSelector;
var isDataPasted = 'originalName' in context;
var isDirtyViaPaste = isDataPasted && (this.nameElement.textContent !== context.originalName ||
this.valueElement.textContent !== context.originalValue);
@@ -2546,12 +2544,12 @@ Elements.StylePropertyTreeElement = class extends TreeElement {
if (moveDirection === 'forward' && (!isEditingName || isPropertySplitPaste) ||
moveDirection === 'backward' && isEditingName) {
moveTo = moveTo._findSibling(moveDirection);
- if (moveTo)
- moveToPropertyName = moveTo.name;
- else if (moveDirection === 'forward' && (!this._newProperty || userInput))
- createNewProperty = true;
- else if (moveDirection === 'backward')
- moveToSelector = true;
+ if (!moveTo) {
+ if (moveDirection === 'forward' && (!this._newProperty || userInput))
+ createNewProperty = true;
+ else if (moveDirection === 'backward')
+ moveToSelector = true;
+ }
}
// Make the Changes and trigger the moveToNextCallback after updating.

Powered by Google App Engine
This is Rietveld 408576698