Bug 1446414 - Remove underutilized browser.homePage and browser.goHome. r=enn

This commit is contained in:
Dão Gottwald 2018-03-16 16:31:59 +01:00
Родитель 4e402f9b99
Коммит 487924b63b
6 изменённых файлов: 6 добавлений и 53 удалений

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

@ -127,7 +127,7 @@ window._gBrowser = {
_browserBindingProperties: [
"canGoBack", "canGoForward", "goBack", "goForward", "permitUnload",
"reload", "reloadWithFlags", "stop", "loadURI", "loadURIWithFlags",
"goHome", "homePage", "gotoIndex", "currentURI", "documentURI",
"gotoIndex", "currentURI", "documentURI",
"preferences", "imageDocument", "isRemoteBrowser", "messageManager",
"getTabBrowser", "finder", "fastFind", "sessionHistory", "contentTitle",
"characterSet", "fullZoom", "textZoom", "webProgress",
@ -368,23 +368,10 @@ window._gBrowser = {
return this.selectedBrowser.loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset, aPostData);
},
goHome() {
return this.selectedBrowser.goHome();
},
gotoIndex(aIndex) {
return this.selectedBrowser.gotoIndex(aIndex);
},
set homePage(val) {
this.selectedBrowser.homePage = val;
return val;
},
get homePage() {
return this.selectedBrowser.homePage;
},
get currentURI() {
return this.selectedBrowser.currentURI;
},

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

@ -113,7 +113,7 @@ function OnLDBLoad()
if (window.arguments && window.arguments[0])
gBrowser.loadURI(window.arguments[0]);
else
gBrowser.goHome();
gBrowser.loadURI("about:blank");
gDebugger.init(gBrowser.contentWindow);

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

@ -112,8 +112,7 @@
</toolbar>
</toolbox>
<browser flex="1" id="browser" type="content" primary="true"
homepage="about:blank" />
<browser flex="1" id="browser" type="content" primary="true"/>
<hbox>
<description id="status-text" value="" />

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

@ -153,38 +153,6 @@
</body>
</method>
<method name="goHome">
<body>
<![CDATA[
try {
this.loadURI(this.homePage);
} catch (e) {
}
]]>
</body>
</method>
<property name="homePage">
<getter>
<![CDATA[
var uri;
if (this.hasAttribute("homepage"))
uri = this.getAttribute("homepage");
else
uri = "http://www.mozilla.org/"; // widget pride
return uri;
]]>
</getter>
<setter>
<![CDATA[
this.setAttribute("homepage", val);
return val;
]]>
</setter>
</property>
<method name="gotoIndex">
<parameter name="aIndex"/>
<body>

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

@ -2110,7 +2110,6 @@ var gDiscoverView = {
return;
}
this._browser.homePage = this.homepageURL.spec;
this._browser.addProgressListener(this);
if (this.loaded)
@ -2169,7 +2168,7 @@ var gDiscoverView = {
// and the error page is not visible then there is nothing else to do
if (this.loaded && this.node.selectedPanel != this._error &&
(!aIsRefresh || (this._browser.currentURI &&
this._browser.currentURI.spec == this._browser.homePage))) {
this._browser.currentURI.spec == this.homepageURL.spec))) {
gViewController.notifyViewChanged();
return;
}
@ -2189,7 +2188,7 @@ var gDiscoverView = {
canRefresh() {
if (this._browser.currentURI &&
this._browser.currentURI.spec == this._browser.homePage)
this._browser.currentURI.spec == this.homepageURL.spec)
return false;
return true;
},

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

@ -188,7 +188,7 @@
<spacer class="alert-spacer-after"/>
</vbox>
<browser id="discover-browser" type="content" flex="1"
disablehistory="true" homepage="about:blank"/>
disablehistory="true"/>
</deck>
<!-- container for views with the search/tools header -->