зеркало из https://github.com/mozilla/pjs.git
Backed out changeset 634290477871; test failures
This commit is contained in:
Родитель
20b9f85629
Коммит
ba159f5c5f
|
@ -738,9 +738,11 @@
|
|||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<field name="_AUTOSCROLL_SPEED">3</field>
|
||||
<field name="_AUTOSCROLL_SNAP">10</field>
|
||||
<field name="_scrollable">null</field>
|
||||
<field name="_autoScrollTimer">null</field>
|
||||
<field name="_startX">null</field>
|
||||
<field name="_startY">null</field>
|
||||
<field name="_screenX">null</field>
|
||||
|
@ -760,7 +762,7 @@
|
|||
window.removeEventListener("keydown", this, true);
|
||||
window.removeEventListener("keypress", this, true);
|
||||
window.removeEventListener("keyup", this, true);
|
||||
window.removeEventListener("MozBeforePaint", this, true);
|
||||
clearInterval(this._autoScrollTimer);
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
|
@ -873,8 +875,6 @@
|
|||
this._startY = event.screenY;
|
||||
this._screenX = event.screenX;
|
||||
this._screenY = event.screenY;
|
||||
this._scrollErrorX = 0;
|
||||
this._scrollErrorY = 0;
|
||||
|
||||
window.addEventListener("mousemove", this, true);
|
||||
window.addEventListener("mousedown", this, true);
|
||||
|
@ -883,9 +883,12 @@
|
|||
window.addEventListener("keydown", this, true);
|
||||
window.addEventListener("keypress", this, true);
|
||||
window.addEventListener("keyup", this, true);
|
||||
window.addEventListener("MozBeforePaint", this, true);
|
||||
|
||||
window.mozRequestAnimationFrame();
|
||||
this._scrollErrorX = 0;
|
||||
this._scrollErrorY = 0;
|
||||
|
||||
this._autoScrollTimer = setInterval(function(self) { self.autoScrollLoop(); },
|
||||
20, this);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -906,7 +909,7 @@
|
|||
<parameter name="start"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
const speed = 10;
|
||||
const speed = 12;
|
||||
var val = (curr - start) / speed;
|
||||
|
||||
if (val > 1)
|
||||
|
@ -945,7 +948,6 @@
|
|||
this._scrollable.scrollLeft += actualScrollX;
|
||||
this._scrollable.scrollTop += actualScrollY;
|
||||
}
|
||||
window.mozRequestAnimationFrame();
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -992,9 +994,6 @@
|
|||
<![CDATA[
|
||||
if (this._scrollable) {
|
||||
switch(aEvent.type) {
|
||||
case "MozBeforePaint":
|
||||
this.autoScrollLoop();
|
||||
break;
|
||||
case "mousemove": {
|
||||
this._screenX = aEvent.screenX;
|
||||
this._screenY = aEvent.screenY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче