mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
+ Temporarily added a bunch of logging for debugging purposes (commented out)
+ Fixed a bug with iQ.fn.one that caused it to not properly set "this" + Temporarily disabled TabMirror.pausePainting, which is causing problems at the moment (will fix soon)
This commit is contained in:
parent
10209deaae
commit
12c5d78226
@ -439,8 +439,10 @@ window.Group.prototype = iQ.extend(new Item(), new Subscribable(), {
|
||||
this.$titlebar.css(titlebarCSS);
|
||||
this.$content.css(contentCSS);
|
||||
} else {
|
||||
/* Utils.log('pause in groups'); */
|
||||
TabMirror.pausePainting();
|
||||
iQ(this.container).animate(css, 'animate350', function() {
|
||||
/* Utils.log('resume in groups'); */
|
||||
TabMirror.resumePainting();
|
||||
}); //easing: "tabcandyBounce"
|
||||
/* }).dequeue(); */
|
||||
|
@ -145,8 +145,10 @@ window.TabItem.prototype = iQ.extend(new Item(), {
|
||||
/* $container.stop(true, true); */
|
||||
$container.css(css);
|
||||
} else {
|
||||
/* Utils.log('pause in tab, setBounds'); */
|
||||
TabMirror.pausePainting();
|
||||
$container.animate(css, 'animate200', function() {
|
||||
/* Utils.log('resume in tab, setBounds'); */
|
||||
TabMirror.resumePainting();
|
||||
}); // tabcandyBounce
|
||||
/* }).dequeue(); */
|
||||
@ -280,6 +282,7 @@ window.TabItems = {
|
||||
var $div = iQ(mirror.el);
|
||||
var $$div = $(mirror.el);
|
||||
var tab = mirror.tab;
|
||||
/* Utils.log('mod', tab.url); */
|
||||
|
||||
if(window.Groups) {
|
||||
$div.data('isDragging', false);
|
||||
@ -381,6 +384,7 @@ window.TabItems = {
|
||||
try {
|
||||
UI.tabBar.show(false);
|
||||
TabMirror.resumePainting();
|
||||
/* Utils.log('resume in tab, onZoomDone'); */
|
||||
tab.focus();
|
||||
$tabEl.css({
|
||||
top: orig.pos.top,
|
||||
@ -411,6 +415,7 @@ window.TabItems = {
|
||||
}
|
||||
}
|
||||
|
||||
/* Utils.log('pause in tab, onZoomDone'); */
|
||||
TabMirror.pausePainting();
|
||||
iQ(tabEl)
|
||||
.addClass("front")
|
||||
|
@ -315,6 +315,7 @@ window.Page = {
|
||||
var overflow = iQ("body").css("overflow");
|
||||
iQ("body").css("overflow", "hidden");
|
||||
|
||||
/* Utils.log('pause in ui'); */
|
||||
TabMirror.pausePainting();
|
||||
$tab.css({
|
||||
top: 0, left: 0,
|
||||
@ -338,6 +339,7 @@ window.Page = {
|
||||
if( activeGroup ) activeGroup.reorderBasedOnTabOrder(item);
|
||||
|
||||
window.Groups.setActiveGroup(null);
|
||||
/* Utils.log('resume in UI'); */
|
||||
TabMirror.resumePainting();
|
||||
UI.resize(true);
|
||||
});
|
||||
|
@ -584,18 +584,40 @@ iQ.fn = iQ.prototype = {
|
||||
animate: function(css, duration, callback) {
|
||||
Utils.assert('does not yet support multi-objects (or null objects)', this.length == 1);
|
||||
try {
|
||||
/*
|
||||
this.css({
|
||||
'-moz-transition-property': 'all',
|
||||
'-moz-transition-duration': '0.3s',
|
||||
'-moz-transition-timing-function': 'cubic-bezier(0.0, 0.35, .6, 1.4)'
|
||||
});
|
||||
*/
|
||||
|
||||
this.addClass(duration);
|
||||
iQ.animationCount++;
|
||||
|
||||
var self = this;
|
||||
var cleanedUp = false;
|
||||
this.one('transitionend', function() {
|
||||
if(!cleanedUp) {
|
||||
iQ.animationCount--;
|
||||
self.removeClass(duration);
|
||||
cleanedUp = true;
|
||||
if(iQ.isFunction(callback))
|
||||
callback.apply(this);
|
||||
try {
|
||||
/* Utils.log('transition ended'); */
|
||||
if(!cleanedUp) {
|
||||
iQ.animationCount--;
|
||||
|
||||
/*
|
||||
iQ(this).css({
|
||||
'-moz-transition-property': '',
|
||||
'-moz-transition-duration': '',
|
||||
'-moz-transition-timing-function': ''
|
||||
});
|
||||
*/
|
||||
|
||||
self.removeClass(duration);
|
||||
cleanedUp = true;
|
||||
if(iQ.isFunction(callback))
|
||||
callback.apply(this);
|
||||
}
|
||||
} catch(e) {
|
||||
Utils.log(e);
|
||||
}
|
||||
});
|
||||
|
||||
@ -690,7 +712,7 @@ iQ.fn = iQ.prototype = {
|
||||
|
||||
var handler = function(e) {
|
||||
iQ(this).unbind(type, handler);
|
||||
return func(e);
|
||||
return func.apply(this, [e]);
|
||||
};
|
||||
|
||||
return this.bind(type, handler);
|
||||
|
@ -98,6 +98,7 @@ TabCanvas.prototype = {
|
||||
// A single tab in the browser and its visual representation in the tab candy window.
|
||||
// Note that it implements the <Subscribable> interface.
|
||||
function Mirror(tab, manager) {
|
||||
/* Utils.log('creating a mirror'); */
|
||||
this.tab = tab;
|
||||
this.manager = manager;
|
||||
|
||||
@ -124,8 +125,10 @@ function Mirror(tab, manager) {
|
||||
this.triggerPaint();
|
||||
}
|
||||
|
||||
/* Utils.log('applying mirror'); */
|
||||
this.tab.mirror = this;
|
||||
this.manager._customize(this);
|
||||
/* Utils.log('done creating mirror'); */
|
||||
}
|
||||
|
||||
Mirror.prototype = iQ.extend(new Subscribable(), {
|
||||
@ -216,6 +219,7 @@ TabMirror.prototype = {
|
||||
|
||||
_heartbeat: function() {
|
||||
try {
|
||||
/* Utils.log('heartbeat', this.paintingPaused); */
|
||||
var now = Utils.getMilliseconds();
|
||||
var count = Tabs.length;
|
||||
if(count && this.paintingPaused <= 0) {
|
||||
@ -225,7 +229,9 @@ TabMirror.prototype = {
|
||||
|
||||
var tab = Tabs[this.heartbeatIndex];
|
||||
var mirror = tab.mirror;
|
||||
/* Utils.log('heartbeat mirror check'); */
|
||||
if(mirror) {
|
||||
/* Utils.log('hasMirror'); */
|
||||
var iconUrl = tab.raw.linkedBrowser.mIconURL;
|
||||
if( iconUrl == null ){
|
||||
iconUrl = "chrome://tabcandy/content/candies/revision-a/img/default.png";
|
||||
@ -263,6 +269,7 @@ TabMirror.prototype = {
|
||||
}
|
||||
|
||||
if(mirror.needsPaint) {
|
||||
/* Utils.log('aboutToPaint'); */
|
||||
mirror.tabCanvas.paint();
|
||||
|
||||
if(Utils.getMilliseconds() - mirror.needsPaint > 5000)
|
||||
@ -353,7 +360,7 @@ window.TabMirror = {
|
||||
// pausePainting can be called multiple times, but every call to
|
||||
// pausePainting needs to be mirrored with a call to <resumePainting>.
|
||||
pausePainting: function() {
|
||||
this._private.paintingPaused++;
|
||||
/* this._private.paintingPaused++; */
|
||||
},
|
||||
|
||||
// Function: resumePainting
|
||||
@ -361,7 +368,7 @@ window.TabMirror = {
|
||||
// pausePainting three times in a row, you'll need to call resumePainting
|
||||
// three times before the TabMirror will start updating thumbnails again.
|
||||
resumePainting: function() {
|
||||
this._private.paintingPaused--;
|
||||
/* this._private.paintingPaused--; */
|
||||
},
|
||||
|
||||
// Function: isPaintingPaused
|
||||
|
Loading…
Reference in New Issue
Block a user