summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base/content
diff options
context:
space:
mode:
Diffstat (limited to 'application/basilisk/base/content')
-rw-r--r--application/basilisk/base/content/browser-fullScreenAndPointerLock.js35
-rw-r--r--application/basilisk/base/content/browser.js5
-rw-r--r--application/basilisk/base/content/browser.xul3
-rw-r--r--application/basilisk/base/content/tab-content.js11
-rw-r--r--application/basilisk/base/content/tabbrowser.xml11
-rw-r--r--application/basilisk/base/content/urlbarBindings.xml22
6 files changed, 29 insertions, 58 deletions
diff --git a/application/basilisk/base/content/browser-fullScreenAndPointerLock.js b/application/basilisk/base/content/browser-fullScreenAndPointerLock.js
index ebe55377f..b26a31f78 100644
--- a/application/basilisk/base/content/browser-fullScreenAndPointerLock.js
+++ b/application/basilisk/base/content/browser-fullScreenAndPointerLock.js
@@ -322,15 +322,9 @@ var FullScreen = {
document.addEventListener("popuphidden", this._setPopupOpen, false);
// If it is not safe to collapse, add the mouse position tracker or
// else it won't be possible to hide the navigation toolbox again
- if (!this._safeToCollapse()) {
- let rect = gBrowser.mPanelContainer.getBoundingClientRect();
- this._mouseTargetRect = {
- top: rect.top + 50,
- bottom: rect.bottom,
- left: rect.left,
- right: rect.right
- };
- MousePosTracker.addListener(this);
+ if (gPrefService.getBoolPref("browser.fullscreen.autohide")) {
+ gBrowser.mPanelContainer.addEventListener("mousemove",
+ this._collapseCallback, false);
}
// In DOM fullscreen mode, we hide toolbars with CSS
if (!document.fullscreenElement)
@@ -468,7 +462,8 @@ var FullScreen = {
cleanup: function () {
if (!window.fullScreen) {
- MousePosTracker.removeListener(this);
+ gBrowser.mPanelContainer.removeEventListener("mousemove",
+ this._collapseCallback, false);
document.removeEventListener("keypress", this._keyToggleCallback, false);
document.removeEventListener("popupshown", this._setPopupOpen, false);
document.removeEventListener("popuphidden", this._setPopupOpen, false);
@@ -497,17 +492,12 @@ var FullScreen = {
.getInterface(Ci.nsIDOMWindowUtils);
},
- getMouseTargetRect: function()
- {
- return this._mouseTargetRect;
- },
-
// Event callbacks
_expandCallback: function()
{
FullScreen.showNavToolbox();
},
- onMouseEnter: function()
+ _collapseCallback: function()
{
FullScreen.hideNavToolbox();
},
@@ -588,14 +578,8 @@ var FullScreen = {
// Track whether mouse is near the toolbox
if (trackMouse && !this.useLionFullScreen) {
- let rect = gBrowser.mPanelContainer.getBoundingClientRect();
- this._mouseTargetRect = {
- top: rect.top + 50,
- bottom: rect.bottom,
- left: rect.left,
- right: rect.right
- };
- MousePosTracker.addListener(this);
+ gBrowser.mPanelContainer.addEventListener("mousemove",
+ this._collapseCallback, false);
}
this._isChromeCollapsed = false;
@@ -622,7 +606,8 @@ var FullScreen = {
gNavToolbox.style.marginTop =
-gNavToolbox.getBoundingClientRect().height + "px";
this._isChromeCollapsed = true;
- MousePosTracker.removeListener(this);
+ gBrowser.mPanelContainer.removeEventListener("mousemove",
+ this._collapseCallback, false);
},
_updateToolbars: function (aEnterFS) {
diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js
index 9fb997a42..336670fa0 100644
--- a/application/basilisk/base/content/browser.js
+++ b/application/basilisk/base/content/browser.js
@@ -3094,6 +3094,11 @@ function getWebNavigation()
}
function BrowserReloadWithFlags(reloadFlags) {
+
+ // Reset DOS mitigation for auth prompts when user initiates a reload.
+ let browser = gBrowser.selectedBrowser;
+ delete browser.authPromptCounter;
+
let url = gBrowser.currentURI.spec;
if (gBrowser.updateBrowserRemotenessByURL(gBrowser.selectedBrowser, url)) {
// If the remoteness has changed, the new browser doesn't have any
diff --git a/application/basilisk/base/content/browser.xul b/application/basilisk/base/content/browser.xul
index 3208538c1..be64f1bac 100644
--- a/application/basilisk/base/content/browser.xul
+++ b/application/basilisk/base/content/browser.xul
@@ -997,7 +997,8 @@
contentcontextmenu="contentAreaContextMenu"
autocompletepopup="PopupAutoComplete"
selectmenulist="ContentSelectDropdown"
- datetimepicker="DateTimePickerPanel"/>
+ datetimepicker="DateTimePickerPanel"
+ authdosprotected="true" />
</vbox>
<vbox id="browser-border-end" hidden="true" layer="true"/>
</hbox>
diff --git a/application/basilisk/base/content/tab-content.js b/application/basilisk/base/content/tab-content.js
index 6d053dd2b..7441b2140 100644
--- a/application/basilisk/base/content/tab-content.js
+++ b/application/basilisk/base/content/tab-content.js
@@ -9,9 +9,6 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-#ifdef MOZ_WEBEXTENSIONS
-Cu.import("resource://gre/modules/ExtensionContent.jsm");
-#endif
XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
"resource:///modules/E10SUtils.jsm");
@@ -916,14 +913,6 @@ var UserContextIdNotifier = {
UserContextIdNotifier.init();
-#ifdef MOZ_WEBEXTENSIONS
-ExtensionContent.init(this);
-addEventListener("unload", () => {
- ExtensionContent.uninit(this);
- RefreshBlocker.uninit();
-});
-#endif
-
addMessageListener("AllowScriptsToClose", () => {
content.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml
index 043838020..52c51db69 100644
--- a/application/basilisk/base/content/tabbrowser.xml
+++ b/application/basilisk/base/content/tabbrowser.xml
@@ -25,7 +25,7 @@
<xul:vbox flex="1" class="browserContainer">
<xul:stack flex="1" class="browserStack" anonid="browserStack">
<xul:browser anonid="initialBrowser" type="content-primary" message="true" messagemanagergroup="browsers"
- xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker"/>
+ xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker,authdosprotected"/>
</xul:stack>
</xul:vbox>
</xul:hbox>
@@ -1936,6 +1936,10 @@
if (this.hasAttribute("datetimepicker")) {
b.setAttribute("datetimepicker", this.getAttribute("datetimepicker"));
}
+
+ if (this.hasAttribute("authdosprotected")) {
+ b.setAttribute("authdosprotected", this.getAttribute("authdosprotected"));
+ }
b.setAttribute("autoscrollpopup", this._autoScrollPopup.id);
@@ -2991,7 +2995,10 @@
<parameter name="aTab"/>
<body>
<![CDATA[
- this.getBrowserForTab(aTab).reload();
+ let browser = this.getBrowserForTab(aTab);
+ // Reset DOS mitigation for basic auth prompt
+ delete browser.authPromptCounter;
+ browser.reload();
]]>
</body>
</method>
diff --git a/application/basilisk/base/content/urlbarBindings.xml b/application/basilisk/base/content/urlbarBindings.xml
index eb3150581..b9c17818a 100644
--- a/application/basilisk/base/content/urlbarBindings.xml
+++ b/application/basilisk/base/content/urlbarBindings.xml
@@ -56,11 +56,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
<field name="AppConstants" readonly="true">
(Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants;
</field>
-#ifdef MOZ_WEBEXTENSIONS
- <field name="ExtensionSearchHandler" readonly="true">
- (Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler;
- </field>
-#endif
<constructor><![CDATA[
this._prefs = Components.classes["@mozilla.org/preferences-service;1"]
@@ -488,15 +483,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
actionDetails
);
break;
-#ifdef MOZ_WEBEXTENSIONS
- case "extension":
- this.handleRevert();
- // Give the extension control of handling the command.
- let searchString = action.params.content;
- let keyword = action.params.keyword;
- this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where);
- return;
-#endif
}
} else {
// This is a fallback for add-ons and old testing code that directly
@@ -554,6 +540,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
Cu.reportError(ex);
}
+ // Reset DOS mitigations for the basic auth prompt.
+ delete browser.authPromptCounter;
+
let params = {
postData,
allowThirdPartyFixup: true,
@@ -1214,11 +1203,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
this._clearNoActions();
this.formatValue();
}
-#ifdef MOZ_WEBEXTENSIONS
- if (ExtensionSearchHandler.hasActiveInputSession()) {
- ExtensionSearchHandler.handleInputCancelled();
- }
-#endif
]]></handler>
<handler event="dragstart" phase="capturing"><![CDATA[