[Pkg-mozext-commits] [tabmixplus] 27/44: [e10s] Calling webNavigation.loadURI with url that trigger unknownContentType.xul dialog change the tab title to its address (Bug 1081891)
David Prévot
taffit at moszumanska.debian.org
Wed Oct 15 02:10:03 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit ad5df4c5272676b9f3aabffa4ce63f7ab488c507
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Oct 13 19:53:04 2014 +0300
[e10s] Calling webNavigation.loadURI with url that trigger unknownContentType.xul dialog change the tab title to its address (Bug 1081891)
---
chrome/content/tab/tab.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index fffcfff..c26c27c 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -1900,12 +1900,30 @@ var TabmixProgressListener = {
$&'
).toCode();
this.listener.mTabBrowser = tabBrowser;
+ if (!Tabmix.isVersion(340))
+ this.listener._fixTabTitle = function() {};
tabBrowser.addTabsProgressListener(this.listener);
},
listener: {
mTabBrowser: null,
showProgressOnTab: false,
+
+ _fixTabTitle: function TMP__contentLinkClick(tab, browser, url) {
+ if (browser.getAttribute("remote") != "true" ||
+ browser._contentTitle != "" || this.mTabBrowser.isBlankTab(tab))
+ return;
+ tab.addEventListener("TabLabelModified", function titleChanged(event) {
+ tab.removeEventListener("TabLabelModified", titleChanged, true);
+ let title = browser.contentDocumentAsCPOW.title;
+ if (browser._contentTitle != title) {
+ event.preventDefault();
+ browser._contentTitle = title;
+ tab.visibleLabel = title;
+ }
+ }, true);
+ },
+
onProgressChange: function (aBrowser, aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
@@ -1927,6 +1945,7 @@ var TabmixProgressListener = {
if (aStateFlags & nsIWebProgressListener.STATE_START &&
aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
let url = aRequest.QueryInterface(Ci.nsIChannel).URI.spec;
+ this._fixTabTitle(tab, aBrowser, url);
if (url == "about:blank") {
tab.removeAttribute("busy");
tab.removeAttribute("progress");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list