Bug 736735 notification.css: Use inheritance instead of non-performant css r=dolske.
authorPhilip Chee <philip.chee@gmail.com>
Thu, 22 Mar 2012 01:00:08 +0800
changeset 89940 20031e64e0f3236368f690e98e6dd214edb8138f
parent 89939 5d47b047e08f666dc7864c87aeee452dd5aa2dcb
child 89941 b411890365e850e8b70a2954b38f296d24bbd4b4
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdolske
bugs736735
milestone14.0a1
Bug 736735 notification.css: Use inheritance instead of non-performant css r=dolske.
toolkit/content/widgets/notification.xml
toolkit/themes/gnomestripe/global/notification.css
toolkit/themes/pinstripe/global/notification.css
toolkit/themes/winstripe/global/notification.css
--- a/toolkit/content/widgets/notification.xml
+++ b/toolkit/content/widgets/notification.xml
@@ -335,17 +335,17 @@
 
   </binding>
 
   <binding id="notification">
     <content>
       <xul:hbox class="notification-inner outset" flex="1" xbl:inherits="type">
         <xul:hbox anonid="details" align="center" flex="1"
                   oncommand="this.parentNode.parentNode._doButtonCommand(event);">
-          <xul:image anonid="messageImage" class="messageImage" xbl:inherits="src=image"/>
+          <xul:image anonid="messageImage" class="messageImage" xbl:inherits="src=image,type,value"/>
           <xul:description anonid="messageText" class="messageText" flex="1" xbl:inherits="xbl:text=label"/>
           <xul:spacer flex="1"/>
           <children/>
         </xul:hbox>
         <xul:toolbarbutton ondblclick="event.stopPropagation();"
                            class="messageCloseButton tabbable"
                            xbl:inherits="hidden=hideclose"
                            tooltiptext="&closeNotification.tooltip;"
--- a/toolkit/themes/gnomestripe/global/notification.css
+++ b/toolkit/themes/gnomestripe/global/notification.css
@@ -30,25 +30,25 @@ notification[type="critical"] {
   width: 16px;
   height: 16px;
   -moz-margin-start: 6px;
   -moz-margin-end: 1px;
 }
 
 /* Default icons for notifications */
 
-notification[type="info"] .messageImage {
+.messageImage[type="info"] {
   list-style-image: url("moz-icon://stock/gtk-dialog-info?size=menu");
 }
 
-notification[type="warning"] .messageImage {
+.messageImage[type="warning"] {
   list-style-image: url("moz-icon://stock/gtk-dialog-warning?size=menu");
 }
 
-notification[type="critical"] .messageImage {
+.messageImage[type="critical"] {
   list-style-image: url("moz-icon://stock/gtk-dialog-error?size=menu");
 }
 
 .messageCloseButton {
   list-style-image: url("moz-icon://stock/gtk-close?size=menu");
   margin-top: 0;
   margin-bottom: 0;
 }
--- a/toolkit/themes/pinstripe/global/notification.css
+++ b/toolkit/themes/pinstripe/global/notification.css
@@ -30,25 +30,25 @@ notification[type="critical"] {
 .messageImage {
   width: 16px;
   height: 16px;
   margin: 0 4px;
 }
 
 /* Default icons for notifications */
 
-notification[type="info"] .messageImage {
+.messageImage[type="info"] {
   list-style-image: url("chrome://global/skin/notification/info-icon.png");
 }
 
-notification[type="warning"] .messageImage {
+.messageImage[type="warning"] {
   list-style-image: url("chrome://global/skin/notification/warning-icon.png");
 }
 
-notification[type="critical"] .messageImage {
+.messageImage[type="critical"] {
   list-style-image: url("chrome://global/skin/notification/error-icon.png");
 }
 
 .notification-inner {
   border: 0 !important;
 }
 
 .messageText {
--- a/toolkit/themes/winstripe/global/notification.css
+++ b/toolkit/themes/winstripe/global/notification.css
@@ -20,25 +20,25 @@ notification[type="critical"] {
   width: 16px;
   height: 16px;
   -moz-margin-start: 6px;
   -moz-margin-end: 1px;
 }
 
 /* Default icons for notifications */
 
-notification[type="info"] .messageImage {
+.messageImage[type="info"] {
   list-style-image: url("chrome://global/skin/icons/information-16.png");
 }
 
-notification[type="warning"] .messageImage {
+.messageImage[type="warning"] {
   list-style-image: url("chrome://global/skin/icons/warning-16.png");
 }
 
-notification[type="critical"] .messageImage {
+.messageImage[type="critical"] {
   list-style-image: url("chrome://global/skin/icons/error-16.png");
 }
 
 .messageCloseButton {
   list-style-image: url("chrome://global/skin/icons/close.png");
   -moz-appearance: none;
   -moz-image-region: rect(0, 16px, 16px, 0);
   padding: 4px 2px;