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
Родитель caa1469153
Коммит f7c438f993
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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");
},