зеркало из https://github.com/mozilla/gecko-dev.git
Bug 574702: avoid initializing WindowDraggingUtils multiple times due to binding re-attachment (causes dragging jumpiness issues), r=enndeakin
This commit is contained in:
Родитель
013e10d651
Коммит
e358a123e2
|
@ -161,10 +161,13 @@
|
|||
extends="chrome://global/content/bindings/general.xml#statusbar">
|
||||
<implementation>
|
||||
<constructor>
|
||||
try {
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
|
||||
new WindowDraggingElement(this, window);
|
||||
} catch (e) {}
|
||||
if (!this._draggableStarted) {
|
||||
this._draggableStarted = true;
|
||||
try {
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
|
||||
new WindowDraggingElement(this, window);
|
||||
} catch (e) {}
|
||||
}
|
||||
</constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
@ -262,10 +265,13 @@
|
|||
<binding id="windowdragbox">
|
||||
<implementation>
|
||||
<constructor>
|
||||
try {
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
|
||||
new WindowDraggingElement(this, window);
|
||||
} catch (e) {}
|
||||
if (!this._draggableStarted) {
|
||||
this._draggableStarted = true;
|
||||
try {
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
|
||||
new WindowDraggingElement(this, window);
|
||||
} catch (e) {}
|
||||
}
|
||||
</constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
|
|
@ -441,14 +441,17 @@
|
|||
extends="chrome://global/content/bindings/toolbar.xml#toolbar">
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
try {
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
|
||||
let draggableThis = new WindowDraggingElement(this, window);
|
||||
draggableThis.mouseDownCheck = function(e) {
|
||||
// Don't move while customizing or while in full screen mode.
|
||||
return !this.parentNode.customizing && !window.fullScreen;
|
||||
}
|
||||
} catch (e) {}
|
||||
if (!this._draggableStarted) {
|
||||
this._draggableStarted = true;
|
||||
try {
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
|
||||
let draggableThis = new WindowDraggingElement(this, window);
|
||||
draggableThis.mouseDownCheck = function(e) {
|
||||
// Don't move while customizing or while in full screen mode.
|
||||
return !this.parentNode.customizing && !window.fullScreen;
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
]]></constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
|
Загрузка…
Ссылка в новой задаче