зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446414 - Remove underutilized browser.homePage and browser.goHome. r=enn
This commit is contained in:
Родитель
4e402f9b99
Коммит
487924b63b
|
@ -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 -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче