mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
+ merge
This commit is contained in:
commit
f92c142ff8
@ -289,11 +289,15 @@ window.Page = {
|
||||
|
||||
Tabs.onFocus(function() {
|
||||
var focusTab = this;
|
||||
|
||||
var sTime = (new Date()).getTime();
|
||||
Utils.log("Tabcandy got focus. Timer starter:", sTime);
|
||||
|
||||
// If we switched to TabCandy window...
|
||||
if( focusTab.contentWindow == window ){
|
||||
UI.focused = true;
|
||||
Page.hideChrome();
|
||||
Utils.log("Chrome Hidden. Elapsed time:", (new Date()).getTime()-sTime);
|
||||
var currentTab = UI.currentTab;
|
||||
if(currentTab != null && currentTab.mirror != null) {
|
||||
// If there was a previous currentTab we want to animate
|
||||
@ -326,14 +330,23 @@ window.Page = {
|
||||
zIndex: 999999,
|
||||
'-moz-transform': 'rotate(0deg)'
|
||||
});
|
||||
Utils.log("Tab CSS set. Elapsed time:", (new Date()).getTime()-sTime);
|
||||
|
||||
iQ.timeout(function() { // Marshal event from chrome thread to DOM thread
|
||||
// Note that it is the marshalling that is causing a near 200ms delay between
|
||||
// showing the tab and starting the animation which causes a big ugly jump.
|
||||
// TODO: WE NEED A BETTER SOLUTION.
|
||||
Utils.log("Start animation elapsed time:", (new Date()).getTime()-sTime);
|
||||
var animStart = (new Date()).getTime();
|
||||
$tab.animate({
|
||||
top: pos.top, left: pos.left,
|
||||
width: w, height: h
|
||||
}, {
|
||||
duration: 350,
|
||||
complete: function() {
|
||||
// TODO:
|
||||
// This never seems to actually take 350ms?
|
||||
Utils.log("350ms animation took (in ms)", (new Date()).getTime()-animStart);
|
||||
$tab.css({
|
||||
zIndex: z,
|
||||
'-moz-transform': transform
|
||||
|
Loading…
Reference in New Issue
Block a user