зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1482256 - Support switching to browser.xul to browser.xhtml. r=mossop
Adds a new environment variable MOZ_BROWSER_XHTML to change Firefox to load a modified version of browser.xul as browser.xhtml. Adds the xhtml namespace to the script tags to make them work. MozReview-Commit-ID: 2adtOVzXHKd
This commit is contained in:
Родитель
87edbe15d3
Коммит
143db4e31d
|
@ -0,0 +1,3 @@
|
|||
#define BROWSER_XHTML
|
||||
#include browser.xul
|
||||
#undef BROWSER_XHTML
|
|
@ -72,7 +72,11 @@
|
|||
# that they can be shared with macWindow.inc.xul.
|
||||
#include global-scripts.inc
|
||||
|
||||
<script type="application/javascript">
|
||||
<script type="application/javascript"
|
||||
#ifdef BROWSER_XHTML
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
#endif
|
||||
>
|
||||
Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,11 @@
|
|||
# file so that ESLint works correctly:
|
||||
# tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
|
||||
|
||||
<script type="application/javascript">
|
||||
<script type="text/javascript"
|
||||
#ifdef BROWSER_XHTML
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
#endif
|
||||
>
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
for (let script of [
|
||||
|
|
|
@ -29,6 +29,9 @@ browser.jar:
|
|||
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
|
||||
* content/browser/browser.css (content/browser.css)
|
||||
content/browser/browser.js (content/browser.js)
|
||||
#ifdef MOZ_BROWSER_XHTML
|
||||
* content/browser/browser.xhtml (content/browser.xhtml)
|
||||
#endif
|
||||
* content/browser/browser.xul (content/browser.xul)
|
||||
content/browser/browser-addons.js (content/browser-addons.js)
|
||||
content/browser/browser-allTabsMenu.js (content/browser-allTabsMenu.js)
|
||||
|
|
|
@ -62,6 +62,7 @@ BROWSER_CHROME_MANIFESTS += [
|
|||
|
||||
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
|
||||
DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY']
|
||||
DEFINES['MOZ_BROWSER_XHTML'] = CONFIG['MOZ_BROWSER_XHTML']
|
||||
|
||||
DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR
|
||||
|
||||
|
|
|
@ -40,7 +40,11 @@ MOZ_ENABLE_SIGNMAR=1
|
|||
MOZ_APP_VERSION=$FIREFOX_VERSION
|
||||
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
|
||||
|
||||
BROWSER_CHROME_URL=chrome://browser/content/browser.xul
|
||||
if [ "${MOZ_BROWSER_XHTML}" = "1" ]; then
|
||||
BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml
|
||||
else
|
||||
BROWSER_CHROME_URL=chrome://browser/content/browser.xul
|
||||
fi
|
||||
|
||||
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
|
||||
# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<script type="application/javascript" src="chrome://global/content/editMenuOverlay.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/editMenuOverlay.js"
|
||||
#ifdef BROWSER_XHTML
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
#endif
|
||||
/>
|
||||
<commandset id="editMenuCommands">
|
||||
<commandset id="editMenuCommandSetAll" commandupdater="true" events="focus,select"
|
||||
oncommandupdate="goUpdateGlobalEditMenuItems()"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче