Bug 1664065 - Remove Heartbeat specific styling since Firefox now shows notification bars in the same dimensions that Heartbeat wanted. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D89818
This commit is contained in:
Jared Wein 2020-09-11 23:48:02 +00:00
Родитель 051c67f828
Коммит 5d182de8f6
3 изменённых файлов: 2 добавлений и 38 удалений

Просмотреть файл

@ -4,9 +4,6 @@
"use strict";
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
const { Preferences } = ChromeUtils.import(
"resource://gre/modules/Preferences.jsm"
);
@ -39,10 +36,6 @@ const NOTIFICATION_TIME = 3000;
const HEARTBEAT_CSS_URI = Services.io.newURI(
"resource://normandy/skin/shared/Heartbeat.css"
);
const HEARTBEAT_CSS_URI_OSX = Services.io.newURI(
"resource://normandy/skin/osx/Heartbeat.css"
);
const log = LogManager.getLogger("heartbeat");
const windowsWithInjectedCss = new WeakSet();
let anyWindowsWithInjectedCss = false;
@ -54,9 +47,6 @@ CleanupManager.addCleanupHandler(() => {
if (windowsWithInjectedCss.has(window)) {
const utils = window.windowUtils;
utils.removeSheet(HEARTBEAT_CSS_URI, window.AGENT_SHEET);
if (AppConstants.platform === "macosx") {
utils.removeSheet(HEARTBEAT_CSS_URI_OSX, window.AGENT_SHEET);
}
windowsWithInjectedCss.delete(window);
}
}
@ -143,9 +133,6 @@ var Heartbeat = class {
windowsWithInjectedCss.add(chromeWindow);
const utils = chromeWindow.windowUtils;
utils.loadSheet(HEARTBEAT_CSS_URI, chromeWindow.AGENT_SHEET);
if (AppConstants.platform === "macosx") {
utils.loadSheet(HEARTBEAT_CSS_URI_OSX, chromeWindow.AGENT_SHEET);
}
anyWindowsWithInjectedCss = true;
}

Просмотреть файл

@ -1,11 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Notification overrides for Heartbeat UI */
notification.heartbeat {
background-image: linear-gradient(-179deg, #FBFBFB 0%, #EBEBEB 100%) !important;
border-bottom: 1px solid #C1C1C1 !important;
height: 40px;
}

Просмотреть файл

@ -4,11 +4,6 @@
/* Notification overrides for Heartbeat UI */
notification.heartbeat {
border-bottom: 1px solid #C1C1C1 !important;
height: 40px;
}
@keyframes pulse-onshow {
0% {
opacity: 0;
@ -47,16 +42,9 @@ notification.heartbeat {
}
}
.messageText.heartbeat {
margin-inline-end: 12px !important; /* The !important is required to override OSX default style. */
margin-inline-start: 0;
}
.messageImage.heartbeat {
height: 24px !important;
margin-inline-end: 8px !important;
margin-inline-start: 8px !important;
width: 24px !important;
/* Needed for the animation to not get clipped when pulsing. */
margin-inline: 8px;
}
.messageImage.heartbeat.pulse-onshow {