From e2a455bfc4539c74c1ca0630ed7a0f1df1563e21 Mon Sep 17 00:00:00 2001 From: "ben%bengoodger.com" Date: Mon, 6 Sep 2004 23:23:54 +0000 Subject: [PATCH] 22183 - UI spoofing can cause user to mistake content for chrome. force the location bar to always be present. --- browser/app/profile/firefox.js | 4 +++ browser/base/content/browser.js | 20 +++++++++-- browser/base/content/browser.xul | 61 ++++++++++++++++---------------- toolkit/content/xul.css | 4 +-- 4 files changed, 55 insertions(+), 34 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 5e52ac6de69e3..5f24537c68f02 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -187,6 +187,10 @@ pref("browser.bookmarks.sort.resource", "rdf:http://home.netscape.com/NC-rdf#Nam pref("dom.disable_open_during_load", true); pref("javascript.options.showInConsole", false); +// Make the location bar reliably present and unaffected by pages +pref("dom.disable_window_open_feature.location", true); +pref("dom.disable_window_status_change", true); + // popups.policy 1=allow,2=reject pref("privacy.popups.policy", 1); pref("privacy.popups.usecustom", true); diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 820c89c25f8c6..a55483057f742 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -409,6 +409,11 @@ function delayedStartup() .getService(Components.interfaces.nsIPrefService); gPrefService = gPrefService.getBranch(null); + if (document.documentElement.getAttribute("chromehidden").indexOf("toolbar") != -1) { + gURLBar.setAttribute("readonly", "true"); + gURLBar.setAttribute("enablehistory", "false"); + } + BrowserOffline.init(); if (gIsLoadingBlank) @@ -566,8 +571,19 @@ function delayedStartup() } #endif - var updatePanel = document.getElementById("statusbar-updates"); - updatePanel.init(); + var updatePanel = document.getElementById("updates"); + try { + updatePanel.init(); + } + catch (e) { } + + // BiDi UI + if (isBidiEnabled()) { + document.getElementById("documentDirection-separator").hidden = false; + document.getElementById("documentDirection-swap").hidden = false; + document.getElementById("textfieldDirection-separator").hidden = false; + document.getElementById("textfieldDirection-swap").hidden = false; + } } function Shutdown() diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index eccf647b64abc..8b5fbc0dbe1a0 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -143,7 +143,7 @@ - - - + - - - + + + @@ -220,7 +220,7 @@ + title="&searchItem.title;" class="chromeclass-additional"> - +