Bug 1001234, disable arrow panel animation on linux, r=dao

This commit is contained in:
Neil Deakin 2014-05-06 08:33:12 -04:00
parent 742abc7f74
commit 21719f3cb3
4 changed files with 36 additions and 18 deletions

View File

@ -935,13 +935,18 @@ chatbox:-moz-full-screen-ancestor > .chat-titlebar {
-moz-binding: url("chrome://browser/content/places/menu.xml#places-popup-arrow");
background: transparent;
border: none;
/* The popup inherits -moz-image-region from the button, must reset it */
-moz-image-region: auto;
}
%ifndef MOZ_WIDGET_GTK
#BMB_bookmarksPopup {
transform: scale(.7);
opacity: 0;
transition-property: transform, opacity;
transition-duration: 0.15s;
transition-timing-function: ease;
/* The popup inherits -moz-image-region from the button, must reset it */
-moz-image-region: auto;
}
#BMB_bookmarksPopup[animate="open"] {
@ -975,6 +980,7 @@ chatbox:-moz-full-screen-ancestor > .chat-titlebar {
transform: scale(.7) skew(-30deg, -20deg);
}
%endif
/* Customize mode */
#navigator-toolbox,

View File

@ -1380,7 +1380,10 @@ nsXULPopupManager::FirePopupHidingEvent(nsIContent* aPopup,
// able to see it. If there is a next popup, indicating that mutliple popups
// are rolling up, don't wait and hide the popup right away since the effect
// would likely be undesirable. This also does a quick check to see if the
// popup has a transition defined, and skips the wait if not.
// popup has a transition defined, and skips the wait if not. Transitions
// are currently disabled on Linux due to rendering issues on certain
// configurations.
#ifndef MOZ_WIDGET_GTK
if (!aNextPopup && aPopup->HasAttr(kNameSpaceID_None, nsGkAtoms::animate) &&
popupFrame->StyleDisplay()->mTransitionPropertyCount > 0) {
nsAutoString animate;
@ -1397,6 +1400,7 @@ nsXULPopupManager::FirePopupHidingEvent(nsIContent* aPopup,
return;
}
}
#endif
HidePopupCallback(aPopup, popupFrame, aNextPopup, aLastPopup,
aPopupType, aDeselectMenu);

View File

@ -176,23 +176,27 @@ function nextTest()
$("bottomright").removeAttribute("right");
}
var transitions = 0;
function transitionEnded(event) {
transitions++;
// Two properties transition so continue on the second one finishing.
if (!(transitions % 2)) {
SimpleTest.executeSoon(() => runNextTest.next());
// Test that a transition occurs when opening or closing the popup. The transition is
// disabled on Linux.
if (navigator.platform.indexOf("Linux") == -1) {
var transitions = 0;
function transitionEnded(event) {
transitions++;
// Two properties transition so continue on the second one finishing.
if (!(transitions % 2)) {
SimpleTest.executeSoon(() => runNextTest.next());
}
}
}
// Check that the transition occurs for an arrow panel with animate="true"
window.addEventListener("transitionend", transitionEnded, false);
$("animatepanel").openPopup($("topleft"), "after_start", 0, 0, false, false, null, "start");
yield;
window.removeEventListener("transitionend", transitionEnded, false);
synthesizeKey("VK_ESCAPE", { });
ok(!animatedPopupHidden, "animated popup not hidden yet");
yield;
// Check that the transition occurs for an arrow panel with animate="true"
window.addEventListener("transitionend", transitionEnded, false);
$("animatepanel").openPopup($("topleft"), "after_start", 0, 0, false, false, null, "start");
yield;
window.removeEventListener("transitionend", transitionEnded, false);
synthesizeKey("VK_ESCAPE", { });
ok(!animatedPopupHidden, "animated popup not hidden yet");
yield;
}
SimpleTest.finish()
yield;

View File

@ -426,6 +426,8 @@ panel[type="arrow"] {
-moz-binding: url("chrome://global/content/bindings/popup.xml#arrowpanel");
}
%ifndef MOZ_WIDGET_GTK
panel[type="arrow"]:not([animate="false"]) {
transform: scale(.7);
opacity: 0;
@ -485,6 +487,8 @@ panel[arrowposition="end_after"][animate="cancel"] {
transform: scale(.7) skew(-10deg, -10deg);
}
%endif
%ifdef XP_MACOSX
.statusbar-resizerpanel {
display: none;