Bug 1223573 - Part 8. Work around assertions caused by attempting to load the style sheets as author sheets - load them as user sheets for now. r=mikedeboer

This commit is contained in:
Mark Banner 2015-11-29 17:08:35 +00:00
parent 9be0988b03
commit 6044e49a94
4 changed files with 118 additions and 92 deletions

View File

@ -787,8 +787,12 @@ function startup() {
"chrome://loop/skin/platform.css"];
for (let sheet of sheets) {
let styleSheetURI = Services.io.newURI(sheet, null, null);
// XXX We would love to specify AUTHOR_SHEET here and in shutdown, however
// bug 1228542 prevents us from doing that as we'd cause a lot of assertions
// in debug mode for tests. Once that is fixed, we should be able to change
// this, and remove the !important attributes from our syle sheets.
styleSheetService.loadAndRegisterSheet(styleSheetURI,
styleSheetService.AUTHOR_SHEET);
styleSheetService.USER_SHEET);
}
}

View File

@ -4,36 +4,44 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
notification[value="loop-sharing-notification"] {
background: #00a9dc;
padding: 0;
border: 0;
}
/* Only apply to browser.xul documents */
@-moz-document url("chrome://browser/content/browser.xul") {
/**
* XXX Due to bug 1228542, anything in this file that overrides a browser style
* must specify !important. Otherwise the style won't get applied correctly
* due to the limitations caused by the bug.
*/
notification[value="loop-sharing-notification"].paused {
background: #ebebeb;
}
notification[value="loop-sharing-notification"] {
background: #00a9dc !important;
padding: 0 !important;
border: 0 !important;
}
notification[value="loop-sharing-notification"] .notification-button {
background: #fff;
border-radius: 0;
}
notification[value="loop-sharing-notification"].paused {
background: #ebebeb !important;
}
notification[value="loop-sharing-notification"].paused .notification-button {
background: #57bd35;
}
notification[value="loop-sharing-notification"] .notification-button {
background: #fff !important;
border-radius: 0 !important;
}
notification[value="loop-sharing-notification"].paused .notification-button:hover {
background: #39a017;
}
notification[value="loop-sharing-notification"].paused .notification-button {
background: #57bd35 !important;
}
notification[value="loop-sharing-notification"] .notification-button:hover,
notification[value="loop-sharing-notification"].paused .notification-button-default:hover {
background: #ebebeb;
}
notification[value="loop-sharing-notification"].paused .notification-button:hover {
background: #39a017 !important;
}
notification[value="loop-sharing-notification"] .notification-button-default,
notification[value="loop-sharing-notification"].paused .notification-button-default {
background: #fff;
}
notification[value="loop-sharing-notification"] .notification-button:hover,
notification[value="loop-sharing-notification"].paused .notification-button-default:hover {
background: #ebebeb !important;
}
notification[value="loop-sharing-notification"] .notification-button-default,
notification[value="loop-sharing-notification"].paused .notification-button-default {
background: #fff !important;
}
}

View File

