mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 600646 - Speed up the new tab animation [r=dolske, a=blocking]
This commit is contained in:
parent
8782dcbf1e
commit
fc5c17170a
@ -1386,39 +1386,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||||||
// TabItems will have handled the new tab and added the tabItem property.
|
// TabItems will have handled the new tab and added the tabItem property.
|
||||||
// We don't have to check if it's an app tab (and therefore wouldn't have a
|
// We don't have to check if it's an app tab (and therefore wouldn't have a
|
||||||
// TabItem), since we've just created it.
|
// TabItem), since we've just created it.
|
||||||
let newItem = newTab.tabItem;
|
newTab.tabItem.zoomIn(!url);
|
||||||
|
|
||||||
var self = this;
|
|
||||||
iQ(newItem.container).css({opacity: 0});
|
|
||||||
let $anim = iQ("<div>")
|
|
||||||
.addClass("newTabAnimatee")
|
|
||||||
.css({
|
|
||||||
top: newItem.bounds.top + 5,
|
|
||||||
left: newItem.bounds.left + 5,
|
|
||||||
width: newItem.bounds.width - 10,
|
|
||||||
height: newItem.bounds.height - 10,
|
|
||||||
zIndex: 999,
|
|
||||||
opacity: 0
|
|
||||||
})
|
|
||||||
.appendTo("body")
|
|
||||||
.animate({opacity: 1}, {
|
|
||||||
duration: 500,
|
|
||||||
complete: function() {
|
|
||||||
$anim.animate({
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
width: window.innerWidth,
|
|
||||||
height: window.innerHeight
|
|
||||||
}, {
|
|
||||||
duration: 270,
|
|
||||||
complete: function() {
|
|
||||||
iQ(newItem.container).css({opacity: 1});
|
|
||||||
newItem.zoomIn(!url);
|
|
||||||
$anim.remove();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
|
@ -32,6 +32,7 @@ body {
|
|||||||
|
|
||||||
.thumb {
|
.thumb {
|
||||||
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
|
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.favicon {
|
.favicon {
|
||||||
|
@ -30,6 +30,7 @@ body {
|
|||||||
|
|
||||||
.thumb {
|
.thumb {
|
||||||
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
|
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.favicon {
|
.favicon {
|
||||||
|
@ -34,6 +34,7 @@ body {
|
|||||||
|
|
||||||
.thumb {
|
.thumb {
|
||||||
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.1);
|
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.favicon {
|
.favicon {
|
||||||
|
Loading…
Reference in New Issue
Block a user