Bug 1445099 - Remove unused properties from browser binding. r=Paolo
MozReview-Commit-ID: 4M0t4xCvejv
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -575,46 +575,16 @@ const gStoragePressureObserver = {
});
}
notificationBox.appendNotification(
msg, NOTIFICATION_VALUE, null, notificationBox.PRIORITY_WARNING_HIGH, buttons, null);
}
};
-/**
- * Given a starting docshell and a URI to look up, find the docshell the URI
- * is loaded in.
- * @param aDocument
- * A document to find instead of using just a URI - this is more specific.
- * @param aDocShell
- * The doc shell to start at
- * @param aSoughtURI
- * The URI that we're looking for
- * @returns The doc shell that the sought URI is loaded in. Can be in
- * subframes.
- */
-function findChildShell(aDocument, aDocShell, aSoughtURI) {
- aDocShell.QueryInterface(Ci.nsIWebNavigation);
- aDocShell.QueryInterface(Ci.nsIInterfaceRequestor);
- var doc = aDocShell.getInterface(Ci.nsIDOMDocument);
- if ((aDocument && doc == aDocument) ||
- (aSoughtURI && aSoughtURI.spec == aDocShell.currentURI.spec))
- return aDocShell;
-
- var node = aDocShell.QueryInterface(Ci.nsIDocShellTreeItem);
- for (var i = 0; i < node.childCount; ++i) {
- var docShell = node.getChildAt(i);
- docShell = findChildShell(aDocument, docShell, aSoughtURI);
- if (docShell)
- return docShell;
- }
- return null;
-}
-
var gPopupBlockerObserver = {
handleEvent(aEvent) {
if (aEvent.originalTarget != gBrowser.selectedBrowser)
return;
gIdentityHandler.refreshIdentityBlock();
if (!gBrowser.selectedBrowser.blockedPopups ||
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -365,20 +365,16 @@ window._gBrowser = {
get docShell() {
return this.selectedBrowser.docShell;
},
get webNavigation() {
return this.selectedBrowser.webNavigation;
},
- get webBrowserFind() {
- return this.selectedBrowser.webBrowserFind;
- },
-
get webProgress() {
return this.selectedBrowser.webProgress;
},
get contentWindow() {
return this.selectedBrowser.contentWindow;
},
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -161,20 +161,16 @@
<property name="documentURI"
onget="return this.contentDocument.documentURIObject;"
readonly="true"/>
<property name="documentContentType"
onget="return this.contentDocument ? this.contentDocument.contentType : null;"
readonly="true"/>
- <property name="preferences"
- onget="return this.mPrefs.QueryInterface(Components.interfaces.nsIPrefService);"
- readonly="true"/>
-
<!--
Weak reference to an optional frame loader that can be used to influence
process selection for this browser.
See nsIBrowser.sameProcessAsFrameLoader.
-->
<field name="_sameProcessAsFrameLoader">null</field>
<property name="sameProcessAsFrameLoader">
<getter><![CDATA[
@@ -487,56 +483,34 @@
</property>
<property name="showWindowResizer"
onset="if (val) this.setAttribute('showresizer', 'true');
else this.removeAttribute('showresizer');
return val;"
onget="return this.getAttribute('showresizer') == 'true';"/>
- <property name="manifestURI"
- readonly="true">
- <getter><![CDATA[
- return this.contentDocument.documentElement &&
- this.contentDocument.documentElement.getAttribute("manifest");
- ]]></getter>
- </property>
-
<property name="fullZoom">
<getter><![CDATA[
return this.markupDocumentViewer.fullZoom;
]]></getter>
<setter><![CDATA[
this.markupDocumentViewer.fullZoom = val;
]]></setter>
</property>
- <property name="deviceFullZoom"
- readonly="true">
- <getter><![CDATA[
- return this.markupDocumentViewer.deviceFullZoom;
- ]]></getter>
- </property>
-
<property name="textZoom">
<getter><![CDATA[
return this.markupDocumentViewer.textZoom;
]]></getter>
<setter><![CDATA[
this.markupDocumentViewer.textZoom = val;
]]></setter>
</property>
- <property name="effectiveTextZoom"
- readonly="true">
- <getter><![CDATA[
- return this.markupDocumentViewer.effectiveTextZoom;
- ]]></getter>
- </property>
-
<property name="isSyntheticDocument">
<getter><![CDATA[
return this.contentDocument.mozSyntheticDocument;
]]></getter>
</property>
<property name="hasContentOpener">
<getter><![CDATA[
@@ -581,37 +555,16 @@
<parameter name="aListener"/>
<body>
<![CDATA[
this.webProgress.removeProgressListener(aListener);
]]>
</body>
</method>
- <method name="findChildShell">
- <parameter name="aDocShell"/>
- <parameter name="aSoughtURI"/>
- <body>
- <![CDATA[
- if (aDocShell.QueryInterface(Ci.nsIWebNavigation)
- .currentURI.spec == aSoughtURI.spec)
- return aDocShell;
- var node = aDocShell.QueryInterface(
- Ci.nsIDocShellTreeItem);
- for (var i = 0; i < node.childCount; ++i) {
- var docShell = node.getChildAt(i);
- docShell = this.findChildShell(docShell, aSoughtURI);
- if (docShell)
- return docShell;
- }
- return null;
- ]]>
- </body>
- </method>
-
<method name="onPageHide">
<parameter name="aEvent"/>
<body>
<![CDATA[
// Delete the feeds cache if we're hiding the topmost page
// (as opposed to one of its iframes).
if (this.feeds && aEvent.target == this.contentDocument)
this.feeds = null;
@@ -894,24 +847,16 @@
onget="return this._userTypedValue;">
<setter><![CDATA[
this.urlbarChangeTracker.userTyped();
this._userTypedValue = val;
return val;
]]></setter>
</property>
- <field name="mFormFillAttached">
- false
- </field>
-
- <field name="isShowingMessage">
- false
- </field>
-
<field name="droppedLinkHandler">
null
</field>
<field name="mIconURL">null</field>
<!-- This is managed by the tabbrowser -->
<field name="lastURI">null</field>
--- a/toolkit/content/widgets/remote-browser.xml
+++ b/toolkit/content/widgets/remote-browser.xml
@@ -271,21 +271,16 @@
let {frameLoader} = this;
if (frameLoader.tabParent) {
return frameLoader.tabParent.hasLayers;
}
return false;
]]></getter>
</property>
- <field name="_manifestURI"/>
- <property name="manifestURI"
- onget="return this._manifestURI"
- readonly="true"/>
-
<field name="mDestroyed">false</field>
<field name="_permitUnloadId">0</field>
<method name="getInPermitUnload">
<parameter name="aCallback"/>
<body>
<![CDATA[