Bug 809733 - Add CSS transitions for minimizing and restoring the social chatboxes. r=jaws

This commit is contained in:
Mark Hammond 2013-04-09 16:37:36 +10:00
parent b9562c3d30
commit 709ca28ab4
2 changed files with 7 additions and 1 deletions

View File

@ -618,6 +618,7 @@ toolbarbutton[type="badged"] {
chatbox {
-moz-binding: url("chrome://browser/content/socialchat.xml#chatbox");
transition: height 150ms ease-out, width 150ms ease-out;
}
chatbar {

View File

@ -63,7 +63,8 @@
return this.getAttribute("minimized") == "true";
</getter>
<setter><![CDATA[
this.isActive = !val;
// Note that this.isActive is set via our transitionend handler so
// the content doesn't see intermediate values.
let parent = this.parentNode;
if (val) {
this.setAttribute("minimized", "true");
@ -144,6 +145,10 @@
this.setAttribute('image', uri.spec);
this.parentNode.updateTitlebar(this);
]]></handler>
<handler event="transitionend">
if (this.isActive == this.minimized)
this.isActive = !this.minimized;
</handler>
</handlers>
</binding>