Bug 1384268 - Conditionally include the animation images only if the MOZ_PHOTON_ANIMATIONS build flag is enabled. r?mconley
MozReview-Commit-ID: HFJnyEnBZi7
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -117,17 +117,19 @@
skin/classic/browser/arrow-dropdown.svg (../shared/icons/arrow-dropdown.svg)
skin/classic/browser/arrow-left.svg (../shared/icons/arrow-left.svg)
skin/classic/browser/back.svg (../shared/icons/back.svg)
#ifndef MOZ_PHOTON_THEME
skin/classic/browser/back-large.svg (../shared/icons/back-large.svg)
#endif
skin/classic/browser/back-12.svg (../shared/icons/back-12.svg)
skin/classic/browser/bookmark.svg (../shared/icons/bookmark.svg)
+#ifdef MOZ_PHOTON_ANIMATIONS
skin/classic/browser/bookmark-animation.svg (../shared/icons/bookmark-animation.svg)
+#endif
skin/classic/browser/bookmark-hollow.svg (../shared/icons/bookmark-hollow.svg)
#ifndef MOZ_PHOTON_THEME
skin/classic/browser/bookmarksMenu.svg (../shared/icons/bookmarksMenu.svg)
#else
skin/classic/browser/bookmark-star-on-tray.svg (../shared/icons/bookmark-star-on-tray.svg)
#endif
skin/classic/browser/characterEncoding.svg (../shared/icons/characterEncoding.svg)
skin/classic/browser/chevron.svg (../shared/icons/chevron.svg)
@@ -157,17 +159,19 @@
skin/classic/browser/forward.svg (../shared/icons/forward.svg)
skin/classic/browser/fullscreen.svg (../shared/icons/fullscreen.svg)
skin/classic/browser/fullscreen-enter.svg (../shared/icons/fullscreen-enter.svg)
skin/classic/browser/fullscreen-exit.svg (../shared/icons/fullscreen-exit.svg)
skin/classic/browser/help.svg (../shared/icons/help.svg)
skin/classic/browser/history.svg (../shared/icons/history.svg)
skin/classic/browser/home.svg (../shared/icons/home.svg)
skin/classic/browser/library.svg (../shared/icons/library.svg)
+#ifdef MOZ_PHOTON_ANIMATIONS
skin/classic/browser/library-bookmark-animation.svg (../shared/icons/library-bookmark-animation.svg)
+#endif
#ifdef MOZ_PHOTON_THEME
skin/classic/browser/link.svg (../shared/icons/link.svg)
#endif
skin/classic/browser/mail.svg (../shared/icons/mail.svg)
skin/classic/browser/menu.svg (../shared/icons/menu.svg)
skin/classic/browser/new-tab.svg (../shared/icons/new-tab.svg)
skin/classic/browser/new-window.svg (../shared/icons/new-window.svg)
skin/classic/browser/open.svg (../shared/icons/open.svg)
--- a/browser/themes/shared/toolbarbutton-icons.inc.css
+++ b/browser/themes/shared/toolbarbutton-icons.inc.css
@@ -429,16 +429,17 @@ toolbar:not([brighttext]) #bookmarks-men
#webide-button@attributeSelectorForToolbar@ {
list-style-image: url("chrome://browser/skin/webIDE.svg");
}
#library-button {
list-style-image: url("chrome://browser/skin/library.svg");
}
+%ifdef MOZ_PHOTON_ANIMATIONS
@keyframes library-bookmark-animation {
from {
transform: translateX(0);
fill: inherit;
}
25% {
fill: inherit;
}
@@ -514,8 +515,9 @@ toolbar:not([brighttext]) #bookmarks-men
transform: scaleX(-1);
}
#library-button[animate="bookmark"][fade] > .toolbarbutton-animatable-box > .toolbarbutton-animatable-image {
animation-name: library-bookmark-fade;
animation-duration: 2s;
animation-timing-function: ease-out;
}
+%endif
--- a/browser/themes/shared/urlbar-searchbar.inc.css
+++ b/browser/themes/shared/urlbar-searchbar.inc.css
@@ -81,16 +81,17 @@
#urlbar-page-action-button,
.urlbar-icon {
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
fill-opacity: 0.6;
color: inherit;
}
+%ifdef MOZ_PHOTON_ANIMATIONS
@keyframes bookmark-animation {
from {
transform: translateX(0);
}
to {
transform: translateX(-627px);
}
}
@@ -102,27 +103,29 @@
to {
transform: scaleX(-1) translateX(-627px);
}
}
#star-button-box[animationsenabled] {
position: relative;
}
+%endif /* MOZ_PHOTON_ANIMATIONS */
#star-button {
list-style-image: url("chrome://browser/skin/bookmark-hollow.svg");
}
#star-button[starred] {
list-style-image: url("chrome://browser/skin/bookmark.svg");
fill-opacity: 1;
fill: var(--toolbarbutton-icon-fill-attention);
}
+%ifdef MOZ_PHOTON_ANIMATIONS
/* Preload the bookmark animations to prevent a flicker during the first playing
of the animations. */
#star-button[preloadanimations] + #star-button-animatable-box > #star-button-animatable-image {
background-image: url("chrome://browser/skin/bookmark-animation.svg"),
url("chrome://browser/skin/library-bookmark-animation.svg");
background-size: 0, 0;
}
@@ -157,16 +160,17 @@
animation-timing-function: steps(19);
animation-duration: 304ms;
width: 660px;
}
#star-button-box[animationsenabled] > #star-button[starred][animate]:-moz-locale-dir(rtl) + #star-button-animatable-box > #star-button-animatable-image {
animation-name: bookmark-animation-rtl;
}
+%endif /* MOZ_PHOTON_ANIMATIONS */
/* Page action popup */
#page-action-bookmark-button {
list-style-image: url("chrome://browser/skin/bookmark-hollow.svg");
}
#page-action-bookmark-button[starred] {
list-style-image: url("chrome://browser/skin/bookmark.svg");
@@ -190,17 +194,17 @@
.page-action-sendToDevice-device[clientType=desktop] {
list-style-image: url("chrome://browser/skin/device-desktop.svg");
}
#page-action-sendToDevice-fxa-button {
list-style-image: url("chrome://browser/skin/sync.svg");
}
-%endif
+%endif /* MOZ_PHOTON_THEME */
/* Zoom button */
#urlbar-zoom-button {
margin: 0 3px;
font-size: .8em;
padding: 0 8px;
border-radius: 1em;
background-color: hsla(0,0%,0%,.05);