Bug 1314091 - Rename devedition.* to compacttheme.*;r=Gijs
MozReview-Commit-ID: 9y9BTK2TeAr
rename from browser/base/content/browser-devedition.js
rename to browser/base/content/browser-compacttheme.js
--- a/browser/base/content/browser-devedition.js
+++ b/browser/base/content/browser-compacttheme.js
@@ -1,19 +1,19 @@
/* 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/. */
/**
- * Listeners for the DevEdition theme. This adds an extra stylesheet
+ * Listeners for the compact theme. This adds an extra stylesheet
* to browser.xul if a pref is set and no other themes are applied.
*/
-var DevEdition = {
+var CompactTheme = {
_devtoolsThemePrefName: "devtools.theme",
- styleSheetLocation: "chrome://browser/skin/devedition.css",
+ styleSheetLocation: "chrome://browser/skin/compacttheme.css",
styleSheet: null,
initialized: false,
get isStyleSheetEnabled() {
return this.styleSheet && !this.styleSheet.sheet.disabled;
},
get isThemeCurrentlyApplied() {
@@ -115,15 +115,15 @@ var DevEdition = {
Services.obs.removeObserver(this, "lightweight-theme-styling-update", false);
if (this.styleSheet) {
this.styleSheet.removeEventListener("load", this);
}
this.styleSheet = null;
}
};
-// If the DevEdition theme is going to be applied in gBrowserInit.onLoad,
+// If the compact theme is going to be applied in gBrowserInit.onLoad,
// then preload it now. This prevents a flash of unstyled content where the
-// normal theme is applied while the DevEdition stylesheet is loading.
+// normal theme is applied while the compact theme stylesheet is loading.
if (!AppConstants.RELEASE_OR_BETA &&
- this != Services.appShell.hiddenDOMWindow && DevEdition.isThemeCurrentlyApplied) {
- DevEdition.createStyleSheet();
+ this != Services.appShell.hiddenDOMWindow && CompactTheme.isThemeCurrentlyApplied) {
+ CompactTheme.createStyleSheet();
}
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -998,17 +998,17 @@ var gBrowserInit = {
// loading the frame script to ensure that we don't miss any
// message sent between when the frame script is loaded and when
// the listener is registered.
DOMLinkHandler.init();
gPageStyleMenu.init();
LanguageDetectionListener.init();
BrowserOnClick.init();
FeedHandler.init();
- DevEdition.init();
+ CompactTheme.init();
AboutPrivateBrowsingListener.init();
TrackingProtection.init();
RefreshBlocker.init();
let mm = window.getGroupMessageManager("browsers");
mm.loadFrameScript("chrome://browser/content/tab-content.js", true);
mm.loadFrameScript("chrome://browser/content/content.js", true);
mm.loadFrameScript("chrome://browser/content/content-UITour.js", true);
@@ -1515,17 +1515,17 @@ var gBrowserInit = {
TabletModeUpdater.uninit();
gTabletModePageCounter.finish();
BrowserOnClick.uninit();
FeedHandler.uninit();
- DevEdition.uninit();
+ CompactTheme.uninit();
TrackingProtection.uninit();
RefreshBlocker.uninit();
gMenuButtonUpdateBadge.uninit();
gMenuButtonBadgeManager.uninit();
--- a/browser/base/content/global-scripts.inc
+++ b/browser/base/content/global-scripts.inc
@@ -8,17 +8,17 @@
<script type="application/javascript" src="chrome://browser/content/places/browserPlacesViews.js"/>
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
<script type="application/javascript" src="chrome://browser/content/customizableui/panelUI.js"/>
<script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-addons.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-ctrlTab.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-customization.js"/>
-<script type="application/javascript" src="chrome://browser/content/browser-devedition.js"/>
+<script type="application/javascript" src="chrome://browser/content/browser-compacttheme.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-feeds.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-fullScreenAndPointerLock.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-fullZoom.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-gestureSupport.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-media.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-plugins.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-refreshblocker.js"/>
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -275,31 +275,31 @@ tags = mcb
[browser_bug970746.js]
[browser_bug1015721.js]
skip-if = os == 'win'
[browser_accesskeys.js]
[browser_clipboard.js]
subsuite = clipboard
[browser_clipboard_pastefile.js]
skip-if = true # Disabled due to the clipboard not supporting real file types yet (bug 1288773)
+[browser_compacttheme.js]
[browser_contentAreaClick.js]
skip-if = e10s # Clicks in content don't go through contentAreaClick with e10s.
[browser_contentAltClick.js]
[browser_contextmenu.js]
subsuite = clipboard
tags = fullscreen
skip-if = toolkit == "gtk2" || toolkit == "gtk3" # disabled on Linux due to bug 513558
[browser_contextmenu_input.js]
skip-if = toolkit == "gtk2" || toolkit == "gtk3" # disabled on Linux due to bug 513558
[browser_ctrlTab.js]
[browser_datachoices_notification.js]
skip-if = !datareporting
[browser_decoderDoctor.js]
skip-if = os == "mac" # decoder doctor isn't implemented on osx
-[browser_devedition.js]
[browser_discovery.js]
[browser_double_close_tab.js]
[browser_documentnavigation.js]
[browser_duplicateIDs.js]
[browser_drag.js]
skip-if = true # browser_drag.js is disabled, as it needs to be updated for the new behavior from bug 320638.
[browser_extension_permissions.js]
[browser_favicon_change.js]
rename from browser/base/content/test/general/browser_devedition.js
rename to browser/base/content/test/general/browser_compacttheme.js
--- a/browser/base/content/test/general/browser_devedition.js
+++ b/browser/base/content/test/general/browser_compacttheme.js
@@ -22,63 +22,63 @@ registerCleanupFunction(() => {
LightweightThemeManager.clearBuiltInThemes();
});
add_task(function* startTests() {
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
info("Setting the current theme to null");
LightweightThemeManager.currentTheme = null;
- ok(!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
+ ok(!CompactTheme.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
info("Adding a lightweight theme.");
LightweightThemeManager.currentTheme = dummyLightweightTheme("preview0");
- ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been removed when a lightweight theme is applied.");
+ ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet has been removed when a lightweight theme is applied.");
info("Applying the devedition lightweight theme.");
let onAttributeAdded = waitForBrightTitlebarAttribute();
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
yield onAttributeAdded;
is(document.documentElement.getAttribute("brighttitlebarforeground"), "true",
"The brighttitlebarforeground attribute is set on the window.");
info("Unapplying all themes.");
LightweightThemeManager.currentTheme = null;
- ok(!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
+ ok(!CompactTheme.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
info("Applying the devedition lightweight theme.");
onAttributeAdded = waitForBrightTitlebarAttribute();
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
yield onAttributeAdded;
ok(document.documentElement.hasAttribute("brighttitlebarforeground"),
"The brighttitlebarforeground attribute is set on the window with dark devtools theme.");
});
add_task(function* testDevtoolsTheme() {
info("Checking stylesheet and :root attributes based on devtools theme.");
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
is(document.documentElement.getAttribute("devtoolstheme"), "light",
"The documentElement has an attribute based on devtools theme.");
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the light devtools theme.");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is still there with the light devtools theme.");
ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
"The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
is(document.documentElement.getAttribute("devtoolstheme"), "dark",
"The documentElement has an attribute based on devtools theme.");
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the dark devtools theme.");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is still there with the dark devtools theme.");
is(document.documentElement.getAttribute("brighttitlebarforeground"), "true",
"The brighttitlebarforeground attribute is set on the window with dark devtools theme.");
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "foobar");
is(document.documentElement.getAttribute("devtoolstheme"), "light",
"The documentElement has 'light' as a default for the devtoolstheme attribute");
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme.");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme.");
ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
"The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
});
function dummyLightweightTheme(id) {
return {
id,
name: id,
@@ -87,33 +87,33 @@ function dummyLightweightTheme(id) {
textcolor: "red",
accentcolor: "blue"
};
}
add_task(function* testLightweightThemePreview() {
info("Setting devedition to current and the previewing others");
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview0"));
- ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a lightweight theme preview.");
+ ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a lightweight theme preview.");
LightweightThemeManager.resetPreview();
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview1"));
- ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a second lightweight theme preview.");
+ ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a second lightweight theme preview.");
LightweightThemeManager.resetPreview();
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled again after resetting the preview.");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is enabled again after resetting the preview.");
LightweightThemeManager.currentTheme = null;
- ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is gone after removing the current theme.");
+ ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is gone after removing the current theme.");
info("Previewing the devedition theme");
LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org"));
- ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
+ ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview2"));
LightweightThemeManager.resetPreview();
- ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is now disabled after resetting the preview.");
+ ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is now disabled after resetting the preview.");
});
// Use a mutation observer to wait for the brighttitlebarforeground
// attribute to change. Using this instead of waiting for the load
// event on the DevEdition styleSheet.
function waitForBrightTitlebarAttribute() {
return new Promise((resolve, reject) => {
let mutationObserver = new MutationObserver(function(mutations) {
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -67,17 +67,17 @@ browser.jar:
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
* content/browser/browser.css (content/browser.css)
content/browser/browser.js (content/browser.js)
* content/browser/browser.xul (content/browser.xul)
content/browser/browser-addons.js (content/browser-addons.js)
content/browser/browser-ctrlTab.js (content/browser-ctrlTab.js)
content/browser/browser-customization.js (content/browser-customization.js)
content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
- content/browser/browser-devedition.js (content/browser-devedition.js)
+ content/browser/browser-compacttheme.js (content/browser-compacttheme.js)
content/browser/browser-feeds.js (content/browser-feeds.js)
content/browser/browser-fullScreenAndPointerLock.js (content/browser-fullScreenAndPointerLock.js)
content/browser/browser-fullZoom.js (content/browser-fullZoom.js)
content/browser/browser-fxaccounts.js (content/browser-fxaccounts.js)
content/browser/browser-gestureSupport.js (content/browser-gestureSupport.js)
content/browser/browser-media.js (content/browser-media.js)
content/browser/browser-places.js (content/browser-places.js)
content/browser/browser-plugins.js (content/browser-plugins.js)
rename from browser/themes/linux/devedition.css
rename to browser/themes/linux/compacttheme.css
--- a/browser/themes/linux/devedition.css
+++ b/browser/themes/linux/compacttheme.css
@@ -1,13 +1,13 @@
% 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/.
-%include ../shared/devedition.inc.css
+%include ../shared/compacttheme.inc.css
:root {
--forwardbutton-width: 29px;
}
:root[devtoolstheme="light"] {
--urlbar-dropmarker-url: url("chrome://browser/skin/devedition/urlbar-history-dropmarker.svg");
--urlbar-dropmarker-region: rect(0px, 11px, 14px, 0px);
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -6,17 +6,17 @@ browser.jar:
% skin browser classic/1.0 %skin/classic/browser/
% override chrome://global/skin/icons/warning-16.png moz-icon://stock/gtk-dialog-warning?size=menu
#include ../shared/jar.inc.mn
skin/classic/browser/sanitizeDialog.css
skin/classic/browser/aboutSessionRestore-window-icon.png
skin/classic/browser/aboutSyncTabs.css
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
* skin/classic/browser/browser.css
-* skin/classic/browser/devedition.css
+* skin/classic/browser/compacttheme.css
* skin/classic/browser/browser-lightweightTheme.css
skin/classic/browser/click-to-play-warning-stripes.png
skin/classic/browser/Info.png
skin/classic/browser/menuPanel-customize.png
skin/classic/browser/menuPanel-customize@2x.png
skin/classic/browser/menuPanel-exit.png
skin/classic/browser/menuPanel-exit@2x.png
skin/classic/browser/menuPanel-help.png
rename from browser/themes/osx/devedition.css
rename to browser/themes/osx/compacttheme.css
--- a/browser/themes/osx/devedition.css
+++ b/browser/themes/osx/compacttheme.css
@@ -1,13 +1,13 @@
% 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/.
-%include ../shared/devedition.inc.css
+%include ../shared/compacttheme.inc.css
:root {
--forwardbutton-width: 32px;
}
/* Use only 1px separator between nav toolbox and page content */
#navigator-toolbox::after {
border-top-style: none;
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -5,17 +5,17 @@
browser.jar:
% skin browser classic/1.0 %skin/classic/browser/
#include ../shared/jar.inc.mn
skin/classic/browser/sanitizeDialog.css
skin/classic/browser/aboutSessionRestore-window-icon.png
skin/classic/browser/aboutSyncTabs.css
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
* skin/classic/browser/browser.css
-* skin/classic/browser/devedition.css
+* skin/classic/browser/compacttheme.css
* skin/classic/browser/browser-lightweightTheme.css
skin/classic/browser/click-to-play-warning-stripes.png
skin/classic/browser/Info.png
skin/classic/browser/keyhole-circle.png
skin/classic/browser/keyhole-circle@2x.png
skin/classic/browser/subtle-pattern.png
skin/classic/browser/menu-back.png
skin/classic/browser/menu-forward.png
rename from browser/themes/shared/devedition.inc.css
rename to browser/themes/shared/compacttheme.inc.css
--- a/browser/themes/shared/devedition.inc.css
+++ b/browser/themes/shared/compacttheme.inc.css
@@ -1,15 +1,15 @@
% 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/.
-/* devedition.css is loaded in browser.xul after browser.css when it is
+/* compacttheme.css is loaded in browser.xul after browser.css when it is
preffed on. The bulk of the styling is here in the shared file, but
- there are overrides for each platform in their devedition.css files. */
+ there are overrides for each platform in their compacttheme.css files. */
:root {
--tab-toolbar-navbar-overlap: 0px;
--navbar-tab-toolbar-highlight-overlap: 0px;
--space-above-tabbar: 0px;
--toolbarbutton-text-shadow: none;
--backbutton-urlbar-overlap: 0px;
}
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -182,17 +182,17 @@ toolbar:-moz-lwtheme {
min-height: 0.1px;
max-height: 0;
transition: min-height 170ms ease-out, max-height 170ms ease-out, visibility 170ms linear;
}
@media (-moz-windows-compositor: 0),
(-moz-windows-default-theme: 0) {
/* Please keep the menu text colors in this media block in sync with
- * devedition.css, minus the :not(:-moz-lwtheme) condition - see Bug 1165718.
+ * compacttheme.css, minus the :not(:-moz-lwtheme) condition - see Bug 1165718.
*/
#main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar:not(:-moz-lwtheme),
#main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar:not(:-moz-lwtheme) {
color: CaptionText;
}
#main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive,
#main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
rename from browser/themes/windows/devedition.css
rename to browser/themes/windows/compacttheme.css
--- a/browser/themes/windows/devedition.css
+++ b/browser/themes/windows/compacttheme.css
@@ -1,13 +1,13 @@
% 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/.
-%include ../shared/devedition.inc.css
+%include ../shared/compacttheme.inc.css
:root {
--forwardbutton-width: 29px;
}
:root[devtoolstheme="dark"],
:root[devtoolstheme="light"] {
/* Matches the #browser-border-start, #browser-border-end color */
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -5,17 +5,17 @@
browser.jar:
% skin browser classic/1.0 %skin/classic/browser/
#include ../shared/jar.inc.mn
skin/classic/browser/sanitizeDialog.css
skin/classic/browser/aboutSessionRestore-window-icon.png
skin/classic/browser/aboutSyncTabs.css
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
* skin/classic/browser/browser.css
-* skin/classic/browser/devedition.css
+* skin/classic/browser/compacttheme.css
* skin/classic/browser/browser-lightweightTheme.css
skin/classic/browser/caption-buttons.svg
skin/classic/browser/click-to-play-warning-stripes.png
skin/classic/browser/Info.png
skin/classic/browser/keyhole-forward-mask.svg
skin/classic/browser/livemark-folder.png
skin/classic/browser/menu-back.png
skin/classic/browser/menu-forward.png