mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 914403 - Part 3: Clear selection on remote inspector destuction. r=paul
This commit is contained in:
parent
cd41027a77
commit
2d2ffc2e13
@ -834,6 +834,7 @@ function BasicHighlighter(aTarget, aInspector)
|
||||
|
||||
BasicHighlighter.prototype = {
|
||||
destroy: function() {
|
||||
this.walker.highlight(null);
|
||||
this.selection.off("new-node-front", this.highlight);
|
||||
this.walker = null;
|
||||
this.selection = null;
|
||||
|
@ -447,6 +447,13 @@ InspectorPanel.prototype = {
|
||||
if (this._destroyPromise) {
|
||||
return this._destroyPromise;
|
||||
}
|
||||
|
||||
if (this.highlighter) {
|
||||
this.highlighter.off("locked", this.onLockStateChanged);
|
||||
this.highlighter.off("unlocked", this.onLockStateChanged);
|
||||
this.highlighter.destroy();
|
||||
}
|
||||
|
||||
if (this.walker) {
|
||||
this.walker.off("new-root", this.onNewRoot);
|
||||
this._destroyPromise = this.walker.release().then(null, console.error);
|
||||
@ -464,12 +471,6 @@ InspectorPanel.prototype = {
|
||||
this.browser = null;
|
||||
}
|
||||
|
||||
if (this.highlighter) {
|
||||
this.highlighter.off("locked", this.onLockStateChanged);
|
||||
this.highlighter.off("unlocked", this.onLockStateChanged);
|
||||
this.highlighter.destroy();
|
||||
}
|
||||
|
||||
this.target.off("thread-paused", this.updateDebuggerPausedWarning);
|
||||
this.target.off("thread-resumed", this.updateDebuggerPausedWarning);
|
||||
this._toolbox.off("select", this.updateDebuggerPausedWarning);
|
||||
|
@ -35,6 +35,12 @@ function test() {
|
||||
yield verifyH1Selected();
|
||||
yield deselect();
|
||||
yield verifyNoNodeSelected();
|
||||
|
||||
yield selectH1();
|
||||
yield verifyH1Selected();
|
||||
yield destroyInspector();
|
||||
yield verifyNoNodeSelected();
|
||||
|
||||
finishUp();
|
||||
}).then(null, Cu.reportError);
|
||||
}
|
||||
@ -66,6 +72,10 @@ function test() {
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
function destroyInspector() {
|
||||
return inspector.destroy();
|
||||
}
|
||||
|
||||
function verifyNoNodeSelected() {
|
||||
ok(doc.querySelectorAll(":-moz-devtools-highlighted").length === 0, "no node selected");
|
||||
return promise.resolve();
|
||||
|
Loading…
Reference in New Issue
Block a user