[Pale-Moon] Issue MoonchildProductions/UXP#1516 - Change CAN_DRAW_IN_TITLEBAR to MOZ_CAN_DRAW_IN_TITLEBAR and set it for Windows only

Also updates platform commit pointer to match
This commit is contained in:
Matt A. Tobin 2020-04-14 19:20:29 -04:00 • committed by Roy Tam
commit 4950e7ff47
5 changed files with 17 additions and 15 deletions

View file

@ -106,7 +106,7 @@ toolbar[printpreview="true"] {
-moz-box-ordinal-group: 10; -moz-box-ordinal-group: 10;
} }
%ifdef CAN_DRAW_IN_TITLEBAR %ifdef MOZ_CAN_DRAW_IN_TITLEBAR
#main-window[inFullscreen] > #titlebar, #main-window[inFullscreen] > #titlebar,
#main-window[inFullscreen] .titlebar-placeholder, #main-window[inFullscreen] .titlebar-placeholder,
#main-window:not([tabsintitlebar]) .titlebar-placeholder { #main-window:not([tabsintitlebar]) .titlebar-placeholder {
@ -222,7 +222,7 @@ splitmenu {
} }
%ifdef MENUBAR_CAN_AUTOHIDE %ifdef MENUBAR_CAN_AUTOHIDE
%ifndef CAN_DRAW_IN_TITLEBAR %ifndef MOZ_CAN_DRAW_IN_TITLEBAR
#appmenu-toolbar-button > .toolbarbutton-text { #appmenu-toolbar-button > .toolbarbutton-text {
display: -moz-box; display: -moz-box;
} }

View file

@ -4706,7 +4706,7 @@ var TabsOnTop = {
var TabsInTitlebar = { var TabsInTitlebar = {
init: function() { init: function() {
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
this._readPref(); this._readPref();
Services.prefs.addObserver(this._prefName, this, false); Services.prefs.addObserver(this._prefName, this, false);
@ -4719,7 +4719,7 @@ var TabsInTitlebar = {
}, },
allowedBy: function(condition, allow) { allowedBy: function(condition, allow) {
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
if (allow) { if (allow) {
if (condition in this._disallowed) { if (condition in this._disallowed) {
delete this._disallowed[condition]; delete this._disallowed[condition];
@ -4738,7 +4738,7 @@ var TabsInTitlebar = {
return document.documentElement.getAttribute("tabsintitlebar") == "true"; return document.documentElement.getAttribute("tabsintitlebar") == "true";
}, },
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
observe: function(subject, topic, data) { observe: function(subject, topic, data) {
if (topic == "nsPref:changed") if (topic == "nsPref:changed")
this._readPref(); this._readPref();
@ -4812,7 +4812,7 @@ var TabsInTitlebar = {
#endif #endif
uninit: function() { uninit: function() {
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
this._initialized = false; this._initialized = false;
Services.prefs.removeObserver(this._prefName, this); Services.prefs.removeObserver(this._prefName, this);
#endif #endif
@ -4826,7 +4826,7 @@ function updateAppButtonDisplay() {
window.menubar.visible && window.menubar.visible &&
document.getElementById("toolbar-menubar").getAttribute("autohide") == "true"; document.getElementById("toolbar-menubar").getAttribute("autohide") == "true";
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
document.getElementById("titlebar").hidden = !displayAppButton; document.getElementById("titlebar").hidden = !displayAppButton;
if (displayAppButton) if (displayAppButton)
@ -4842,7 +4842,7 @@ function updateAppButtonDisplay() {
} }
#endif #endif
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
function onTitlebarMaxClick() { function onTitlebarMaxClick() {
if (window.windowState == window.STATE_MAXIMIZED) if (window.windowState == window.STATE_MAXIMIZED)
window.restore(); window.restore();

View file

@ -324,7 +324,7 @@
</popupset> </popupset>
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
<vbox id="titlebar"> <vbox id="titlebar">
<hbox id="titlebar-content"> <hbox id="titlebar-content">
#ifdef MENUBAR_CAN_AUTOHIDE #ifdef MENUBAR_CAN_AUTOHIDE
@ -374,7 +374,7 @@
#include browser-menubar.inc #include browser-menubar.inc
</toolbaritem> </toolbaritem>
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
<hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/> <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/> <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
#endif #endif
@ -771,7 +771,7 @@
</toolbar> </toolbar>
#ifdef MENUBAR_CAN_AUTOHIDE #ifdef MENUBAR_CAN_AUTOHIDE
#ifndef CAN_DRAW_IN_TITLEBAR #ifndef MOZ_CAN_DRAW_IN_TITLEBAR
#define APPMENU_ON_TABBAR #define APPMENU_ON_TABBAR
#endif #endif
#endif #endif
@ -838,7 +838,7 @@
label="&closeTab.label;" label="&closeTab.label;"
tooltiptext="&closeTab.label;"/> tooltiptext="&closeTab.label;"/>
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef MOZ_CAN_DRAW_IN_TITLEBAR
<hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/> <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/> <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
#endif #endif

View file

@ -11,9 +11,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1 DEFINES['HAVE_SHELL_SERVICE'] = 1
DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1 DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'): if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1 DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1

View file

@ -79,6 +79,11 @@ MOZ_JSDOWNLOADS=1
# conformant implementations. # conformant implementations.
MOZ_WEBGL_CONFORMANT=1 MOZ_WEBGL_CONFORMANT=1
# Platform Feature: Enable drawing in the titlebar on Windows
if test "$OS_ARCH" = "WINNT"; then
MOZ_CAN_DRAW_IN_TITLEBAR=1
fi
# Set the chrome packing format # Set the chrome packing format
# Possible values are omni, jar, and flat # Possible values are omni, jar, and flat
# Currently, only omni and flat are supported # Currently, only omni and flat are supported