Bug 747228 - [layout view] We should not use the animation when the layout view is opened on a non-user action. r=dcamp

This commit is contained in:
Paul Rouget 2012-05-09 18:19:48 +02:00
parent 405f73621d
commit c6b3c08068
2 changed files with 11 additions and 2 deletions

View File

@ -111,12 +111,15 @@ html|*#highlighter-nodeinfobar-tagname {
}
#inspector-layoutview-container > iframe {
-moz-transition-property: height;
-moz-transition-duration: 0.1s;
/* header size */
height: 22px;
}
#inspector-layoutview-container:not([disable-transitions]) > iframe {
-moz-transition-property: height;
-moz-transition-duration: 0.2s;
}
#inspector-layoutview-container > iframe[open] {
/* header size + layout view size: 22px + 155px */
height: 177px;

View File

@ -254,6 +254,9 @@ LayoutView.prototype = {
if (aUserAction) {
this.inspector._layoutViewIsOpen = true;
Services.prefs.setBoolPref("devtools.layoutview.open", true);
this.view.removeAttribute("disable-transitions");
} else {
this.view.setAttribute("disable-transitions", "true");
}
this.iframe.setAttribute("open", "true");
this.update();
@ -272,6 +275,9 @@ LayoutView.prototype = {
if (aUserAction) {
this.inspector._layoutViewIsOpen = false;
Services.prefs.setBoolPref("devtools.layoutview.open", false);
this.view.removeAttribute("disable-transitions");
} else {
this.view.setAttribute("disable-transitions", "true");
}
this.iframe.removeAttribute("open");
},