mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 09:19:28 +00:00
Bug 1179048 - Use mouseout instead of mouseleave in devtools. r=fitzgen
Using mouseleave in chrome code generates a warning in docshell about performance which notes mouseout should be used instead. This patch replaces usage of mouseleave with mouseout across the devtools codebase.
This commit is contained in:
parent
6f7461956e
commit
61f2737242
@ -71,7 +71,7 @@ HTMLBreadcrumbs.prototype = {
|
||||
this.container.addEventListener("mousedown", this, true);
|
||||
this.container.addEventListener("keypress", this, true);
|
||||
this.container.addEventListener("mouseover", this, true);
|
||||
this.container.addEventListener("mouseleave", this, true);
|
||||
this.container.addEventListener("mouseout", this, true);
|
||||
|
||||
// We will save a list of already displayed nodes in this array.
|
||||
this.nodeHierarchy = [];
|
||||
@ -288,7 +288,7 @@ HTMLBreadcrumbs.prototype = {
|
||||
this.handleKeyPress(event);
|
||||
} else if (event.type == "mouseover") {
|
||||
this.handleMouseOver(event);
|
||||
} else if (event.type == "mouseleave") {
|
||||
} else if (event.type == "mouseout") {
|
||||
this.handleMouseLeave(event);
|
||||
}
|
||||
},
|
||||
@ -404,7 +404,7 @@ HTMLBreadcrumbs.prototype = {
|
||||
this.container.removeEventListener("mousedown", this, true);
|
||||
this.container.removeEventListener("keypress", this, true);
|
||||
this.container.removeEventListener("mouseover", this, true);
|
||||
this.container.removeEventListener("mouseleave", this, true);
|
||||
this.container.removeEventListener("mouseout", this, true);
|
||||
|
||||
this.empty();
|
||||
this.separators.remove();
|
||||
|
@ -145,7 +145,7 @@ MarkupView.prototype = {
|
||||
this._onMouseMove = this._onMouseMove.bind(this);
|
||||
this._elt.addEventListener("mousemove", this._onMouseMove, false);
|
||||
this._onMouseLeave = this._onMouseLeave.bind(this);
|
||||
this._elt.addEventListener("mouseleave", this._onMouseLeave, false);
|
||||
this._elt.addEventListener("mouseout", this._onMouseLeave, false);
|
||||
|
||||
// Show markup-containers as hovered on toolbox "picker-node-hovered" event
|
||||
// which happens when the "pick" button is pressed
|
||||
@ -1495,7 +1495,7 @@ MarkupView.prototype = {
|
||||
this._boundOnDisplayChange = null;
|
||||
|
||||
this._elt.removeEventListener("mousemove", this._onMouseMove, false);
|
||||
this._elt.removeEventListener("mouseleave", this._onMouseLeave, false);
|
||||
this._elt.removeEventListener("mouseout", this._onMouseLeave, false);
|
||||
this._elt = null;
|
||||
|
||||
for (let [key, container] of this._containers) {
|
||||
|
@ -400,7 +400,7 @@ Tooltip.prototype = {
|
||||
this._onBaseNodeMouseLeave = this._onBaseNodeMouseLeave.bind(this);
|
||||
|
||||
baseNode.addEventListener("mousemove", this._onBaseNodeMouseMove, false);
|
||||
baseNode.addEventListener("mouseleave", this._onBaseNodeMouseLeave, false);
|
||||
baseNode.addEventListener("mouseout", this._onBaseNodeMouseLeave, false);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -417,7 +417,7 @@ Tooltip.prototype = {
|
||||
|
||||
this._basedNode.removeEventListener("mousemove",
|
||||
this._onBaseNodeMouseMove, false);
|
||||
this._basedNode.removeEventListener("mouseleave",
|
||||
this._basedNode.removeEventListener("mouseout",
|
||||
this._onBaseNodeMouseLeave, false);
|
||||
|
||||
this._basedNode = null;
|
||||
|
@ -79,7 +79,7 @@ HighlightersOverlay.prototype = {
|
||||
|
||||
let el = this.view.element;
|
||||
el.addEventListener("mousemove", this._onMouseMove, false);
|
||||
el.addEventListener("mouseleave", this._onMouseLeave, false);
|
||||
el.addEventListener("mouseout", this._onMouseLeave, false);
|
||||
|
||||
this._isStarted = true;
|
||||
},
|
||||
@ -97,7 +97,7 @@ HighlightersOverlay.prototype = {
|
||||
|
||||
let el = this.view.element;
|
||||
el.removeEventListener("mousemove", this._onMouseMove, false);
|
||||
el.removeEventListener("mouseleave", this._onMouseLeave, false);
|
||||
el.removeEventListener("mouseout", this._onMouseLeave, false);
|
||||
|
||||
this._isStarted = false;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user