# HG changeset patch # User Brian Grinstead # Date 1532445168 25200 # Node ID f4181dab3ad85ae4636405b770621a9e8b218f19 # Parent 0a60749e1c31533f4189b92bd9019258aadb713c Bug 1476333 - Define the browser chrome URL as BROWSER_CHROME_URL so it can be accessed from AppConstants instead of a pref;r=gps MozReview-Commit-ID: DPxayAW4D1s diff --git a/browser/confvars.sh b/browser/confvars.sh --- a/browser/confvars.sh +++ b/browser/confvars.sh @@ -20,16 +20,19 @@ if test "$OS_ARCH" = "WINNT"; then fi fi # Enable building ./signmar and running libmar signature tests MOZ_ENABLE_SIGNMAR=1 MOZ_APP_VERSION=$FIREFOX_VERSION MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY + +BROWSER_CHROME_URL=chrome://browser/content/browser.xul + # MOZ_APP_DISPLAYNAME will be set by branding/configure.sh # MOZ_BRANDING_DIRECTORY is the default branding directory used when none is # specified. It should never point to the "official" branding directory. # For mozilla-beta, mozilla-release, or mozilla-central repositories, use # "unofficial" branding. # For the mozilla-aurora repository, use "aurora". MOZ_BRANDING_DIRECTORY=browser/branding/unofficial MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official diff --git a/old-configure.in b/old-configure.in --- a/old-configure.in +++ b/old-configure.in @@ -2872,16 +2872,19 @@ AC_SUBST(MOZ_APP_ID) AC_SUBST(MAR_CHANNEL_ID) AC_SUBST(ACCEPTED_MAR_CHANNEL_IDS) AC_SUBST(MOZ_PROFILE_MIGRATOR) AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MOZ_APP_UA_NAME") AC_SUBST(MOZ_APP_UA_NAME) AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION") AC_SUBST(MOZ_APP_VERSION) AC_SUBST(MOZ_APP_VERSION_DISPLAY) +AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL, $BROWSER_CHROME_URL) +AC_DEFINE_UNQUOTED(MOZ_BROWSER_CHROME_URL_QUOTED, "$BROWSER_CHROME_URL") + AC_SUBST(MOZ_APP_MAXVERSION) AC_DEFINE_UNQUOTED(FIREFOX_VERSION,$FIREFOX_VERSION) AC_SUBST(FIREFOX_VERSION) AC_SUBST(MOZ_UA_OS_AGNOSTIC) if test -n "$MOZ_UA_OS_AGNOSTIC"; then AC_DEFINE(MOZ_UA_OS_AGNOSTIC) fi diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm --- a/toolkit/modules/AppConstants.jsm +++ b/toolkit/modules/AppConstants.jsm @@ -287,16 +287,18 @@ this.AppConstants = Object.freeze({ DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@", MOZ_BING_API_CLIENTID: "@MOZ_BING_API_CLIENTID@", MOZ_BING_API_KEY: "@MOZ_BING_API_KEY@", MOZ_GOOGLE_LOCATION_SERVICE_API_KEY: "@MOZ_GOOGLE_LOCATION_SERVICE_API_KEY@", MOZ_GOOGLE_SAFEBROWSING_API_KEY: "@MOZ_GOOGLE_SAFEBROWSING_API_KEY@", MOZ_MOZILLA_API_KEY: "@MOZ_MOZILLA_API_KEY@", + BROWSER_CHROME_URL: "@BROWSER_CHROME_URL@", + // URL to the hg revision this was built from (e.g. // "https://hg.mozilla.org/mozilla-central/rev/6256ec9113c1") // On unofficial builds, this is an empty string. #ifndef MOZ_SOURCE_URL #define MOZ_SOURCE_URL #endif SOURCE_REVISION_URL: "@MOZ_SOURCE_URL@", diff --git a/xpfe/appshell/nsXULWindow.cpp b/xpfe/appshell/nsXULWindow.cpp --- a/xpfe/appshell/nsXULWindow.cpp +++ b/xpfe/appshell/nsXULWindow.cpp @@ -1939,22 +1939,18 @@ NS_IMETHODIMP nsXULWindow::CreateNewCont NS_ENSURE_TRUE(appShell, NS_ERROR_FAILURE); // We need to create a new top level window and then enter a nested // loop. Eventually the new window will be told that it has loaded, // at which time we know it is safe to spin out of the nested loop // and allow the opening code to proceed. nsCOMPtr uri; - nsAutoCString urlStr; - Preferences::GetCString("browser.chromeURL", urlStr); - if (urlStr.IsEmpty()) { - urlStr.AssignLiteral("chrome://navigator/content/navigator.xul"); - } + urlStr.AssignLiteral(MOZ_BROWSER_CHROME_URL_QUOTED); nsCOMPtr service(do_GetService(NS_IOSERVICE_CONTRACTID)); if (service) { service->NewURI(urlStr, nullptr, nullptr, getter_AddRefs(uri)); } NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE); // We need to create a chrome window to contain the content window we're about