Bug 1228999 - Undo css workaround in Loop's system-addon that was necessary as AUTHOR_SHEETS were previously not working correctly. r=mikedeboer

This commit is contained in:
Mark Banner 2015-12-03 07:43:25 +00:00
parent 7692ac9d98
commit 2a2a41aae9
3 changed files with 70 additions and 86 deletions

View File

@ -799,12 +799,8 @@ function startup() {
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.USER_SHEET);
styleSheetService.AUTHOR_SHEET);
}
}
@ -846,9 +842,9 @@ function shutdown() {
for (let sheet of sheets) {
let styleSheetURI = Services.io.newURI(sheet, null, null);
if (styleSheetService.sheetRegistered(styleSheetURI,
styleSheetService.USER_SHEET)) {
styleSheetService.AUTHOR_SHEET)) {
styleSheetService.unregisterSheet(styleSheetURI,
styleSheetService.USER_SHEET);
styleSheetService.AUTHOR_SHEET);
}
}

View File

@ -6,42 +6,36 @@
/* 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"] {
background: #00a9dc !important;
padding: 0 !important;
border: 0 !important;
background: #00a9dc;
padding: 0;
border: 0;
}
notification[value="loop-sharing-notification"].paused {
background: #ebebeb !important;
background: #ebebeb;
}
notification[value="loop-sharing-notification"] .notification-button {
background: #fff !important;
border-radius: 0 !important;
background: #fff;
border-radius: 0;
}
notification[value="loop-sharing-notification"].paused .notification-button {
background: #57bd35 !important;
background: #57bd35;
}
notification[value="loop-sharing-notification"].paused .notification-button:hover {
background: #39a017 !important;
background: #39a017;
}
notification[value="loop-sharing-notification"] .notification-button:hover,
notification[value="loop-sharing-notification"].paused .notification-button-default:hover {
background: #ebebeb !important;
background: #ebebeb;
}
notification[value="loop-sharing-notification"] .notification-button-default,
notification[value="loop-sharing-notification"].paused .notification-button-default {
background: #fff !important;
background: #fff;
}
}

View File

@ -6,20 +6,14 @@
/* 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 !important;
margin: 0 !important;
max-width: 18px;
margin: 0;
}
#loop-button {
@ -99,7 +93,7 @@
/* Make sure that the state icons are not shown in the customization palette. */
toolbarpaletteitem[place="palette"] > #loop-button {
-moz-image-region: rect(0, 64px, 64px, 0) !important;
-moz-image-region: rect(0, 64px, 64px, 0);
}
#loop-button[cui-areatype="menu-panel"][state="disabled"],
@ -137,7 +131,7 @@
/* Make sure that the state icons are not shown in the customization palette. */
toolbarpaletteitem[place="palette"] > #loop-button {
-moz-image-region: rect(0, 32px, 32px, 0) !important;
-moz-image-region: rect(0, 32px, 32px, 0);
}
#loop-button[cui-areatype="menu-panel"][state="disabled"],
@ -167,120 +161,120 @@
}
notification[value="loop-sharing-notification"] {
-moz-appearance: none !important;
height: 40px !important;
background-color: #00a9dc !important;
box-shadow: 0 40px 1px rgba(0,0,0,.5) inset !important;
-moz-appearance: none;
height: 40px;
background-color: #00a9dc;
box-shadow: 0 40px 1px rgba(0,0,0,.5) inset;
}
notification[value="loop-sharing-notification"].paused {
background-color: #ebebeb !important;
background-color: #ebebeb;
}
notification[value="loop-sharing-notification"] .notification-inner {
color: #fff !important;
padding: 0 !important;
color: #fff;
padding: 0;
}
notification[value="loop-sharing-notification"].paused .notification-inner {
color: #00a9dc !important;
color: #00a9dc;
}
notification[value="loop-sharing-notification"] .notification-button {
-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;
-moz-appearance: none;
background-color: #fff;
border: 0;
border-right: solid 1px #ebebeb;
width: 100px;
height: 40px;
margin: 0;
list-style-image: url(chrome://loop/content/shared/img/pause-12x12.svg);
box-shadow: 0 40px 1px rgba(0,0,0,.5) inset;
text-shadow: none;
}
notification[value="loop-sharing-notification"] .notification-button:-moz-locale-dir(rtl) {
border-right: 0 !important;
border-left: solid 1px #ebebeb !important;
border-right: 0;
border-left: solid 1px #ebebeb;
}
notification[value="loop-sharing-notification"].paused .notification-button {
background-color: #57bd35 !important;
color: #fff !important;
list-style-image: url(chrome://loop/content/shared/img/play-12x12.svg) !important;
background-color: #57bd35;
color: #fff;
list-style-image: url(chrome://loop/content/shared/img/play-12x12.svg);
}
notification[value="loop-sharing-notification"].paused .notification-button:hover {
background-color: #39a017 !important;
background-color: #39a017;
}
notification[value="loop-sharing-notification"] .notification-button:hover,
notification[value="loop-sharing-notification"].paused .notification-button-default:hover {
background-color: #ebebeb !important;
background-color: #ebebeb;
}
notification[value="loop-sharing-notification"] .notification-button-default,
notification[value="loop-sharing-notification"].paused .notification-button-default {
color: #d92215 !important;
background-color: #fff !important;
border-right: 0 !important;
list-style-image: url(chrome://loop/content/shared/img/stop-12x12.svg) !important;
color: #d92215;
background-color: #fff;
border-right: 0;
list-style-image: url(chrome://loop/content/shared/img/stop-12x12.svg);
}
notification[value="loop-sharing-notification"] .notification-button .button-icon {
display: block !important;
-moz-margin-end: 6px !important;
display: block;
-moz-margin-end: 6px;
}
notification[value="loop-sharing-notification"] .button-menubutton-button {
min-width: 0 !important;
min-width: 0;
}
notification[value="loop-sharing-notification"] .messageImage {
list-style-image: url(chrome://loop/content/shared/img/icons-16x16.svg#loop-icon-white) !important;
margin-inline-start: 14px !important;
list-style-image: url(chrome://loop/content/shared/img/icons-16x16.svg#loop-icon-white);
margin-inline-start: 14px;
}
notification[value="loop-sharing-notification"].paused .messageImage {
list-style-image: url(chrome://loop/content/shared/img/icons-16x16.svg#loop-icon-still) !important;
list-style-image: url(chrome://loop/content/shared/img/icons-16x16.svg#loop-icon-still);
}
notification[value="loop-sharing-notification"] .close-icon {
display: none !important;
display: none;
}
chatbox[src^="about:loopconversation#"] > .chat-titlebar {
background-color: #00a9dc !important;
border-color: #00a9dc !important;
background-color: #00a9dc;
border-color: #00a9dc;
}
chatbox[src^="about:loopconversation#"] .chat-title {
color: white !important;
color: white;
}
chatbox[src^="about:loopconversation#"] .chat-minimize-button {
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#minimize-white") !important;
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#minimize-white");
}
chatbox[src^="about:loopconversation#"] .chat-swap-button {
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#expand-white") !important;
list-style-image: url("chrome://browser/skin/social/chat-icons.svg#expand-white");
}
.chat-loop-hangup {
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;
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;
}
.chat-toolbarbutton.chat-loop-hangup:-moz-any(:hover,:hover:active) {
background-color: #ef6745 !important;
border-color: #ef6745 !important;
background-color: #ef6745;
border-color: #ef6745;
}
}