diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-22 20:58:36 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-22 20:58:36 +0000 |
commit | ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14 (patch) | |
tree | 55a1e7c2bf2007f88cc5518052419bee63126688 /toolkit/content | |
parent | 9ffed6e8bfb35c090caf5f8bca7a0f8bd4cbec94 (diff) | |
parent | 1d7664d3a1db098024c7624650b0d272a26635e0 (diff) | |
download | UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar.gz UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar.lz UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.tar.xz UXP-ab5f78afbdbf3b37f89c06dcd59ff9442d6ecf14.zip |
Merge branch 'master' into Pale_Moon-release
# Conflicts:
# application/palemoon/config/version.txt
# old-configure.in
Diffstat (limited to 'toolkit/content')
-rw-r--r-- | toolkit/content/widgets/browser.xml | 113 | ||||
-rw-r--r-- | toolkit/content/widgets/preferences.xml | 8 | ||||
-rw-r--r-- | toolkit/content/widgets/scrollbox.xml | 27 |
3 files changed, 31 insertions, 117 deletions
diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml index a30ff1c43..11ed998cc 100644 --- a/toolkit/content/widgets/browser.xml +++ b/toolkit/content/widgets/browser.xml @@ -19,14 +19,7 @@ if (this.getAttribute("autoscroll") == "false") return false; - var enabled = true; - try { - enabled = this.mPrefs.getBoolPref("general.autoScroll"); - } - catch (ex) { - } - - return enabled; + return this.mPrefs.getBoolPref("general.autoScroll", true); ]]> </getter> </property> @@ -43,15 +36,11 @@ <parameter name="fn"/> <body> <![CDATA[ - if (!this.isRemoteBrowser) { - this.inLoadURI = true; - try { - fn(); - } finally { - this.inLoadURI = false; - } - } else { + this.inLoadURI = true; + try { fn(); + } finally { + this.inLoadURI = false; } ]]> </body> @@ -307,7 +296,7 @@ <method name="preserveLayers"> <parameter name="preserve"/> <body> - // Only useful for remote browsers. + <!-- Only useful for remote browsers. --> </body> </method> @@ -338,8 +327,9 @@ </getter> </property> + <!-- stubbed to false until all callers are removed --> <property name="isRemoteBrowser" - onget="return (this.getAttribute('remote') == 'true');" + onget="return false;" readonly="true"/> <property name="messageManager" @@ -899,6 +889,10 @@ <field name="mIconURL">null</field> + <property name="isAuthDOSProtected" + onget="return (this.getAttribute('authdosprotected') == 'true');" + readonly="true"/> + <!-- This is managed by the tabbrowser --> <field name="lastURI">null</field> @@ -916,7 +910,7 @@ os.addObserver(this, "browser:purge-session-history", true); // enable global history if we weren't told otherwise - if (!this.hasAttribute("disableglobalhistory") && !this.isRemoteBrowser) { + if (!this.hasAttribute("disableglobalhistory")) { try { this.docShell.useGlobalHistory = true; } catch (ex) { @@ -945,9 +939,7 @@ this.relatedBrowser = relatedBrowser; } - if (!this.isRemoteBrowser) { - this.addEventListener("pagehide", this.onPageHide, true); - } + this.addEventListener("pagehide", this.onPageHide, true); if (this.messageManager) { this.messageManager.addMessageListener("PopupBlocking:UpdateBlockedPopups", this); @@ -996,9 +988,7 @@ this.lastURI = null; - if (!this.isRemoteBrowser) { - this.removeEventListener("pagehide", this.onPageHide, true); - } + this.removeEventListener("pagehide", this.onPageHide, true); if (this._autoScrollNeedsCleanup) { // we polluted the global scope, so clean it up @@ -1284,9 +1274,6 @@ <parameter name="aOtherBrowser"/> <body> <![CDATA[ - if (this.isRemoteBrowser != aOtherBrowser.isRemoteBrowser) - throw new Error("Can only swap docshells between browsers in the same process."); - // Give others a chance to swap state. // IMPORTANT: Since a swapDocShells call does not swap the messageManager // instances attached to a browser to aOtherBrowser, others @@ -1320,28 +1307,6 @@ "_webNavigation" ]; - if (this.isRemoteBrowser) { - fieldsToSwap.push(...[ - "_remoteWebNavigation", - "_remoteWebNavigationImpl", - "_remoteWebProgressManager", - "_remoteWebProgress", - "_remoteFinder", - "_securityUI", - "_documentURI", - "_documentContentType", - "_contentTitle", - "_characterSet", - "_contentPrincipal", - "_imageDocument", - "_fullZoom", - "_textZoom", - "_isSyntheticDocument", - "_innerWindowID", - "_manifestURI", - ]); - } - var ourFieldValues = {}; var otherFieldValues = {}; for (let field of fieldsToSwap) { @@ -1364,27 +1329,10 @@ aOtherBrowser[field] = ourFieldValues[field]; } - if (!this.isRemoteBrowser) { - // Null the current nsITypeAheadFind instances so that they're - // lazily re-created on access. We need to do this because they - // might have attached the wrong docShell. - this._fastFind = aOtherBrowser._fastFind = null; - } - else { - // Rewire the remote listeners - this._remoteWebNavigationImpl.swapBrowser(this); - aOtherBrowser._remoteWebNavigationImpl.swapBrowser(aOtherBrowser); - - if (this._remoteWebProgressManager && aOtherBrowser._remoteWebProgressManager) { - this._remoteWebProgressManager.swapBrowser(this); - aOtherBrowser._remoteWebProgressManager.swapBrowser(aOtherBrowser); - } - - if (this._remoteFinder) - this._remoteFinder.swapBrowser(this); - if (aOtherBrowser._remoteFinder) - aOtherBrowser._remoteFinder.swapBrowser(aOtherBrowser); - } + // Null the current nsITypeAheadFind instances so that they're + // lazily re-created on access. We need to do this because they + // might have attached the wrong docShell. + this._fastFind = aOtherBrowser._fastFind = null; event = new CustomEvent("EndSwapDocShells", {"detail": aOtherBrowser}); this.dispatchEvent(event); @@ -1472,18 +1420,8 @@ return; // Toggle browse with caret mode - var browseWithCaretOn = false; - var warn = true; - - try { - warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable); - } catch (ex) { - } - - try { - browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn); - } catch (ex) { - } + var browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn, false); + var warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable, true); if (warn && !browseWithCaretOn) { var checkValue = {value:false}; var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] @@ -1536,11 +1474,6 @@ event.preventDefault(); } - // No need to handle "dragover" in e10s, since nsDocShellTreeOwner.cpp in the child process - // handles that case using "@mozilla.org/content/dropped-link-handler;1" service. - if (this.isRemoteBrowser) - return; - let linkHandler = Components.classes["@mozilla.org/content/dropped-link-handler;1"]. getService(Components.interfaces.nsIDroppedLinkHandler); if (linkHandler.canDropLink(event, false)) @@ -1549,9 +1482,7 @@ </handler> <handler event="drop" group="system"> <![CDATA[ - // No need to handle "drop" in e10s, since nsDocShellTreeOwner.cpp in the child process - // handles that case using "@mozilla.org/content/dropped-link-handler;1" service. - if (!this.droppedLinkHandler || event.defaultPrevented || this.isRemoteBrowser) + if (!this.droppedLinkHandler || event.defaultPrevented) return; let name = { }; diff --git a/toolkit/content/widgets/preferences.xml b/toolkit/content/widgets/preferences.xml index 9fb2ac7ea..11de03246 100644 --- a/toolkit/content/widgets/preferences.xml +++ b/toolkit/content/widgets/preferences.xml @@ -893,12 +893,8 @@ <![CDATA[ var psvc = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); - var animate = /Mac/.test(navigator.platform); - try { - animate = psvc.getBoolPref("browser.preferences.animateFadeIn"); - } - catch (e) { } - return animate; + return psvc.getBoolPref("browser.preferences.animateFadeIn", + /Mac/.test(navigator.platform)); ]]> </getter> </property> diff --git a/toolkit/content/widgets/scrollbox.xml b/toolkit/content/widgets/scrollbox.xml index ff57a5911..219b7cb5e 100644 --- a/toolkit/content/widgets/scrollbox.xml +++ b/toolkit/content/widgets/scrollbox.xml @@ -80,13 +80,8 @@ <property name="scrollIncrement" readonly="true"> <getter><![CDATA[ if (this._scrollIncrement === null) { - try { - this._scrollIncrement = this._prefBranch - .getIntPref("toolkit.scrollbox.scrollIncrement"); - } - catch (ex) { - this._scrollIncrement = 20; - } + this._scrollIncrement = this._prefBranch + .getIntPref("toolkit.scrollbox.scrollIncrement", 20); } return this._scrollIncrement; ]]></getter> @@ -99,13 +94,8 @@ if (this.hasAttribute("smoothscroll")) { this._smoothScroll = (this.getAttribute("smoothscroll") == "true"); } else { - try { - this._smoothScroll = this._prefBranch - .getBoolPref("toolkit.scrollbox.smoothScroll"); - } - catch (ex) { - this._smoothScroll = true; - } + this._smoothScroll = this._prefBranch + .getBoolPref("toolkit.scrollbox.smoothScroll", true); } } return this._smoothScroll; @@ -737,12 +727,9 @@ </content> <implementation implements="nsITimerCallback, nsIDOMEventListener"> <constructor><![CDATA[ - try { - this._scrollDelay = this._prefBranch - .getIntPref("toolkit.scrollbox.clickToScroll.scrollDelay"); - } - catch (ex) { - } + this._scrollDelay = this._prefBranch + .getIntPref("toolkit.scrollbox.clickToScroll.scrollDelay", + this._scrollDelay); ]]></constructor> <destructor><![CDATA[ |