Bug 717030 - Cancel fullscreen animation when entering dom fullscreen [r=dao]

This commit is contained in:
Paul O’Shannessy 2012-01-11 11:16:52 -08:00
Родитель bad1d1004c
Коммит e0cc767b05
1 изменённых файлов: 11 добавлений и 12 удалений

Просмотреть файл

@ -3907,13 +3907,10 @@ var FullScreen = {
}
else {
// The user may quit fullscreen during an animation
window.mozCancelAnimationFrame(this._animationHandle);
this._animationHandle = 0;
clearTimeout(this._animationTimeout);
this._cancelAnimation();
gNavToolbox.style.marginTop = "";
if (this._isChromeCollapsed)
this.mouseoverToggle(true);
this._isAnimating = false;
// This is needed if they use the context menu to quit fullscreen
this._isPopupOpen = false;
@ -3974,10 +3971,7 @@ var FullScreen = {
// Cancel any "hide the toolbar" animation which is in progress, and make
// the toolbar hide immediately.
clearInterval(this._animationInterval);
clearTimeout(this._animationTimeout);
this._isAnimating = false;
this._shouldAnimate = false;
this._cancelAnimation();
this.mouseoverToggle(false);
// If there's a full-screen toggler, remove its listeners, so that mouseover
@ -4122,11 +4116,8 @@ var FullScreen = {
if (pos >= 1) {
// We've animated enough
window.mozCancelAnimationFrame(this._animationHandle);
this._cancelAnimation();
gNavToolbox.style.marginTop = "";
this._animationHandle = 0;
this._isAnimating = false;
this._shouldAnimate = false; // Just to make sure
this.mouseoverToggle(false);
return;
}
@ -4135,6 +4126,14 @@ var FullScreen = {
this._animationHandle = window.mozRequestAnimationFrame(this);
},
_cancelAnimation: function() {
window.mozCancelAnimationFrame(this._animationHandle);
this._animationHandle = 0;
clearTimeout(this._animationTimeout);
this._isAnimating = false;
this._shouldAnimate = false;
},
cancelWarning: function(event) {
if (!this.warningBox) {
return;