22183 - UI spoofing can cause user to mistake content for chrome. force the location bar to always be present.

This commit is contained in:
ben%bengoodger.com 2004-09-06 23:23:54 +00:00
Родитель a65659fe15
Коммит b1bd4342ad
4 изменённых файлов: 54 добавлений и 33 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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()

Просмотреть файл

@ -143,7 +143,7 @@
</toolbar>
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1"
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&backCmd.label;"
oncommand="BrowserBack(event)"
onclick="checkForMiddleClick(this, event);"
@ -156,7 +156,7 @@
onclick="checkForMiddleClick(this, event);"/>
</toolbarbutton>
<toolbarbutton id="forward-button" type="menu-button" class="toolbarbutton-1"
<toolbarbutton id="forward-button" type="menu-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&forwardCmd.label;"
oncommand="BrowserForward(event)"
onclick="checkForMiddleClick(this, event);"
@ -169,22 +169,22 @@
onclick="checkForMiddleClick(this, event);"/>
</toolbarbutton>
<toolbarbutton id="reload-button" class="toolbarbutton-1"
label="&reloadCmd.label;"
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
tooltiptext="&reloadButton.tooltip;"/>
<toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&reloadCmd.label;"
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
tooltiptext="&reloadButton.tooltip;"/>
<toolbarbutton id="stop-button" class="toolbarbutton-1"
label="&stopCmd.label;"
command="Browser:Stop"
tooltiptext="&stopButton.tooltip;"/>
<toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&stopCmd.label;"
command="Browser:Stop"
tooltiptext="&stopButton.tooltip;"/>
<toolbarbutton id="home-button" class="toolbarbutton-1"
label="&homeButton.label;"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
onclick="BrowserHomeClick(event);"/>
<toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&homeButton.label;"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
onclick="BrowserHomeClick(event);"/>
<toolbaritem id="urlbar-container" align="center" flex="1000"
title="&locationItem.title;" class="chromeclass-location">
@ -220,7 +220,7 @@
</toolbaritem>
<toolbaritem id="search-container" align="center"
title="&searchItem.title;" class="chromeclass-location">
title="&searchItem.title;" class="chromeclass-additional">
<textbox id="search-bar" type="autocomplete" flex="1"
autocompletepopup="PopupAutoComplete"
autocompletesearch="form-history"
@ -234,7 +234,7 @@
</textbox>
</toolbaritem>
<toolbaritem id="go-container" align="center" class="chromeclass-location">
<toolbaritem id="go-container" align="center" class="chromeclass-additional">
<button id="go-button" class="button-toolbar"
label="&goButton.label;"
oncommand="handleURLBarCommand(event);"
@ -244,7 +244,7 @@
tooltiptext="&goButton.tooltip;"/>
</toolbaritem>
<toolbarbutton id="print-button" class="toolbarbutton-1"
<toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&printButton.label;" command="cmd_print"
tooltiptext="&printButton.tooltip;"/>
@ -255,7 +255,8 @@
tooltiptext="&throbber.tooltip;"/>
</toolbaritem>
<toolbaritem id="personal-bookmarks" title="&bookmarksItem.title;" flex="1">
<toolbaritem id="personal-bookmarks" title="&bookmarksItem.title;" flex="1"
class="chromeclass-directories">
<stack id="bookmarks-stack" flex="1" style="min-width:0px; width:0px;"
onpopupshowing="BookmarksToolbar.setOpenedMenu(event);"
onpopuphidden="BookmarksToolbar.unsetOpenedMenu(event);">
@ -301,7 +302,7 @@
</stack>
</toolbaritem>
<toolbarbutton id="downloads-button" class="toolbarbutton-1"
<toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
observes="Tools:Downloads"
ondragdrop="nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.preventBubble()"
ondragover="nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.preventBubble()"
@ -310,12 +311,12 @@
label="&downloads.label;"
tooltiptext="&downloads.tooltip;"/>
<toolbarbutton id="history-button" class="toolbarbutton-1"
<toolbarbutton id="history-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
observes="viewHistorySidebar"
tooltiptext="&historyButton.tooltip;"/>
#ifdef HAVE_SHELL_SERVICE
<toolbarbutton id="mail-button" type="menu" class="toolbarbutton-1"
<toolbarbutton id="mail-button" type="menu" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&mailButton.label;" orient="vertical"
onmouseover="MailIntegration.updateUnreadCount();"
tooltiptext="&mailButton.tooltip;">
@ -338,34 +339,34 @@
</toolbarbutton>
#endif
<toolbarbutton id="bookmarks-button" class="toolbarbutton-1"
<toolbarbutton id="bookmarks-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
observes="viewBookmarksSidebar"
tooltiptext="&bookmarksButton.tooltip;"
ondragover="nsDragAndDrop.dragOver(event, bookmarksButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, bookmarksButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, bookmarksButtonObserver);"/>
<toolbarbutton id="new-tab-button" class="toolbarbutton-1"
<toolbarbutton id="new-tab-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"
tooltiptext="&newTabButton.tooltip;"/>
<toolbarbutton id="new-window-button" class="toolbarbutton-1"
<toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&newNavigatorCmd.label;"
command="key_newNavigator"
tooltiptext="&newWindowButton.tooltip;"/>
<toolbarbutton id="cut-button" class="toolbarbutton-1"
<toolbarbutton id="cut-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&cutCmd.label;"
command="cmd_cut"
tooltiptext="&cutButton.tooltip;"/>
<toolbarbutton id="copy-button" class="toolbarbutton-1"
<toolbarbutton id="copy-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&copyCmd.label;"
command="cmd_copy"
tooltiptext="&copyButton.tooltip;"/>
<toolbarbutton id="paste-button" class="toolbarbutton-1"
<toolbarbutton id="paste-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&pasteCmd.label;"
command="cmd_paste"
tooltiptext="&pasteButton.tooltip;"/>

Просмотреть файл

@ -38,12 +38,12 @@ window[chromehidden~="directories"] .chromeclass-directories,
window[chromehidden~="status"] .chromeclass-status,
window[chromehidden~="extrachrome"] .chromeclass-extrachrome,
window[chromehidden~="location"] .chromeclass-location,
window[chromehidden~="location"][chromehidden~="toolbar"] .chromeclass-toolbar
window[chromehidden~="location"][chromehidden~="toolbar"] .chromeclass-toolbar,
window[chromehidden~="toolbar"] .chromeclass-toolbar-additional
{
display: none;
}
/****** elements that have no visual representation ******/
script, data,