зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1420604 - Remove unused isDirty bit from the Inspector and Style Editor. r=jdescottes
This commit is contained in:
Родитель
b51659c313
Коммит
b1c72a4e79
|
@ -298,7 +298,6 @@ Inspector.prototype = {
|
|||
this._defaultNode = null;
|
||||
this.selection.setNodeFront(null);
|
||||
this._destroyMarkup();
|
||||
this.isDirty = false;
|
||||
this._pendingSelection = null;
|
||||
},
|
||||
|
||||
|
@ -376,15 +375,6 @@ Inspector.prototype = {
|
|||
this._target = value;
|
||||
},
|
||||
|
||||
/**
|
||||
* Indicate that a tool has modified the state of the page. Used to
|
||||
* decide whether to show the "are you sure you want to navigate"
|
||||
* notification.
|
||||
*/
|
||||
markDirty: function () {
|
||||
this.isDirty = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Hooks the searchbar to show result and auto completion suggestions.
|
||||
*/
|
||||
|
@ -1044,7 +1034,6 @@ Inspector.prototype = {
|
|||
this._defaultNode = null;
|
||||
this.selection.setNodeFront(null);
|
||||
this._destroyMarkup();
|
||||
this.isDirty = false;
|
||||
|
||||
let onNodeSelected = defaultNode => {
|
||||
// Cancel this promise resolution as a new one had
|
||||
|
|
|
@ -46,7 +46,6 @@ function Rule(elementStyle, options) {
|
|||
this.isUnmatched = options.isUnmatched || false;
|
||||
this.inherited = options.inherited || null;
|
||||
this.keyframes = options.keyframes || null;
|
||||
this._modificationDepth = 0;
|
||||
|
||||
if (this.domRule && this.domRule.mediaText) {
|
||||
this.mediaText = this.domRule.mediaText;
|
||||
|
|
|
@ -1588,12 +1588,10 @@ function RuleViewTool(inspector, window) {
|
|||
this.refresh = this.refresh.bind(this);
|
||||
this.onMutations = this.onMutations.bind(this);
|
||||
this.onPanelSelected = this.onPanelSelected.bind(this);
|
||||
this.onPropertyChanged = this.onPropertyChanged.bind(this);
|
||||
this.onResized = this.onResized.bind(this);
|
||||
this.onSelected = this.onSelected.bind(this);
|
||||
this.onViewRefreshed = this.onViewRefreshed.bind(this);
|
||||
|
||||
this.view.on("ruleview-changed", this.onPropertyChanged);
|
||||
this.view.on("ruleview-refreshed", this.onViewRefreshed);
|
||||
|
||||
this.inspector.selection.on("detached-front", this.onSelected);
|
||||
|
@ -1671,10 +1669,6 @@ RuleViewTool.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
onPropertyChanged: function () {
|
||||
this.inspector.markDirty();
|
||||
},
|
||||
|
||||
onViewRefreshed: function () {
|
||||
this.inspector.emit("rule-view-refreshed");
|
||||
},
|
||||
|
@ -1713,7 +1707,6 @@ RuleViewTool.prototype = {
|
|||
this.inspector.pageStyle.off("stylesheet-updated", this.refresh);
|
||||
}
|
||||
|
||||
this.view.off("ruleview-changed", this.onPropertyChanged);
|
||||
this.view.off("ruleview-refreshed", this.onViewRefreshed);
|
||||
|
||||
this.view.destroy();
|
||||
|
|
|
@ -103,27 +103,6 @@ function StyleEditorUI(debuggee, target, panelDoc, cssProperties) {
|
|||
this.StyleEditorUI = StyleEditorUI;
|
||||
|
||||
StyleEditorUI.prototype = {
|
||||
/**
|
||||
* Get whether any of the editors have unsaved changes.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
get isDirty() {
|
||||
if (this._markedDirty === true) {
|
||||
return true;
|
||||
}
|
||||
return this.editors.some((editor) => {
|
||||
return editor.sourceEditor && !editor.sourceEditor.isClean();
|
||||
});
|
||||
},
|
||||
|
||||
/*
|
||||
* Mark the style editor as having or not having unsaved changes.
|
||||
*/
|
||||
set isDirty(value) {
|
||||
this._markedDirty = value;
|
||||
},
|
||||
|
||||
/*
|
||||
* Index of selected stylesheet in document.styleSheets
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче