зеркало из https://github.com/mozilla/gecko-dev.git
Backout of bug 574688 due to test failure, a=backout.
This commit is contained in:
Родитель
a3d5af6e95
Коммит
036e742d29
|
@ -415,12 +415,15 @@ pref("general.warnOnAboutConfig", false);
|
||||||
pref("dom.max_script_run_time", 20);
|
pref("dom.max_script_run_time", 20);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Make the status bar reliably present and unaffected by pages
|
||||||
|
pref("dom.disable_window_open_feature.status", true);
|
||||||
// This is the pref to control the location bar, change this to true to
|
// This is the pref to control the location bar, change this to true to
|
||||||
// force this - this makes the origin of popup windows more obvious to avoid
|
// force this instead of or in addition to the status bar - this makes
|
||||||
// spoofing. We would rather not do it by default because it affects UE for web
|
// the origin of popup windows more obvious to avoid spoofing. We would
|
||||||
// applications, but without it there isn't a really good way to prevent chrome
|
// rather not do it by default because it affects UE for web applications, but
|
||||||
// spoofing, see bug 337344
|
// without it there isn't a really good way to prevent chrome spoofing, see bug 337344
|
||||||
pref("dom.disable_window_open_feature.location", true);
|
pref("dom.disable_window_open_feature.location", true);
|
||||||
|
pref("dom.disable_window_status_change", true);
|
||||||
// allow JS to move and resize existing windows
|
// allow JS to move and resize existing windows
|
||||||
pref("dom.disable_window_move_resize", false);
|
pref("dom.disable_window_move_resize", false);
|
||||||
// prevent JS from monkeying with window focus, etc
|
// prevent JS from monkeying with window focus, etc
|
||||||
|
@ -993,6 +996,8 @@ pref("services.sync.prefs.sync.browser.urlbar.maxRichResults", true);
|
||||||
pref("services.sync.prefs.sync.dom.disable_open_during_load", true);
|
pref("services.sync.prefs.sync.dom.disable_open_during_load", true);
|
||||||
pref("services.sync.prefs.sync.dom.disable_window_flip", true);
|
pref("services.sync.prefs.sync.dom.disable_window_flip", true);
|
||||||
pref("services.sync.prefs.sync.dom.disable_window_move_resize", true);
|
pref("services.sync.prefs.sync.dom.disable_window_move_resize", true);
|
||||||
|
pref("services.sync.prefs.sync.dom.disable_window_open_feature.status", true);
|
||||||
|
pref("services.sync.prefs.sync.dom.disable_window_status_change", true);
|
||||||
pref("services.sync.prefs.sync.dom.event.contextmenu.enabled", true);
|
pref("services.sync.prefs.sync.dom.event.contextmenu.enabled", true);
|
||||||
pref("services.sync.prefs.sync.extensions.personas.current", true);
|
pref("services.sync.prefs.sync.extensions.personas.current", true);
|
||||||
pref("services.sync.prefs.sync.extensions.update.enabled", true);
|
pref("services.sync.prefs.sync.extensions.update.enabled", true);
|
||||||
|
|
|
@ -229,6 +229,16 @@
|
||||||
command="cmd_CustomizeToolbars"/>
|
command="cmd_CustomizeToolbars"/>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menu>
|
</menu>
|
||||||
|
<menuitem id="toggle_taskbar"
|
||||||
|
label="&taskbarCmd.label;"
|
||||||
|
accesskey="&taskbarCmd.accesskey;"
|
||||||
|
type="checkbox"
|
||||||
|
command="cmd_toggleTaskbar"
|
||||||
|
#ifndef WINCE
|
||||||
|
checked="true" />
|
||||||
|
#else
|
||||||
|
checked="false" />
|
||||||
|
#endif
|
||||||
<menu id="viewSidebarMenuMenu"
|
<menu id="viewSidebarMenuMenu"
|
||||||
label="&viewSidebarMenu.label;"
|
label="&viewSidebarMenu.label;"
|
||||||
accesskey="&viewSidebarMenu.accesskey;">
|
accesskey="&viewSidebarMenu.accesskey;">
|
||||||
|
|
|
@ -635,9 +635,8 @@ HistoryMenu.prototype = {
|
||||||
m.setAttribute("value", i);
|
m.setAttribute("value", i);
|
||||||
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
|
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
|
||||||
|
|
||||||
// Set the targetURI attribute so it will be shown in tooltip and trigger
|
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
|
||||||
// onLinkHovered. SessionStore uses one-based indexes, so we need to
|
// SessionStore uses one-based indexes, so we need to normalize them.
|
||||||
// normalize them.
|
|
||||||
let tabData = undoItems[i].state;
|
let tabData = undoItems[i].state;
|
||||||
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
||||||
if (activeIndex >= 0 && tabData.entries[activeIndex])
|
if (activeIndex >= 0 && tabData.entries[activeIndex])
|
||||||
|
@ -717,7 +716,7 @@ HistoryMenu.prototype = {
|
||||||
m.setAttribute("class", "menuitem-iconic bookmark-item menuitem-with-favicon");
|
m.setAttribute("class", "menuitem-iconic bookmark-item menuitem-with-favicon");
|
||||||
m.setAttribute("oncommand", "undoCloseWindow(" + i + ");");
|
m.setAttribute("oncommand", "undoCloseWindow(" + i + ");");
|
||||||
|
|
||||||
// Set the targetURI attribute so it will be shown in tooltip.
|
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
|
||||||
// SessionStore uses one-based indexes, so we need to normalize them.
|
// SessionStore uses one-based indexes, so we need to normalize them.
|
||||||
let activeIndex = (selectedTab.index || selectedTab.entries.length) - 1;
|
let activeIndex = (selectedTab.index || selectedTab.entries.length) - 1;
|
||||||
if (activeIndex >= 0 && selectedTab.entries[activeIndex])
|
if (activeIndex >= 0 && selectedTab.entries[activeIndex])
|
||||||
|
@ -1165,7 +1164,9 @@ let BookmarksMenuButton = {
|
||||||
// First popupshowing event, initialize immutable attributes.
|
// First popupshowing event, initialize immutable attributes.
|
||||||
this._popupInitialized = true;
|
this._popupInitialized = true;
|
||||||
// Update View bookmarks toolbar checkbox menuitem.
|
// Update View bookmarks toolbar checkbox menuitem.
|
||||||
viewToolbar.setAttribute("toolbarId", this.personalToolbar.id);
|
viewToolbar.setAttribute("toolbarindex",
|
||||||
|
Array.indexOf(gNavToolbox.childNodes,
|
||||||
|
this.personalToolbar));
|
||||||
|
|
||||||
// Need to set the label on Unsorted Bookmarks menu.
|
// Need to set the label on Unsorted Bookmarks menu.
|
||||||
let unsortedBookmarksElt =
|
let unsortedBookmarksElt =
|
||||||
|
|
|
@ -69,6 +69,7 @@
|
||||||
<command id="cmd_printPreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
|
<command id="cmd_printPreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
|
||||||
<command id="cmd_close" oncommand="BrowserCloseTabOrWindow()"/>
|
<command id="cmd_close" oncommand="BrowserCloseTabOrWindow()"/>
|
||||||
<command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()"/>
|
<command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()"/>
|
||||||
|
<command id="cmd_toggleTaskbar" oncommand="goToggleToolbar('status-bar','toggle_taskbar');"/>
|
||||||
<command id="cmd_ToggleTabsOnTop" oncommand="TabsOnTop.toggle()"/>
|
<command id="cmd_ToggleTabsOnTop" oncommand="TabsOnTop.toggle()"/>
|
||||||
<command id="cmd_CustomizeToolbars" oncommand="BrowserCustomizeToolbar()"/>
|
<command id="cmd_CustomizeToolbars" oncommand="BrowserCustomizeToolbar()"/>
|
||||||
<command id="cmd_quitApplication" oncommand="goQuitApplication()"/>
|
<command id="cmd_quitApplication" oncommand="goQuitApplication()"/>
|
||||||
|
|
|
@ -140,7 +140,7 @@ let gSyncUI = {
|
||||||
|
|
||||||
// Fake the tab object on the menu entries, so that we don't have to worry
|
// Fake the tab object on the menu entries, so that we don't have to worry
|
||||||
// about removing them ourselves. They will just get cleaned up by popup
|
// about removing them ourselves. They will just get cleaned up by popup
|
||||||
// binding.
|
// binding. This also makes sure the statusbar updates with the URL.
|
||||||
menuitem.tab = { "linkedBrowser": { "currentURI": { "spec": label } } };
|
menuitem.tab = { "linkedBrowser": { "currentURI": { "spec": label } } };
|
||||||
sep.tab = { "linkedBrowser": { "currentURI": { "spec": " " } } };
|
sep.tab = { "linkedBrowser": { "currentURI": { "spec": " " } } };
|
||||||
|
|
||||||
|
|
|
@ -317,10 +317,22 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox ,
|
#navigator-toolbox ,
|
||||||
|
#status-bar ,
|
||||||
#mainPopupSet {
|
#mainPopupSet {
|
||||||
min-width: 1px;
|
min-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Sync statusbar UI */
|
||||||
|
%ifdef MOZ_SERVICES_SYNC
|
||||||
|
#sync-notifications-box {
|
||||||
|
-moz-binding: url("chrome://browser/content/syncNotification.xml#notificationbox");
|
||||||
|
}
|
||||||
|
|
||||||
|
#sync-notifications-box notification {
|
||||||
|
-moz-binding: url("chrome://browser/content/syncNotification.xml#notification");
|
||||||
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
/* Identity UI */
|
/* Identity UI */
|
||||||
#identity-popup-content-box.unknownIdentity > #identity-popup-connectedToLabel ,
|
#identity-popup-content-box.unknownIdentity > #identity-popup-connectedToLabel ,
|
||||||
#identity-popup-content-box.unknownIdentity > #identity-popup-runByLabel ,
|
#identity-popup-content-box.unknownIdentity > #identity-popup-runByLabel ,
|
||||||
|
|
|
@ -373,14 +373,24 @@ function findChildShell(aDocument, aDocShell, aSoughtURI) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const gPopupBlockerObserver = {
|
const gPopupBlockerObserver = {
|
||||||
|
_reportButton: null,
|
||||||
|
|
||||||
onUpdatePageReport: function (aEvent)
|
onUpdatePageReport: function (aEvent)
|
||||||
{
|
{
|
||||||
if (aEvent.originalTarget != gBrowser.selectedBrowser)
|
if (aEvent.originalTarget != gBrowser.selectedBrowser)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!gBrowser.pageReport)
|
if (!this._reportButton)
|
||||||
|
this._reportButton = document.getElementById("page-report-button");
|
||||||
|
|
||||||
|
if (!gBrowser.pageReport) {
|
||||||
|
// Hide the popup blocker statusbar button
|
||||||
|
this._reportButton.hidden = true;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._reportButton.hidden = false;
|
||||||
|
|
||||||
// Only show the notification again if we've not already shown it. Since
|
// Only show the notification again if we've not already shown it. Since
|
||||||
// notifications are per-browser, we don't need to worry about re-adding
|
// notifications are per-browser, we don't need to worry about re-adding
|
||||||
|
@ -538,7 +548,10 @@ const gPopupBlockerObserver = {
|
||||||
var blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");
|
var blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");
|
||||||
var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
|
var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
|
||||||
blockedPopupDontShowMessage.setAttribute("checked", !showMessage);
|
blockedPopupDontShowMessage.setAttribute("checked", !showMessage);
|
||||||
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromMessage"));
|
if (aEvent.target.localName == "popup")
|
||||||
|
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromMessage"));
|
||||||
|
else
|
||||||
|
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromStatusbar"));
|
||||||
},
|
},
|
||||||
|
|
||||||
showBlockedPopup: function (aEvent)
|
showBlockedPopup: function (aEvent)
|
||||||
|
@ -585,8 +598,6 @@ const gPopupBlockerObserver = {
|
||||||
|
|
||||||
dontShowMessage: function ()
|
dontShowMessage: function ()
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
// Disabled until bug 594294 is fixed.
|
|
||||||
var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
|
var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
|
||||||
var firstTime = gPrefService.getBoolPref("privacy.popups.firstTime");
|
var firstTime = gPrefService.getBoolPref("privacy.popups.firstTime");
|
||||||
|
|
||||||
|
@ -597,7 +608,6 @@ const gPopupBlockerObserver = {
|
||||||
this._displayPageReportFirstTime();
|
this._displayPageReportFirstTime();
|
||||||
|
|
||||||
gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
|
gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
|
||||||
#endif
|
|
||||||
|
|
||||||
gBrowser.getNotificationBox().removeCurrentNotification();
|
gBrowser.getNotificationBox().removeCurrentNotification();
|
||||||
},
|
},
|
||||||
|
@ -1526,6 +1536,9 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||||
gDownloadMgr = Cc["@mozilla.org/download-manager;1"].
|
gDownloadMgr = Cc["@mozilla.org/download-manager;1"].
|
||||||
getService(Ci.nsIDownloadManager);
|
getService(Ci.nsIDownloadManager);
|
||||||
|
|
||||||
|
// Initialize the downloads monitor panel listener
|
||||||
|
DownloadMonitorPanel.init();
|
||||||
|
|
||||||
if (Win7Features) {
|
if (Win7Features) {
|
||||||
let tempScope = {};
|
let tempScope = {};
|
||||||
Cu.import("resource://gre/modules/DownloadTaskbarProgress.jsm",
|
Cu.import("resource://gre/modules/DownloadTaskbarProgress.jsm",
|
||||||
|
@ -1635,6 +1648,7 @@ function BrowserShutdown()
|
||||||
|
|
||||||
BrowserOffline.uninit();
|
BrowserOffline.uninit();
|
||||||
OfflineApps.uninit();
|
OfflineApps.uninit();
|
||||||
|
DownloadMonitorPanel.uninit();
|
||||||
gPrivateBrowsingUI.uninit();
|
gPrivateBrowsingUI.uninit();
|
||||||
IndexedDBPromptHelper.uninit();
|
IndexedDBPromptHelper.uninit();
|
||||||
|
|
||||||
|
@ -1667,7 +1681,7 @@ function nonBrowserWindowStartup()
|
||||||
// Disable inappropriate commands / submenus
|
// Disable inappropriate commands / submenus
|
||||||
var disabledItems = ['Browser:SavePage',
|
var disabledItems = ['Browser:SavePage',
|
||||||
'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain',
|
'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain',
|
||||||
'viewToolbarsMenu', 'viewSidebarMenuMenu', 'Browser:Reload',
|
'viewToolbarsMenu', 'cmd_toggleTaskbar', 'viewSidebarMenuMenu', 'Browser:Reload',
|
||||||
'viewFullZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
|
'viewFullZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
|
||||||
'viewHistorySidebar', 'Browser:AddBookmarkAs', 'View:PageInfo', 'Tasks:InspectPage'];
|
'viewHistorySidebar', 'Browser:AddBookmarkAs', 'View:PageInfo', 'Tasks:InspectPage'];
|
||||||
var element;
|
var element;
|
||||||
|
@ -2783,9 +2797,9 @@ var PrintPreviewListener = {
|
||||||
notificationBox.notificationsHidden = true;
|
notificationBox.notificationsHidden = true;
|
||||||
|
|
||||||
document.getElementById("sidebar").setAttribute("src", "about:blank");
|
document.getElementById("sidebar").setAttribute("src", "about:blank");
|
||||||
var addonBar = document.getElementById("addon-bar");
|
var statusbar = document.getElementById("status-bar");
|
||||||
this._chromeState.addonBarOpen = !addonBar.collapsed;
|
this._chromeState.statusbarOpen = !statusbar.hidden;
|
||||||
addonBar.collapsed = true;
|
statusbar.hidden = true;
|
||||||
|
|
||||||
this._chromeState.findOpen = gFindBarInitialized && !gFindBar.hidden;
|
this._chromeState.findOpen = gFindBarInitialized && !gFindBar.hidden;
|
||||||
if (gFindBarInitialized)
|
if (gFindBarInitialized)
|
||||||
|
@ -2795,8 +2809,8 @@ var PrintPreviewListener = {
|
||||||
if (this._chromeState.notificationsOpen)
|
if (this._chromeState.notificationsOpen)
|
||||||
gBrowser.getNotificationBox().notificationsHidden = false;
|
gBrowser.getNotificationBox().notificationsHidden = false;
|
||||||
|
|
||||||
if (this._chromeState.addonBarOpen)
|
if (this._chromeState.statusbarOpen)
|
||||||
document.getElementById("addon-bar").collapsed = false;
|
document.getElementById("status-bar").hidden = false;
|
||||||
|
|
||||||
if (this._chromeState.findOpen)
|
if (this._chromeState.findOpen)
|
||||||
gFindBar.open();
|
gFindBar.open();
|
||||||
|
@ -2923,7 +2937,8 @@ var browserDragAndDrop = {
|
||||||
aEvent.preventDefault();
|
aEvent.preventDefault();
|
||||||
|
|
||||||
if (statusString) {
|
if (statusString) {
|
||||||
XULBrowserWindow.setStatusText(gNavigatorBundle.getString(statusString));
|
var statusTextFld = document.getElementById("statusbar-display");
|
||||||
|
statusTextFld.label = gNavigatorBundle.getString(statusString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2944,7 +2959,8 @@ var homeButtonObserver = {
|
||||||
},
|
},
|
||||||
onDragLeave: function (aEvent)
|
onDragLeave: function (aEvent)
|
||||||
{
|
{
|
||||||
XULWindowBrowser.setStatusText("");
|
var statusTextFld = document.getElementById("statusbar-display");
|
||||||
|
statusTextFld.label = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2987,7 +3003,8 @@ var bookmarksButtonObserver = {
|
||||||
|
|
||||||
onDragLeave: function (aEvent)
|
onDragLeave: function (aEvent)
|
||||||
{
|
{
|
||||||
XULWindowBrowser.setStatusText("");
|
var statusTextFld = document.getElementById("statusbar-display");
|
||||||
|
statusTextFld.label = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2999,7 +3016,8 @@ var newTabButtonObserver = {
|
||||||
|
|
||||||
onDragLeave: function (aEvent)
|
onDragLeave: function (aEvent)
|
||||||
{
|
{
|
||||||
XULWindowBrowser.setStatusText("");
|
var statusTextFld = document.getElementById("statusbar-display");
|
||||||
|
statusTextFld.label = "";
|
||||||
},
|
},
|
||||||
|
|
||||||
onDrop: function (aEvent)
|
onDrop: function (aEvent)
|
||||||
|
@ -3021,7 +3039,8 @@ var newWindowButtonObserver = {
|
||||||
},
|
},
|
||||||
onDragLeave: function (aEvent)
|
onDragLeave: function (aEvent)
|
||||||
{
|
{
|
||||||
XULWindowBrowser.setStatusText("");
|
var statusTextFld = document.getElementById("statusbar-display");
|
||||||
|
statusTextFld.label = "";
|
||||||
},
|
},
|
||||||
onDrop: function (aEvent)
|
onDrop: function (aEvent)
|
||||||
{
|
{
|
||||||
|
@ -3038,7 +3057,8 @@ var newWindowButtonObserver = {
|
||||||
var DownloadsButtonDNDObserver = {
|
var DownloadsButtonDNDObserver = {
|
||||||
onDragOver: function (aEvent)
|
onDragOver: function (aEvent)
|
||||||
{
|
{
|
||||||
XULWindowBrowser.setStatusText(gNavigatorBundle.getString("dropondownloadsbutton"));
|
var statusTextFld = document.getElementById("statusbar-display");
|
||||||
|
statusTextFld.label = gNavigatorBundle.getString("dropondownloadsbutton");
|
||||||
var types = aEvent.dataTransfer.types;
|
var types = aEvent.dataTransfer.types;
|
||||||
if (types.contains("text/x-moz-url") ||
|
if (types.contains("text/x-moz-url") ||
|
||||||
types.contains("text/uri-list") ||
|
types.contains("text/uri-list") ||
|
||||||
|
@ -3048,7 +3068,8 @@ var DownloadsButtonDNDObserver = {
|
||||||
|
|
||||||
onDragLeave: function (aEvent)
|
onDragLeave: function (aEvent)
|
||||||
{
|
{
|
||||||
XULWindowBrowser.setStatusText("");
|
var statusTextFld = document.getElementById("statusbar-display");
|
||||||
|
statusTextFld.label = "";
|
||||||
},
|
},
|
||||||
|
|
||||||
onDrop: function (aEvent)
|
onDrop: function (aEvent)
|
||||||
|
@ -3667,8 +3688,9 @@ var FullScreen = {
|
||||||
if (event && event.type == "fullscreen")
|
if (event && event.type == "fullscreen")
|
||||||
enterFS = !enterFS;
|
enterFS = !enterFS;
|
||||||
|
|
||||||
// show/hide all menubars, toolbars (except the full screen toolbar)
|
// show/hide all menubars, toolbars, and statusbars (except the full screen toolbar)
|
||||||
this.showXULChrome("toolbar", !enterFS);
|
this.showXULChrome("toolbar", !enterFS);
|
||||||
|
this.showXULChrome("statusbar", !enterFS);
|
||||||
document.getElementById("View:FullScreen").setAttribute("checked", enterFS);
|
document.getElementById("View:FullScreen").setAttribute("checked", enterFS);
|
||||||
|
|
||||||
if (enterFS) {
|
if (enterFS) {
|
||||||
|
@ -4014,6 +4036,14 @@ var XULBrowserWindow = {
|
||||||
delete this.reloadCommand;
|
delete this.reloadCommand;
|
||||||
return this.reloadCommand = document.getElementById("Browser:Reload");
|
return this.reloadCommand = document.getElementById("Browser:Reload");
|
||||||
},
|
},
|
||||||
|
get statusTextField () {
|
||||||
|
delete this.statusTextField;
|
||||||
|
return this.statusTextField = document.getElementById("statusbar-display");
|
||||||
|
},
|
||||||
|
get securityButton () {
|
||||||
|
delete this.securityButton;
|
||||||
|
return this.securityButton = document.getElementById("security-button");
|
||||||
|
},
|
||||||
get isImage () {
|
get isImage () {
|
||||||
delete this.isImage;
|
delete this.isImage;
|
||||||
return this.isImage = document.getElementById("isImage");
|
return this.isImage = document.getElementById("isImage");
|
||||||
|
@ -4040,19 +4070,24 @@ var XULBrowserWindow = {
|
||||||
delete this.statusMeter;
|
delete this.statusMeter;
|
||||||
delete this.stopCommand;
|
delete this.stopCommand;
|
||||||
delete this.reloadCommand;
|
delete this.reloadCommand;
|
||||||
|
delete this.statusTextField;
|
||||||
|
delete this.securityButton;
|
||||||
delete this.statusText;
|
delete this.statusText;
|
||||||
},
|
},
|
||||||
|
|
||||||
setJSStatus: function (status) {
|
setJSStatus: function (status) {
|
||||||
this.jsStatus = status;
|
this.jsStatus = status;
|
||||||
|
this.updateStatusField();
|
||||||
},
|
},
|
||||||
|
|
||||||
setJSDefaultStatus: function (status) {
|
setJSDefaultStatus: function (status) {
|
||||||
this.jsDefaultStatus = status;
|
this.jsDefaultStatus = status;
|
||||||
|
this.updateStatusField();
|
||||||
},
|
},
|
||||||
|
|
||||||
setDefaultStatus: function (status) {
|
setDefaultStatus: function (status) {
|
||||||
this.defaultStatus = status;
|
this.defaultStatus = status;
|
||||||
|
this.updateStatusField();
|
||||||
},
|
},
|
||||||
|
|
||||||
setOverLink: function (link) {
|
setOverLink: function (link) {
|
||||||
|
@ -4063,6 +4098,17 @@ var XULBrowserWindow = {
|
||||||
gURLBar.setOverLink(link);
|
gURLBar.setOverLink(link);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateStatusField: function () {
|
||||||
|
var text = this.status || this.jsStatus || this.jsDefaultStatus || this.defaultStatus;
|
||||||
|
|
||||||
|
// check the current value so we don't trigger an attribute change
|
||||||
|
// and cause needless (slow!) UI updates
|
||||||
|
if (this.statusText != text) {
|
||||||
|
this.statusTextField.label = text;
|
||||||
|
this.statusText = text;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onLinkIconAvailable: function (aIconURL) {
|
onLinkIconAvailable: function (aIconURL) {
|
||||||
if (gProxyFavIcon && gBrowser.userTypedValue === null)
|
if (gProxyFavIcon && gBrowser.userTypedValue === null)
|
||||||
PageProxySetIcon(aIconURL); // update the favicon in the URL bar
|
PageProxySetIcon(aIconURL); // update the favicon in the URL bar
|
||||||
|
@ -4315,13 +4361,14 @@ var XULBrowserWindow = {
|
||||||
this.asyncUpdateUI();
|
this.asyncUpdateUI();
|
||||||
},
|
},
|
||||||
|
|
||||||
asyncUpdateUI: function XWB_asyncUpdateUI() {
|
asyncUpdateUI: function () {
|
||||||
FeedHandler.updateFeeds();
|
FeedHandler.updateFeeds();
|
||||||
BrowserSearch.updateSearchButton();
|
BrowserSearch.updateSearchButton();
|
||||||
},
|
},
|
||||||
|
|
||||||
onStatusChange: function XWB_onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
|
onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
|
||||||
this.status = aMessage;
|
this.status = aMessage;
|
||||||
|
this.updateStatusField();
|
||||||
},
|
},
|
||||||
|
|
||||||
// Properties used to cache security state used to update the UI
|
// Properties used to cache security state used to update the UI
|
||||||
|
@ -4329,7 +4376,7 @@ var XULBrowserWindow = {
|
||||||
_tooltipText: null,
|
_tooltipText: null,
|
||||||
_hostChanged: false, // onLocationChange will flip this bit
|
_hostChanged: false, // onLocationChange will flip this bit
|
||||||
|
|
||||||
onSecurityChange: function XWB_onSecurityChange(aWebProgress, aRequest, aState) {
|
onSecurityChange: function (aWebProgress, aRequest, aState) {
|
||||||
// Don't need to do anything if the data we use to update the UI hasn't
|
// Don't need to do anything if the data we use to update the UI hasn't
|
||||||
// changed
|
// changed
|
||||||
if (this._state == aState &&
|
if (this._state == aState &&
|
||||||
|
@ -4386,15 +4433,21 @@ var XULBrowserWindow = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (level) {
|
if (level) {
|
||||||
|
this.securityButton.setAttribute("level", level);
|
||||||
|
this.securityButton.hidden = false;
|
||||||
// We don't style the Location Bar based on the the 'level' attribute
|
// We don't style the Location Bar based on the the 'level' attribute
|
||||||
// anymore, but still set it for third-party themes.
|
// anymore, but still set it for third-party themes.
|
||||||
if (gURLBar)
|
if (gURLBar)
|
||||||
gURLBar.setAttribute("level", level);
|
gURLBar.setAttribute("level", level);
|
||||||
} else {
|
} else {
|
||||||
|
this.securityButton.hidden = true;
|
||||||
|
this.securityButton.removeAttribute("level");
|
||||||
if (gURLBar)
|
if (gURLBar)
|
||||||
gURLBar.removeAttribute("level");
|
gURLBar.removeAttribute("level");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.securityButton.setAttribute("tooltiptext", this._tooltipText);
|
||||||
|
|
||||||
// Don't pass in the actual location object, since it can cause us to
|
// Don't pass in the actual location object, since it can cause us to
|
||||||
// hold on to the window object too long. Just pass in the fields we
|
// hold on to the window object too long. Just pass in the fields we
|
||||||
// care about. (bug 424829)
|
// care about. (bug 424829)
|
||||||
|
@ -4413,7 +4466,7 @@ var XULBrowserWindow = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// simulate all change notifications after switching tabs
|
// simulate all change notifications after switching tabs
|
||||||
onUpdateCurrentBrowser: function XWB_onUpdateCurrentBrowser(aStateFlags, aStatus, aMessage, aTotalProgress) {
|
onUpdateCurrentBrowser: function (aStateFlags, aStatus, aMessage, aTotalProgress) {
|
||||||
if (FullZoom.updateBackgroundTabs)
|
if (FullZoom.updateBackgroundTabs)
|
||||||
FullZoom.onLocationChange(gBrowser.currentURI, true);
|
FullZoom.onLocationChange(gBrowser.currentURI, true);
|
||||||
var nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
|
var nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
|
||||||
|
@ -4434,7 +4487,7 @@ var XULBrowserWindow = {
|
||||||
this.onProgressChange(gBrowser.webProgress, 0, 0, aTotalProgress, 1);
|
this.onProgressChange(gBrowser.webProgress, 0, 0, aTotalProgress, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
startDocumentLoad: function XWB_startDocumentLoad(aRequest) {
|
startDocumentLoad: function (aRequest) {
|
||||||
// clear out feed data
|
// clear out feed data
|
||||||
gBrowser.selectedBrowser.feeds = null;
|
gBrowser.selectedBrowser.feeds = null;
|
||||||
|
|
||||||
|
@ -4448,7 +4501,7 @@ var XULBrowserWindow = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
endDocumentLoad: function XWB_endDocumentLoad(aRequest, aStatus) {
|
endDocumentLoad: function (aRequest, aStatus) {
|
||||||
var urlStr = aRequest.QueryInterface(Ci.nsIChannel).originalURI.spec;
|
var urlStr = aRequest.QueryInterface(Ci.nsIChannel).originalURI.spec;
|
||||||
|
|
||||||
var notification = Components.isSuccessCode(aStatus) ? "EndDocumentLoad" : "FailDocumentLoad";
|
var notification = Components.isSuccessCode(aStatus) ? "EndDocumentLoad" : "FailDocumentLoad";
|
||||||
|
@ -4720,23 +4773,20 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
|
||||||
// Empty the menu
|
// Empty the menu
|
||||||
for (i = popup.childNodes.length-1; i >= 0; --i) {
|
for (i = popup.childNodes.length-1; i >= 0; --i) {
|
||||||
var deadItem = popup.childNodes[i];
|
var deadItem = popup.childNodes[i];
|
||||||
if (deadItem.hasAttribute("toolbarId"))
|
if (deadItem.hasAttribute("toolbarindex"))
|
||||||
popup.removeChild(deadItem);
|
popup.removeChild(deadItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
var firstMenuItem = aInsertPoint || popup.firstChild;
|
var firstMenuItem = aInsertPoint || popup.firstChild;
|
||||||
|
|
||||||
let toolbarNodes = [document.getElementById("addon-bar")];
|
for (i = 0; i < gNavToolbox.childNodes.length; ++i) {
|
||||||
for (i = 0; i < gNavToolbox.childNodes.length; ++i)
|
var toolbar = gNavToolbox.childNodes[i];
|
||||||
toolbarNodes.push(gNavToolbox.childNodes[i]);
|
|
||||||
toolbarNodes.forEach(function(toolbar) {
|
|
||||||
var toolbarName = toolbar.getAttribute("toolbarname");
|
var toolbarName = toolbar.getAttribute("toolbarname");
|
||||||
if (toolbarName) {
|
if (toolbarName) {
|
||||||
let menuItem = document.createElement("menuitem");
|
let menuItem = document.createElement("menuitem");
|
||||||
let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
|
let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
|
||||||
"autohide" : "collapsed";
|
"autohide" : "collapsed";
|
||||||
menuItem.setAttribute("id", "toggle_" + toolbar.id);
|
menuItem.setAttribute("toolbarindex", i);
|
||||||
menuItem.setAttribute("toolbarId", toolbar.id);
|
|
||||||
menuItem.setAttribute("type", "checkbox");
|
menuItem.setAttribute("type", "checkbox");
|
||||||
menuItem.setAttribute("label", toolbarName);
|
menuItem.setAttribute("label", toolbarName);
|
||||||
menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
|
menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
|
||||||
|
@ -4746,21 +4796,22 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
|
||||||
|
|
||||||
menuItem.addEventListener("command", onViewToolbarCommand, false);
|
menuItem.addEventListener("command", onViewToolbarCommand, false);
|
||||||
}
|
}
|
||||||
}, this);
|
toolbar = toolbar.nextSibling;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onViewToolbarCommand(aEvent) {
|
function onViewToolbarCommand(aEvent) {
|
||||||
var toolbarId = aEvent.originalTarget.getAttribute("toolbarId");
|
var index = aEvent.originalTarget.getAttribute("toolbarindex");
|
||||||
var toolbar = document.getElementById(toolbarId);
|
var toolbar = gNavToolbox.childNodes[index];
|
||||||
var isVisible = aEvent.originalTarget.getAttribute("checked") == "true";
|
var visible = aEvent.originalTarget.getAttribute("checked") == "true";
|
||||||
setToolbarVisibility(toolbar, isVisible);
|
setToolbarVisibility(toolbar, visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setToolbarVisibility(toolbar, isVisible) {
|
function setToolbarVisibility(toolbar, visible) {
|
||||||
var hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
|
var hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
|
||||||
"autohide" : "collapsed";
|
"autohide" : "collapsed";
|
||||||
|
|
||||||
toolbar.setAttribute(hidingAttribute, !isVisible);
|
toolbar.setAttribute(hidingAttribute, !visible);
|
||||||
document.persist(toolbar.id, hidingAttribute);
|
document.persist(toolbar.id, hidingAttribute);
|
||||||
|
|
||||||
PlacesToolbarHelper.init();
|
PlacesToolbarHelper.init();
|
||||||
|
@ -7629,6 +7680,10 @@ let gPrivateBrowsingUI = {
|
||||||
gBrowser.updateTitlebar();
|
gBrowser.updateTitlebar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
DownloadMonitorPanel.updateStatus();
|
||||||
|
}, 0);
|
||||||
|
|
||||||
if (!aOnWindowOpen && this._disableUIOnToggle)
|
if (!aOnWindowOpen && this._disableUIOnToggle)
|
||||||
document.getElementById("Tools:PrivateBrowsing")
|
document.getElementById("Tools:PrivateBrowsing")
|
||||||
.setAttribute("disabled", "true");
|
.setAttribute("disabled", "true");
|
||||||
|
@ -7687,6 +7742,10 @@ let gPrivateBrowsingUI = {
|
||||||
|
|
||||||
gLastOpenDirectory.reset();
|
gLastOpenDirectory.reset();
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
DownloadMonitorPanel.updateStatus();
|
||||||
|
}, 0);
|
||||||
|
|
||||||
if (this._disableUIOnToggle)
|
if (this._disableUIOnToggle)
|
||||||
document.getElementById("Tools:PrivateBrowsing")
|
document.getElementById("Tools:PrivateBrowsing")
|
||||||
.setAttribute("disabled", "true");
|
.setAttribute("disabled", "true");
|
||||||
|
|
|
@ -721,7 +721,7 @@
|
||||||
<menu class="split-menuitem-menu"
|
<menu class="split-menuitem-menu"
|
||||||
label="&preferencesCmd.label;">
|
label="&preferencesCmd.label;">
|
||||||
<menupopup id="appmenu_customizeMenu"
|
<menupopup id="appmenu_customizeMenu"
|
||||||
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('appmenu_preferences').nextSibling.nextSibling);">
|
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('appmenu_toggleStatusbar'));">
|
||||||
<menuitem id="appmenu_preferences"
|
<menuitem id="appmenu_preferences"
|
||||||
#ifdef XP_UNIX
|
#ifdef XP_UNIX
|
||||||
label="&preferencesCmdUnix.label;"
|
label="&preferencesCmdUnix.label;"
|
||||||
|
@ -730,6 +730,10 @@
|
||||||
#endif
|
#endif
|
||||||
oncommand="openPreferences();"/>
|
oncommand="openPreferences();"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
|
<menuitem id="appmenu_toggleStatusbar"
|
||||||
|
type="checkbox"
|
||||||
|
command="cmd_toggleTaskbar"
|
||||||
|
observes="toggle_taskbar"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem id="appmenu_toggleTabsOnTop"
|
<menuitem id="appmenu_toggleTabsOnTop"
|
||||||
label="&viewTabsOnTop.label;"
|
label="&viewTabsOnTop.label;"
|
||||||
|
@ -1278,10 +1282,40 @@
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
<vbox id="browser-bottombox" layer="true">
|
<vbox id="browser-bottombox" layer="true">
|
||||||
<toolbar id="addon-bar" toolbarname="&addonBarCmd.label;" collapsed="true"
|
<statusbar class="chromeclass-status" id="status-bar"
|
||||||
class="toolbar-primary chromeclass-toolbar"
|
#ifdef WINCE
|
||||||
context="toolbar-context-menu" toolboxid="navigator-toolbox"
|
hidden="true"
|
||||||
customizable="true"/>
|
#endif
|
||||||
|
>
|
||||||
|
<statusbarpanel id="statusbar-display" label="" flex="1"/>
|
||||||
|
<statusbarpanel id="download-monitor" class="statusbarpanel-iconic-text"
|
||||||
|
tooltiptext="&downloadMonitor2.tooltip;" hidden="true"
|
||||||
|
command="Tools:Downloads"/>
|
||||||
|
<statusbarpanel id="security-button" class="statusbarpanel-iconic"
|
||||||
|
hidden="true"
|
||||||
|
onclick="if (event.button == 0 && event.detail == 1) displaySecurityInfo();"/>
|
||||||
|
#ifdef MOZ_SERVICES_SYNC
|
||||||
|
<statusbarpanel id="sync-notifications-button"
|
||||||
|
class="statusbarpanel-iconic-text"
|
||||||
|
hidden="true"
|
||||||
|
popup="sync-notifications-panel">
|
||||||
|
</statusbarpanel>
|
||||||
|
<panel id="sync-notifications-panel" position="before_end">
|
||||||
|
<notificationbox id="sync-notifications-box"/>
|
||||||
|
</panel>
|
||||||
|
#endif
|
||||||
|
<statusbarpanel id="page-report-button" type="menu"
|
||||||
|
class="statusbarpanel-menu-iconic"
|
||||||
|
hidden="true"
|
||||||
|
tooltiptext="&pageReportIcon.tooltip;">
|
||||||
|
<menupopup onpopupshowing="gPopupBlockerObserver.fillPopupList(event);">
|
||||||
|
<menuitem observes="blockedPopupAllowSite"/>
|
||||||
|
<menuitem observes="blockedPopupEditSettings"/>
|
||||||
|
<menuitem observes="blockedPopupDontShowMessage"/>
|
||||||
|
<menuseparator observes="blockedPopupsSeparator"/>
|
||||||
|
</menupopup>
|
||||||
|
</statusbarpanel>
|
||||||
|
</statusbar>
|
||||||
</vbox>
|
</vbox>
|
||||||
#ifndef XP_UNIX
|
#ifndef XP_UNIX
|
||||||
<svg:svg height="0">
|
<svg:svg height="0">
|
||||||
|
|
|
@ -56,13 +56,16 @@
|
||||||
screenX="24" screenY="24">
|
screenX="24" screenY="24">
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
&startDescriptionText.label;
|
&startDescription.label;
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<separator class="thin"/>
|
<separator class="thin"/>
|
||||||
|
|
||||||
<hbox pack="center">
|
<hbox pack="center">
|
||||||
<!-- insert example here! (bug 594294) -->
|
<statusbar style="width:20em">
|
||||||
|
<statusbarpanel flex="1" pack="left"><description>&done.label;</description></statusbarpanel>
|
||||||
|
<statusbarpanel class="statusbarpanel-iconic" style="min-height:18px" id="page-report-button"/>
|
||||||
|
</statusbar>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
<separator class="thin"/>
|
<separator class="thin"/>
|
||||||
|
|
|
@ -341,7 +341,7 @@
|
||||||
mBrowser: aBrowser,
|
mBrowser: aBrowser,
|
||||||
mBlank: aStartsBlank,
|
mBlank: aStartsBlank,
|
||||||
|
|
||||||
// cache flags for correct status UI update after tab switching
|
// cache flags for correct status bar update after tab switching
|
||||||
mStateFlags: 0,
|
mStateFlags: 0,
|
||||||
mStatus: 0,
|
mStatus: 0,
|
||||||
mMessage: "",
|
mMessage: "",
|
||||||
|
|
|
@ -95,7 +95,6 @@ endif
|
||||||
_BROWSER_FILES = \
|
_BROWSER_FILES = \
|
||||||
browser_typeAheadFind.js \
|
browser_typeAheadFind.js \
|
||||||
browser_NetworkPrioritizer.js \
|
browser_NetworkPrioritizer.js \
|
||||||
browser_addon_bar.js \
|
|
||||||
browser_allTabsPanel.js \
|
browser_allTabsPanel.js \
|
||||||
browser_alltabslistener.js \
|
browser_alltabslistener.js \
|
||||||
browser_bug304198.js \
|
browser_bug304198.js \
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla Public License Version
|
|
||||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
||||||
* the License. You may obtain a copy of the License at
|
|
||||||
* http://www.mozilla.org/MPL/
|
|
||||||
*
|
|
||||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
||||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
||||||
* for the specific language governing rights and limitations under the
|
|
||||||
* License.
|
|
||||||
*
|
|
||||||
* The Original Code is browser add-on bar test code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is the Mozilla Foundation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Dietrich Ayala <dietrich@mozilla.com>
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
||||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
function test() {
|
|
||||||
waitForExplicitFinish();
|
|
||||||
|
|
||||||
let addonbar = document.getElementById("addon-bar");
|
|
||||||
ok(addonbar.collapsed, "addon bar is collapsed by default");
|
|
||||||
|
|
||||||
let topMenu, toolbarMenu;
|
|
||||||
|
|
||||||
function onTopMenuShown(event) {
|
|
||||||
event.currentTarget.removeEventListener("popupshown", arguments.callee, false);
|
|
||||||
// open the customize or toolbars menu
|
|
||||||
let toolbarMenu = document.getElementById("appmenu_customizeMenu") ||
|
|
||||||
document.getElementById("viewToolbarsMenu").firstElementChild;
|
|
||||||
toolbarMenu.addEventListener("popupshown", onToolbarMenuShown, false);
|
|
||||||
toolbarMenu.openPopup();
|
|
||||||
}
|
|
||||||
|
|
||||||
function onToolbarMenuShown(event) {
|
|
||||||
event.currentTarget.removeEventListener("popupshown", arguments.callee, false);
|
|
||||||
|
|
||||||
// test the menu item's default state
|
|
||||||
let menuitem = document.getElementById("toggle_addon-bar");
|
|
||||||
ok(menuitem, "found the menu item");
|
|
||||||
is(menuitem.getAttribute("checked"), "false", "menuitem is not checked by default");
|
|
||||||
|
|
||||||
// click on the menu item
|
|
||||||
// TODO: there's got to be a way to check+command in one shot
|
|
||||||
menuitem.setAttribute("checked", "true");
|
|
||||||
menuitem.click();
|
|
||||||
|
|
||||||
// now the addon bar should be visible and the menu checked
|
|
||||||
is(addonbar.getAttribute("collapsed"), "false", "addon bar is visible after executing the command");
|
|
||||||
is(menuitem.getAttribute("checked"), "true", "menuitem is checked after executing the command");
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
// open the appmenu or view menu
|
|
||||||
topMenu = document.getElementById("appmenu-popup") ||
|
|
||||||
document.getElementById("menu_viewPopup");
|
|
||||||
topMenu.addEventListener("popupshown", onTopMenuShown, false);
|
|
||||||
topMenu.openPopup();
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
var pageInfo;
|
var pageInfo, atTest = 0;
|
||||||
gBrowser.selectedTab = gBrowser.addTab();
|
gBrowser.selectedTab = gBrowser.addTab();
|
||||||
gBrowser.selectedBrowser.addEventListener("load", function () {
|
gBrowser.selectedBrowser.addEventListener("load", function () {
|
||||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||||
|
@ -15,7 +15,22 @@ function test() {
|
||||||
if (topic != "page-info-dialog-loaded")
|
if (topic != "page-info-dialog-loaded")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
handlePageInfo();
|
switch (atTest) {
|
||||||
|
case 0:
|
||||||
|
atTest++;
|
||||||
|
handlePageInfo();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
atTest++;
|
||||||
|
pageInfo = win;
|
||||||
|
testLockClick();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
atTest++;
|
||||||
|
Services.obs.removeObserver(observer, "page-info-dialog-loaded");
|
||||||
|
testLockDoubleClick();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function $(aId) { return pageInfo.document.getElementById(aId) };
|
function $(aId) { return pageInfo.document.getElementById(aId) };
|
||||||
|
@ -38,7 +53,35 @@ function test() {
|
||||||
"Name given: " + feedItem.getAttribute("name") + ", should be " + (i+1));
|
"Name given: " + feedItem.getAttribute("name") + ", should be " + (i+1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pageInfo.addEventListener("unload", function() {
|
||||||
|
pageInfo.removeEventListener("unload", arguments.callee, false);
|
||||||
|
var lockIcon = document.getElementById("security-button");
|
||||||
|
EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 1});
|
||||||
|
}, false);
|
||||||
pageInfo.close();
|
pageInfo.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testLockClick() {
|
||||||
|
var deck = $("mainDeck");
|
||||||
|
is(deck.selectedPanel.id, "securityPanel", "The security tab should open when the lock icon is clicked");
|
||||||
|
pageInfo.addEventListener("unload", function() {
|
||||||
|
pageInfo.removeEventListener("unload", arguments.callee, false);
|
||||||
|
var lockIcon = document.getElementById("security-button");
|
||||||
|
EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 1});
|
||||||
|
EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 2});
|
||||||
|
}, false);
|
||||||
|
pageInfo.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testLockDoubleClick() {
|
||||||
|
var pageInfoDialogs = Services.wm.getEnumerator("Browser:page-info");
|
||||||
|
var i = 0;
|
||||||
|
while (pageInfoDialogs.hasMoreElements()) {
|
||||||
|
i++;
|
||||||
|
pageInfo = pageInfoDialogs.getNext();
|
||||||
|
pageInfo.close();
|
||||||
|
}
|
||||||
|
is(i, 1, "When the lock is clicked twice there should be only one page info dialog");
|
||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeCurrentTab();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,22 @@ function getBrowserURL()
|
||||||
return "chrome://browser/content/browser.xul";
|
return "chrome://browser/content/browser.xul";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goToggleToolbar( id, elementID )
|
||||||
|
{
|
||||||
|
var toolbar = document.getElementById(id);
|
||||||
|
var element = document.getElementById(elementID);
|
||||||
|
if (toolbar)
|
||||||
|
{
|
||||||
|
var isHidden = toolbar.hidden;
|
||||||
|
toolbar.hidden = !isHidden;
|
||||||
|
document.persist(id, 'hidden');
|
||||||
|
if (element) {
|
||||||
|
element.setAttribute("checked", isHidden ? "true" : "false");
|
||||||
|
document.persist(elementID, 'checked');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getTopWin()
|
function getTopWin()
|
||||||
{
|
{
|
||||||
return Services.wm.getMostRecentWindow("navigator:browser");
|
return Services.wm.getMostRecentWindow("navigator:browser");
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
onload="init();"
|
onload="init();"
|
||||||
onunload="SidebarUtils.setMouseoverURL('');">
|
onunload="SidebarUtils.clearURLFromStatusBar();">
|
||||||
|
|
||||||
<script type="application/javascript"
|
<script type="application/javascript"
|
||||||
src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
|
src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
onkeypress="SidebarUtils.handleTreeKeyPress(event);"
|
onkeypress="SidebarUtils.handleTreeKeyPress(event);"
|
||||||
onclick="SidebarUtils.handleTreeClick(this, event, true);"
|
onclick="SidebarUtils.handleTreeClick(this, event, true);"
|
||||||
onmousemove="SidebarUtils.handleTreeMouseMove(event);"
|
onmousemove="SidebarUtils.handleTreeMouseMove(event);"
|
||||||
onmouseout="SidebarUtils.setMouseoverURL('');">
|
onmouseout="SidebarUtils.clearURLFromStatusBar();">
|
||||||
<treecols>
|
<treecols>
|
||||||
<treecol id="title" flex="1" primary="true" hideheader="true"/>
|
<treecol id="title" flex="1" primary="true" hideheader="true"/>
|
||||||
</treecols>
|
</treecols>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<page id="history-panel" orient="vertical"
|
<page id="history-panel" orient="vertical"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
onload="HistorySidebarInit();"
|
onload="HistorySidebarInit();"
|
||||||
onunload="SidebarUtils.setMouseoverURL('');">
|
onunload="SidebarUtils.clearURLFromStatusBar();">
|
||||||
|
|
||||||
<script type="application/javascript"
|
<script type="application/javascript"
|
||||||
src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
|
src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
onkeypress="SidebarUtils.handleTreeKeyPress(event);"
|
onkeypress="SidebarUtils.handleTreeKeyPress(event);"
|
||||||
onclick="SidebarUtils.handleTreeClick(this, event, true);"
|
onclick="SidebarUtils.handleTreeClick(this, event, true);"
|
||||||
onmousemove="SidebarUtils.handleTreeMouseMove(event);"
|
onmousemove="SidebarUtils.handleTreeMouseMove(event);"
|
||||||
onmouseout="SidebarUtils.setMouseoverURL('');">
|
onmouseout="SidebarUtils.clearURLFromStatusBar();">
|
||||||
<treecols>
|
<treecols>
|
||||||
<treecol id="title" flex="1" primary="true" hideheader="true"/>
|
<treecol id="title" flex="1" primary="true" hideheader="true"/>
|
||||||
</treecols>
|
</treecols>
|
||||||
|
|
|
@ -117,20 +117,21 @@ var SidebarUtils = {
|
||||||
tbo.getCellAt(aEvent.clientX, aEvent.clientY, row, col, obj);
|
tbo.getCellAt(aEvent.clientX, aEvent.clientY, row, col, obj);
|
||||||
|
|
||||||
// row.value is -1 when the mouse is hovering an empty area within the tree.
|
// row.value is -1 when the mouse is hovering an empty area within the tree.
|
||||||
// To avoid showing a URL from a previously hovered node for a currently
|
// To avoid showing a URL from a previously hovered node,
|
||||||
// hovered non-url node, we must clear the moused-over URL in these cases.
|
// for a currently hovered non-url node, we must clear the URL from the
|
||||||
|
// status bar in these cases.
|
||||||
if (row.value != -1) {
|
if (row.value != -1) {
|
||||||
var node = tree.view.nodeForTreeIndex(row.value);
|
var cell = tree.view.nodeForTreeIndex(row.value);
|
||||||
if (PlacesUtils.nodeIsURI(node))
|
if (PlacesUtils.nodeIsURI(cell))
|
||||||
this.setMouseoverURL(node.uri);
|
window.top.XULBrowserWindow.setOverLink(cell.uri, null);
|
||||||
else
|
else
|
||||||
this.setMouseoverURL("");
|
this.clearURLFromStatusBar();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
this.setMouseoverURL("");
|
this.clearURLFromStatusBar();
|
||||||
},
|
},
|
||||||
|
|
||||||
setMouseoverURL: function SU_setMouseoverURL(aURL) {
|
clearURLFromStatusBar: function SU_clearURLFromStatusBar() {
|
||||||
window.top.XULBrowserWindow.setOverLink(aURL, null);
|
window.top.XULBrowserWindow.setOverLink("", null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,6 +57,10 @@
|
||||||
<preference id="dom.event.contextmenu.enabled" name="dom.event.contextmenu.enabled" type="bool"/>
|
<preference id="dom.event.contextmenu.enabled" name="dom.event.contextmenu.enabled" type="bool"/>
|
||||||
<preference id="dom.disable_window_move_resize" name="dom.disable_window_move_resize" type="bool" inverted="true"/>
|
<preference id="dom.disable_window_move_resize" name="dom.disable_window_move_resize" type="bool" inverted="true"/>
|
||||||
<preference id="dom.disable_window_flip" name="dom.disable_window_flip" type="bool" inverted="true"/>
|
<preference id="dom.disable_window_flip" name="dom.disable_window_flip" type="bool" inverted="true"/>
|
||||||
|
<preference id="dom.disable_window_open_feature.status" inverted="true"
|
||||||
|
name="dom.disable_window_open_feature.status" type="bool"/>
|
||||||
|
<preference id="dom.disable_window_status_change" inverted="true"
|
||||||
|
name="dom.disable_window_status_change" type="bool"/>
|
||||||
</preferences>
|
</preferences>
|
||||||
|
|
||||||
<script type="application/javascript" src="chrome://browser/content/preferences/advanced-scripts.js"/>
|
<script type="application/javascript" src="chrome://browser/content/preferences/advanced-scripts.js"/>
|
||||||
|
@ -74,6 +78,12 @@
|
||||||
<checkbox id="disableContextMenus" label="&disableContextMenus.label;"
|
<checkbox id="disableContextMenus" label="&disableContextMenus.label;"
|
||||||
accesskey="&disableContextMenus.accesskey;"
|
accesskey="&disableContextMenus.accesskey;"
|
||||||
preference="dom.event.contextmenu.enabled"/>
|
preference="dom.event.contextmenu.enabled"/>
|
||||||
|
<checkbox id="hideStatusBar" label="&hideStatusBar.label;"
|
||||||
|
accesskey="&hideStatusBar.accesskey;"
|
||||||
|
preference="dom.disable_window_open_feature.status"/>
|
||||||
|
<checkbox id="changeStatusBar" label="&changeStatusBar.label;"
|
||||||
|
accesskey="&changeStatusBar.accesskey;"
|
||||||
|
preference="dom.disable_window_status_change"/>
|
||||||
|
|
||||||
</prefpane>
|
</prefpane>
|
||||||
</prefwindow>
|
</prefwindow>
|
||||||
|
|
|
@ -49,6 +49,7 @@ _BROWSER_TEST_FILES = \
|
||||||
browser_privatebrowsing_certexceptionsui.js \
|
browser_privatebrowsing_certexceptionsui.js \
|
||||||
browser_privatebrowsing_commandline_toggle.js \
|
browser_privatebrowsing_commandline_toggle.js \
|
||||||
browser_privatebrowsing_crh.js \
|
browser_privatebrowsing_crh.js \
|
||||||
|
browser_privatebrowsing_downloadmonitor.js \
|
||||||
browser_privatebrowsing_fastswitch.js \
|
browser_privatebrowsing_fastswitch.js \
|
||||||
browser_privatebrowsing_findbar.js \
|
browser_privatebrowsing_findbar.js \
|
||||||
browser_privatebrowsing_forgetthissite.js \
|
browser_privatebrowsing_forgetthissite.js \
|
||||||
|
@ -83,9 +84,6 @@ _BROWSER_TEST_FILES = \
|
||||||
title.sjs \
|
title.sjs \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
# Disabled until bug 564934 is fixed:
|
|
||||||
# browser_privatebrowsing_downloadmonitor.js \
|
|
||||||
|
|
||||||
# Turn off private browsing tests that perma-timeout on Linux.
|
# Turn off private browsing tests that perma-timeout on Linux.
|
||||||
ifneq (Linux,$(OS_ARCH))
|
ifneq (Linux,$(OS_ARCH))
|
||||||
_BROWSER_TEST_FILES += \
|
_BROWSER_TEST_FILES += \
|
||||||
|
|
|
@ -54,14 +54,14 @@ function test() {
|
||||||
gBrowser.addEventListener("DOMUpdatePageReport", function() {
|
gBrowser.addEventListener("DOMUpdatePageReport", function() {
|
||||||
gBrowser.removeEventListener("DOMUpdatePageReport", arguments.callee, false);
|
gBrowser.removeEventListener("DOMUpdatePageReport", arguments.callee, false);
|
||||||
executeSoon(function() {
|
executeSoon(function() {
|
||||||
|
let pageReportButton = document.getElementById("page-report-button");
|
||||||
let notification = gBrowser.getNotificationBox().getNotificationWithValue("popup-blocked");
|
let notification = gBrowser.getNotificationBox().getNotificationWithValue("popup-blocked");
|
||||||
|
|
||||||
|
ok(!pageReportButton.hidden, "The page report button should not be hidden");
|
||||||
ok(notification, "The notification box should be displayed");
|
ok(notification, "The notification box should be displayed");
|
||||||
|
|
||||||
function checkMenuItem(callback) {
|
function checkMenuItem(callback) {
|
||||||
dump("CMI: in\n");
|
|
||||||
document.addEventListener("popupshown", function(event) {
|
document.addEventListener("popupshown", function(event) {
|
||||||
dump("CMI: popupshown\n");
|
|
||||||
document.removeEventListener("popupshown", arguments.callee, false);
|
document.removeEventListener("popupshown", arguments.callee, false);
|
||||||
|
|
||||||
if (expectedDisabled)
|
if (expectedDisabled)
|
||||||
|
@ -69,18 +69,18 @@ function test() {
|
||||||
"The allow popups menu item should be disabled");
|
"The allow popups menu item should be disabled");
|
||||||
|
|
||||||
event.originalTarget.hidePopup();
|
event.originalTarget.hidePopup();
|
||||||
dump("CMI: calling back\n");
|
|
||||||
callback();
|
callback();
|
||||||
dump("CMI: called back\n");
|
|
||||||
}, false);
|
}, false);
|
||||||
dump("CMI: out\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkMenuItem(function() {
|
checkMenuItem(function() {
|
||||||
gBrowser.removeTab(tab);
|
checkMenuItem(function() {
|
||||||
callback();
|
gBrowser.removeTab(tab);
|
||||||
|
callback();
|
||||||
|
});
|
||||||
|
notification.querySelector("button").doCommand();
|
||||||
});
|
});
|
||||||
notification.querySelector("button").doCommand();
|
EventUtils.synthesizeMouse(document.getElementById("page-report-button"), 1, 1, {});
|
||||||
});
|
});
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,8 @@ can reach it easily. -->
|
||||||
<!ENTITY personalbarCmd.label "Bookmarks Toolbar">
|
<!ENTITY personalbarCmd.label "Bookmarks Toolbar">
|
||||||
<!ENTITY personalbarCmd.accesskey "B">
|
<!ENTITY personalbarCmd.accesskey "B">
|
||||||
<!ENTITY bookmarksToolbarItem.label "Bookmarks Toolbar Items">
|
<!ENTITY bookmarksToolbarItem.label "Bookmarks Toolbar Items">
|
||||||
<!ENTITY addonBarCmd.label "Add-on Bar">
|
<!ENTITY taskbarCmd.label "Status Bar">
|
||||||
<!ENTITY addonBarCmd.accesskey "B">
|
<!ENTITY taskbarCmd.accesskey "B">
|
||||||
|
|
||||||
<!ENTITY pageSourceCmd.label "Page Source">
|
<!ENTITY pageSourceCmd.label "Page Source">
|
||||||
<!ENTITY pageSourceCmd.accesskey "o">
|
<!ENTITY pageSourceCmd.accesskey "o">
|
||||||
|
|
|
@ -88,6 +88,7 @@ popupWarningButtonUnix.accesskey=P
|
||||||
popupAllow=Allow pop-ups for %S
|
popupAllow=Allow pop-ups for %S
|
||||||
popupBlock=Block pop-ups for %S
|
popupBlock=Block pop-ups for %S
|
||||||
popupWarningDontShowFromMessage=Don't show this message when pop-ups are blocked
|
popupWarningDontShowFromMessage=Don't show this message when pop-ups are blocked
|
||||||
|
popupWarningDontShowFromStatusbar=Don't show info message when pop-ups are blocked
|
||||||
popupShowPopupPrefix=Show '%S'
|
popupShowPopupPrefix=Show '%S'
|
||||||
|
|
||||||
# missing plugin installer
|
# missing plugin installer
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!ENTITY startDescriptionText.label "A web site has attempted to open a pop-up window without your permission. &brandShortName; has automatically closed the pop-up window.">
|
<!ENTITY startDescription.label "A web site has attempted to open a pop-up window without your permission. &brandShortName; has automatically closed the pop-up window. Whenever &brandShortName; blocks these pop-ups, you will see an icon on the status bar.">
|
||||||
|
|
||||||
<!ENTITY endDescription.label "You can click on this icon to see which sites &brandShortName; blocked and to allow those sites to open pop-ups if they are required for the site to function correctly.">
|
<!ENTITY endDescription.label "You can click on this icon to see which sites &brandShortName; blocked and to allow those sites to open pop-ups if they are required for the site to function correctly.">
|
||||||
|
|
||||||
|
|
|
@ -46,3 +46,7 @@
|
||||||
<!ENTITY raiseLowerWindows.accesskey "R">
|
<!ENTITY raiseLowerWindows.accesskey "R">
|
||||||
<!ENTITY disableContextMenus.label "Disable or replace context menus">
|
<!ENTITY disableContextMenus.label "Disable or replace context menus">
|
||||||
<!ENTITY disableContextMenus.accesskey "D">
|
<!ENTITY disableContextMenus.accesskey "D">
|
||||||
|
<!ENTITY hideStatusBar.label "Hide the status bar">
|
||||||
|
<!ENTITY hideStatusBar.accesskey "H">
|
||||||
|
<!ENTITY changeStatusBar.label "Change status bar text">
|
||||||
|
<!ENTITY changeStatusBar.accesskey "C">
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<!ENTITY testpilot.brand.label "Test Pilot">
|
<!ENTITY testpilot.brand.label "Test Pilot">
|
||||||
|
<!-- browser window: menu and status bar -->
|
||||||
<!ENTITY testpilot.settings.label "Settings">
|
<!ENTITY testpilot.settings.label "Settings">
|
||||||
<!ENTITY testpilot.settings.dataSubmission.label "Data Submission">
|
<!ENTITY testpilot.settings.dataSubmission.label "Data Submission">
|
||||||
<!ENTITY testpilot.settings.notifications.label "Notifications">
|
<!ENTITY testpilot.settings.notifications.label "Notifications">
|
||||||
|
|
|
@ -1401,6 +1401,28 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||||
background-color: Window;
|
background-color: Window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#status-bar {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
statusbarpanel#statusbar-display {
|
||||||
|
-moz-padding-start: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#security-button[level="high"],
|
||||||
|
#security-button[level="low"] {
|
||||||
|
list-style-image: url("chrome://browser/skin/Secure.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#security-button[level="broken"] {
|
||||||
|
list-style-image: url("chrome://browser/skin/Security-broken.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-report-button {
|
||||||
|
list-style-image: url("chrome://browser/skin/Info.png");
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Throbber */
|
/* Throbber */
|
||||||
#navigator-throbber {
|
#navigator-throbber {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
|
@ -1699,6 +1721,11 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
||||||
display: -moz-box; /* display chevron icon in text mode */
|
display: -moz-box; /* display chevron icon in text mode */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Popup blocking dialog */
|
||||||
|
#pageReportFirstTime statusbarpanel.statusbar-resizerpanel {
|
||||||
|
visibility: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
#download-monitor {
|
#download-monitor {
|
||||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||||
-moz-image-region: rect(0px 16px 16px 0px);
|
-moz-image-region: rect(0px 16px 16px 0px);
|
||||||
|
|
|
@ -877,6 +877,15 @@ toolbar[mode="icons"] #zoom-in-button {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
statusbarpanel#statusbar-display {
|
||||||
|
-moz-padding-start: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statusbarpanel-text {
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* over-link in location bar */
|
/* over-link in location bar */
|
||||||
|
|
||||||
.urlbar-origin-label {
|
.urlbar-origin-label {
|
||||||
|
@ -1479,6 +1488,25 @@ sidebarheader > .tabs-closebutton > .toolbarbutton-text {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ----- SECURITY DISPLAY ----- */
|
||||||
|
|
||||||
|
#security-button[level="high"] ,
|
||||||
|
#security-button[level="low"] {
|
||||||
|
list-style-image: url("chrome://browser/skin/Secure-statusbar.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#security-button[level="broken"] {
|
||||||
|
list-style-image: url("chrome://browser/skin/Secure-statusbar-broken.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----- PAGE REPORT DISPLAY ----- */
|
||||||
|
|
||||||
|
#page-report-button {
|
||||||
|
list-style-image: url("chrome://browser/skin/Popup-blocked.png");
|
||||||
|
padding: 0px 3px 0px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----- FEED CONTENT DISPLAY ---- */
|
/* ----- FEED CONTENT DISPLAY ---- */
|
||||||
|
|
||||||
#feed-button {
|
#feed-button {
|
||||||
|
|
|
@ -51,6 +51,8 @@ browser.jar:
|
||||||
skin/classic/browser/section_collapsed-rtl.png
|
skin/classic/browser/section_collapsed-rtl.png
|
||||||
skin/classic/browser/section_expanded.png
|
skin/classic/browser/section_expanded.png
|
||||||
skin/classic/browser/Secure-Glyph-White.png
|
skin/classic/browser/Secure-Glyph-White.png
|
||||||
|
skin/classic/browser/Secure-statusbar.png
|
||||||
|
skin/classic/browser/Secure-statusbar-broken.png
|
||||||
skin/classic/browser/Secure-background.gif
|
skin/classic/browser/Secure-background.gif
|
||||||
skin/classic/browser/Toolbar.png
|
skin/classic/browser/Toolbar.png
|
||||||
skin/classic/browser/toolbarbutton-dropmarker.png
|
skin/classic/browser/toolbarbutton-dropmarker.png
|
||||||
|
|
|
@ -107,6 +107,10 @@
|
||||||
-moz-appearance: toolbox;
|
-moz-appearance: toolbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
statusbarpanel#statusbar-display {
|
||||||
|
-moz-padding-start: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* ::::: app menu button ::::: */
|
/* ::::: app menu button ::::: */
|
||||||
|
|
||||||
#appmenu-button {
|
#appmenu-button {
|
||||||
|
@ -1446,6 +1450,24 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||||
-moz-padding-start: 0px;
|
-moz-padding-start: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#status-bar {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#security-button[level="high"],
|
||||||
|
#security-button[level="low"] {
|
||||||
|
list-style-image: url("chrome://browser/skin/Secure.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#security-button[level="broken"] {
|
||||||
|
list-style-image: url("chrome://browser/skin/Security-broken.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#page-report-button {
|
||||||
|
width: 20px;
|
||||||
|
list-style-image: url("chrome://browser/skin/Info.png");
|
||||||
|
}
|
||||||
|
|
||||||
/* ::::: throbber ::::: */
|
/* ::::: throbber ::::: */
|
||||||
|
|
||||||
#navigator-throbber {
|
#navigator-throbber {
|
||||||
|
@ -1840,6 +1862,11 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
||||||
-moz-image-region: rect(0px 48px 16px 32px);
|
-moz-image-region: rect(0px 48px 16px 32px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ::::: About Popup Blocking dialog ::::: */
|
||||||
|
#pageReportFirstTime statusbarpanel.statusbar-resizerpanel {
|
||||||
|
visibility: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bookmarks toolbar */
|
/* Bookmarks toolbar */
|
||||||
#PlacesToolbarDropIndicator {
|
#PlacesToolbarDropIndicator {
|
||||||
list-style-image: url(chrome://browser/skin/places/toolbarDropMarker.png);
|
list-style-image: url(chrome://browser/skin/places/toolbarDropMarker.png);
|
||||||
|
|
|
@ -82,6 +82,11 @@ var testPopUpAllowed = function()
|
||||||
'/{"class":"messageCloseButton tabbable"}');
|
'/{"class":"messageCloseButton tabbable"}');
|
||||||
controller.assertNodeNotExist(button);
|
controller.assertNodeNotExist(button);
|
||||||
|
|
||||||
|
// Check for the status bar icon
|
||||||
|
var cssInfo = controller.window.getComputedStyle(controller.window.document.getElementById("page-report-button"), "");
|
||||||
|
controller.assertJS("subject.isReportButtonVisible == false",
|
||||||
|
{isReportButtonVisible: cssInfo.getPropertyValue('display') != 'none'});
|
||||||
|
|
||||||
// Check that the window count has changed
|
// Check that the window count has changed
|
||||||
controller.assertJS("subject.preWindowCount != subject.postWindowCount",
|
controller.assertJS("subject.preWindowCount != subject.postWindowCount",
|
||||||
{preWindowCount: windowCount, postWindowCount: mozmill.utils.getWindows().length});
|
{preWindowCount: windowCount, postWindowCount: mozmill.utils.getWindows().length});
|
||||||
|
|
|
@ -84,6 +84,11 @@ var testPopUpBlocked = function()
|
||||||
'/{"class":"messageCloseButton tabbable"}');
|
'/{"class":"messageCloseButton tabbable"}');
|
||||||
controller.waitForElement(button, gTimeout);
|
controller.waitForElement(button, gTimeout);
|
||||||
|
|
||||||
|
// Check for the status bar icon
|
||||||
|
var cssInfo = controller.window.getComputedStyle(controller.window.document.getElementById("page-report-button"), "");
|
||||||
|
controller.assertJS("subject.isReportButtonVisible == true",
|
||||||
|
{isReportButtonVisible: cssInfo.getPropertyValue('display') == '-moz-box'});
|
||||||
|
|
||||||
// Check that the window count has not changed
|
// Check that the window count has not changed
|
||||||
controller.assertJS("subject.preWindowCount == subject.postWindowCount",
|
controller.assertJS("subject.preWindowCount == subject.postWindowCount",
|
||||||
{preWindowCount: windowCount, postWindowCount: mozmill.utils.getWindows().length});
|
{preWindowCount: windowCount, postWindowCount: mozmill.utils.getWindows().length});
|
||||||
|
|
|
@ -62,6 +62,11 @@ var testSecNotification = function() {
|
||||||
var identLabel = new elementslib.ID(controller.window.document, "identity-icon-label");
|
var identLabel = new elementslib.ID(controller.window.document, "identity-icon-label");
|
||||||
controller.assertValue(identLabel, 'Mozilla Corporation (US)');
|
controller.assertValue(identLabel, 'Mozilla Corporation (US)');
|
||||||
|
|
||||||
|
// The security button should be visible in the status bar
|
||||||
|
var securityButton = controller.window.document.getElementById("security-button");
|
||||||
|
var cssSecButton = controller.window.getComputedStyle(securityButton, "");
|
||||||
|
controller.assertJS("subject.getPropertyValue('list-style-image') != 'none'", cssSecButton);
|
||||||
|
|
||||||
// Identity box should have a green background
|
// Identity box should have a green background
|
||||||
var identityBox = new elementslib.ID(controller.window.document, "identity-box");
|
var identityBox = new elementslib.ID(controller.window.document, "identity-box");
|
||||||
controller.assertProperty(identityBox, "className", "verifiedIdentity");
|
controller.assertProperty(identityBox, "className", "verifiedIdentity");
|
||||||
|
@ -73,6 +78,9 @@ var testSecNotification = function() {
|
||||||
var projects = new elementslib.Link(controller.tabs.activeTab, "Our Projects");
|
var projects = new elementslib.Link(controller.tabs.activeTab, "Our Projects");
|
||||||
controller.assertNode(projects);
|
controller.assertNode(projects);
|
||||||
|
|
||||||
|
// Security button should not be visible
|
||||||
|
controller.assertJS("subject.getPropertyValue('list-style-image') == 'none'", cssSecButton);
|
||||||
|
|
||||||
// Identity box should have a gray background
|
// Identity box should have a gray background
|
||||||
controller.assertProperty(identityBox, "className", "unknownIdentity");
|
controller.assertProperty(identityBox, "className", "unknownIdentity");
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче