Bug 1352075 - Add Photon arrow-panel animation for Windows only. r?dao, r?mossop draft
authorSam Foster <sfoster@mozilla.com>
Wed, 14 Jun 2017 10:44:13 -0700
changeset 594259 af97547ac19948849f88c423d8dbfa1a0aedbd4d
parent 594258 7e826f70403676e32c303915da97b81d00f1146d
child 633364 1d2118198b6afd39099cddeec09a506b82e33e6f
push id63965
push userbmo:sfoster@mozilla.com
push dateWed, 14 Jun 2017 19:10:37 +0000
reviewersdao, mossop
bugs1352075, 1291457
milestone56.0a1
Bug 1352075 - Add Photon arrow-panel animation for Windows only. r?dao, r?mossop * Use new panel animation when opening arrow-panels (including bookmarks menu) to fade in and drop into position * Linux/GTK is already excluded. Also exclude OSX due to jank. See bug 1291457 * The same element has its opacity and transform properties animated as before, so it doesnt change fundamentally * New animation is non-directional (i.e. LTR vs. RTL) MozReview-Commit-ID: LwjnasXquhV
browser/base/content/browser.css
toolkit/content/xul.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -1049,37 +1049,31 @@ 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;
 }
 
-%if !defined(MOZ_WIDGET_GTK) && defined(MOZ_PHOTON_ANIMATIONS)
+%if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX) && defined(MOZ_PHOTON_ANIMATIONS)
 #BMB_bookmarksPopup {
   opacity: 0;
-%ifdef XP_MACOSX
-  transition-property: opacity;
-  transition-duration: 0.18s;
-  transition-timing-function: var(--animation-easing-function);
-%else
   transform: translateY(-10px);
   transition-property: transform, opacity;
   transition-duration: 0.18s, 0.18s;
   transition-timing-function:
     var(--animation-easing-function), var(--animation-easing-function);
-%endif
 }
 
+%if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX) && defined(MOZ_PHOTON_ANIMATIONS)
 #BMB_bookmarksPopup[side="bottom"] {
-%ifndef XP_MACOSX
   transform: translateY(10px);
+}
 %endif
-}
 
 #BMB_bookmarksPopup[animate="open"] {
   opacity: 1.0;
   transform: none;
 }
 
 #BMB_bookmarksPopup[animate="cancel"] {
   transform: none;
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -438,33 +438,27 @@ tooltip {
   white-space: pre-wrap;
   margin-top: 21px;
 }
 
 panel[type="arrow"] {
   -moz-binding: url("chrome://global/content/bindings/popup.xml#arrowpanel");
 }
 
-%if !defined(MOZ_WIDGET_GTK) && defined(MOZ_PHOTON_ANIMATIONS)
+%if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX) && defined(MOZ_PHOTON_ANIMATIONS)
 panel[type="arrow"]:not([animate="false"]) {
   opacity: 0;
-%ifdef XP_MACOSX
-  transition-property: opacity;
-  transition-duration: 0.18s;
-  transition-timing-function: var(--animation-easing-function);
-%else
   transform: translateY(-10px);
   transition-property: transform, opacity;
   transition-duration: 0.18s, 0.18s;
   transition-timing-function:
     var(--animation-easing-function), var(--animation-easing-function);
-%endif
 }
 
-%if !defined(MOZ_WIDGET_GTK) && defined(MOZ_PHOTON_ANIMATIONS)
+%if !defined(MOZ_WIDGET_GTK) && !defined(XP_MACOSX) && defined(MOZ_PHOTON_ANIMATIONS)
 panel[type="arrow"][side="bottom"]:not([animate="false"]) {
   transform: translateY(10px);
 }
 %endif
 
 panel[type="arrow"][animate="open"] {
   opacity: 1.0;
   transform: none;