Bug 1291457 - Don't use a CSS animation for animating arrow panels on Mac. draft
authorMarkus Stange <mstange@themasta.com>
Tue, 02 Aug 2016 16:19:27 -0400
changeset 395773 27d39220f52839436b497858d3ba0fc0b6bcc08c
parent 395624 6608e5864780589b25d5421c3d3673ab30c4c318
child 395774 94e453d1e5628acb81239e0823c19291783bf24a
push id24844
push usermstange@themasta.com
push dateTue, 02 Aug 2016 21:27:11 +0000
bugs1291457
milestone51.0a1
Bug 1291457 - Don't use a CSS animation for animating arrow panels on Mac. MozReview-Commit-ID: JFkY3HKPlOM
browser/base/content/browser.css
layout/xul/nsMenuPopupFrame.cpp
layout/xul/nsXULPopupManager.cpp
toolkit/content/xul.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -1057,17 +1057,17 @@ toolbarpaletteitem[place="palette"] > #d
   -moz-appearance: none;
   -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
+%if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX)
 
 #BMB_bookmarksPopup {
   transform: scale(.4);
   opacity: 0;
   transition-property: transform, opacity;
   transition-duration: 0.15s;
   transition-timing-function: ease-out;
 }
--- a/layout/xul/nsMenuPopupFrame.cpp
+++ b/layout/xul/nsMenuPopupFrame.cpp
@@ -529,17 +529,17 @@ nsMenuPopupFrame::LayoutPopup(nsBoxLayou
     viewManager->SetViewVisibility(view, nsViewVisibility_kShow);
     nsContainerFrame::SyncFrameViewProperties(pc, this, nullptr, view, 0);
   }
 
   // finally, if the popup just opened, send a popupshown event
   if (mIsOpenChanged) {
     mIsOpenChanged = false;
 
-#ifndef MOZ_WIDGET_GTK
+#if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX)
     // If the animate attribute is set to open, check for a transition and wait
     // for it to finish before firing the popupshown event.
     if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::animate,
                               nsGkAtoms::open, eCaseMatters) &&
         nsLayoutUtils::HasCurrentTransitions(this)) {
       mPopupShownDispatcher = new nsXULPopupShownEvent(mContent, pc);
       mContent->AddSystemEventListener(NS_LITERAL_STRING("transitionend"),
                                        mPopupShownDispatcher, false, false);
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -1534,17 +1534,17 @@ nsXULPopupManager::FirePopupHidingEvent(
     else {
       // If the popup has an animate attribute and it is not set to false, check
       // if it has a closing transition and wait for it to finish. The transition
       // may still occur either way, but the view will be hidden and you won't be
       // 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. Transitions are currently disabled on Linux
       // due to rendering issues on certain configurations.
-#ifndef MOZ_WIDGET_GTK
+#if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX)
       if (!aNextPopup && aPopup->HasAttr(kNameSpaceID_None, nsGkAtoms::animate)) {
         // If animate="false" then don't transition at all. If animate="cancel",
         // only show the transition if cancelling the popup or rolling up.
         // Otherwise, always show the transition.
         nsAutoString animate;
         aPopup->GetAttr(kNameSpaceID_None, nsGkAtoms::animate, animate);
 
         if (!animate.EqualsLiteral("false") &&
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -444,17 +444,17 @@ tooltip {
   white-space: pre-wrap;
   margin-top: 21px;
 }
 
 panel[type="arrow"] {
   -moz-binding: url("chrome://global/content/bindings/popup.xml#arrowpanel");
 }
 
-%ifndef MOZ_WIDGET_GTK
+%if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX)
 
 panel[type="arrow"]:not([animate="false"]) {
   transform: scale(.4);
   opacity: 0;
   transition-property: transform, opacity;
   transition-duration: 0.15s;
   transition-timing-function: ease-out;
 }