@ -6,14 +6,20 @@
/* Only apply to browser.xul documents */
@-moz-document url("chrome://browser/content/browser.xul") {
/**
* XXX Due to bug 1228542, anything in this file that overrides a browser style
* must specify !important. Otherwise the style won't get applied correctly
* due to the limitations caused by the bug.
*/
/*
XXX Copied from browser/themes/<platform>/browser.css. Should really be
changing the sizes of icons in files to 16px x 16px and no borders.
*/
:-moz-any(toolbar, .widget-overflow-list) #loop-button > .toolbarbutton-icon,
:-moz-any(toolbar, .widget-overflow-list) #loop-button > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon {
max-width: 18px;
margin: 0;
max-width: 18px !important;
margin: 0 !important;
}
#loop-button {
@ -161,120 +167,120 @@
}
notification[value="loop-sharing-notification"] {
-moz-appearance: none;
height: 40px;
background-color: #00a9dc;
box-shadow: 0 40px 1px rgba(0,0,0,.5) inset;
-moz-appearance: none !important;
height: 40px !important;
background-color: #00a9dc !important;
box-shadow: 0 40px 1px rgba(0,0,0,.5) inset !important;
}
notification[value="loop-sharing-notification"].paused {
background-color: #ebebeb;
background-color: #ebebeb !important;
}
notification[value="loop-sharing-notification"] .notification-inner {
color: #fff;
padding: 0;
color: #fff !important;
padding: 0 !important;
}
notification[value="loop-sharing-notification"].paused .notification-inner {
color: #00a9dc;
color: #00a9dc !important;
}
notification[value="loop-sharing-notification"] .notification-button {
-moz-appearance: none;
background-color: #fff;
border: 0;
border-right: solid 1px #ebebeb;
width: 100px;
height: 40px;
margin: 0;
list-style-image: url(chrome://browser/content/loop/shared/img/pause-12x12.svg);
box-shadow: 0 40px 1px rgba(0,0,0,.5) inset;
text-shadow: none;
-moz-appearance: none !important;
background-color: #fff !important;
border: 0 !important;
border-right: solid 1px #ebebeb !important;
width: 100px !important;
height: 40px !important;
margin: 0 !important;
list-style-image: url(chrome://loop/content/shared/img/pause-12x12.svg) !important;
box-shadow: 0 40px 1px rgba(0,0,0,.5) inset !important;
text-shadow: none !important;
}
notification[value="loop-sharing-notification"] .notification-button:-moz-locale-dir(rtl) {
border-right: 0;
border-left: solid 1px #ebebeb;
border-right: 0 !important;
border-left: solid 1px #ebebeb !important;
}
notification[value="loop-sharing-notification"].paused .notification-button {
background-color: #57bd35;
color: #fff;
list-style-image: url(chrome://browser/content/loop/shared/img/play-12x12.svg);
background-color: #57bd35 !important;
color: #fff !important;
list-style-image: url(chrome://loop/content/shared/img/play-12x12.svg) !important;
}
notification[value="loop-sharing-notification"].paused .notification-button:hover {
background-color: #39a017;
background-color: #39a017 !important;
}
notification[value="loop-sharing-notification"] .notification-button:hover,
notification[value="loop-sharing-notification"].paused .notification-button-default:hover {
background-color: #ebebeb;
background-color: #ebebeb !important;
}
notification[value="loop-sharing-notification"] .notification-button-default,
notification[value="loop-sharing-notification"].paused .notification-button-default {
color: #d92215;
background-color: #fff;
border-right: 0;
list-style-image: url(chrome://browser/content/loop/shared/img/stop-12x12.svg);
color: #d92215 !important;
background-color: #fff !important;
border-right: 0 !important;
list-style-image: url(chrome://loop/content/shared/img/stop-12x12.svg) !important;
}
notification[value="loop-sharing-notification"] .notification-button .button-icon {
display: block;
-moz-margin-end: 6px;
display: block !important;
-moz-margin-end: 6px !important;
}
notification[value="loop-sharing-notification"] .button-menubutton-button {
min-width: 0;
min-width: 0 !important;
}
notification[value="loop-sharing-notification"] .messageImage {
list-style-image: url(chrome://browser/content/loop/shared/img/icons-16x16.svg#loop-icon-white);
margin-inline-start: 14px;
list-style-image: url(chrome://loop/content/shared/img/icons-16x16.svg#loop-icon-white) !important;
margin-inline-start: 14px !important;
}
notification[value="loop-sharing-notification"].paused .messageImage {
list-style-image: url(chrome://browser/content/loop/shared/img/icons-16x16.svg#loop-icon-still);
list-style-image: url(chrome://loop/content/shared/img/icons-16x16.svg#loop-icon-still) !important;
}
notification[value="loop-sharing-notification"] .close-icon {
display: none;
display: none !important;
}
chatbox[src^="about:loopconversation#"] > .chat-titlebar {
background-color: #00a9dc;
border-color: #00a9dc;
background-color: #00a9dc !important;
border-color: #00a9dc !important;
}
chatbox[src^="about:loopconversation#"] .chat-title {
color: white;
color: white !important;
}
chatbox[src^="about:loopconversation#"] .chat-minimize-button {
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#minimize-white");
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#minimize-white") !important;
}
chatbox[src^="about:loopconversation#"] .chat-swap-button {
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#expand-white");
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#expand-white") !important;
}
.chat-loop-hangup {
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#exit-white");
background-color: #d13f1a;
border: 1px solid #d13f1a;
border-top-right-radius: 4px;
width: 32px;
height: 26px;
margin-top: -6px;
margin-bottom: -5px;
-moz-margin-start: 6px;
-moz-margin-end: -5px;
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#exit-white") !important;
background-color: #d13f1a !important;
border: 1px solid #d13f1a !important;
border-top-right-radius: 4px !important;
width: 32px !important;
height: 26px !important;
margin-top: -6px !important;
margin-bottom: -5px !important;
-moz-margin-start: 6px !important;
-moz-margin-end: -5px !important;
}
.chat-toolbarbutton.chat-loop-hangup:-moz-any(:hover,:hover:active) {
background-color: #ef6745;
border-color: #ef6745;
background-color: #ef6745 !important;
border-color: #ef6745 !important;
}
}

View File

@ -4,15 +4,23 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@media (-moz-windows-theme: luna-silver) and (max-resolution: 1dppx) {
#loop-button {
list-style-image: url(chrome://loop/skin/toolbar-lunaSilver.png)
/* Only apply to browser.xul documents */
@-moz-document url("chrome://browser/content/browser.xul") {
/**
* XXX Due to bug 1228542, anything in this file that overrides a browser style
* must specify !important. Otherwise the style won't get applied correctly
* due to the limitations caused by the bug.
*/
@media (-moz-windows-theme: luna-silver) and (max-resolution: 1dppx) {
#loop-button {
list-style-image: url(chrome://loop/skin/toolbar-lunaSilver.png)
}
}
@media (-moz-windows-theme: luna-silver) and (min-resolution: 1.1dppx) {
#loop-button {
list-style-image: url(chrome://loop/skin/toolbar-lunaSilver@2x.png)
}
}
}
@media (-moz-windows-theme: luna-silver) and (min-resolution: 1.1dppx) {
#loop-button {
list-style-image: url(chrome://loop/skin/toolbar-lunaSilver@2x.png)
}
}