[Pkg-mozext-commits] [tabmixplus] 19/47: [e10s] we can get to Tabmix.urlBarOnBlur after the tab we hold in Tabmix.selectedTab was closed
David Prévot
taffit at moszumanska.debian.org
Fri Sep 26 20:57:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository tabmixplus.
commit 652b394e197d7ad653eed2eef8a190ad8f3a4219
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Sep 20 00:58:06 2014 +0300
[e10s] we can get to Tabmix.urlBarOnBlur after the tab we hold in Tabmix.selectedTab was closed
---
chrome/content/links/userInterface.js | 19 +++++++++++--------
chrome/content/minit/minit.js | 4 ++--
chrome/content/tabmix.js | 5 +++++
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/chrome/content/links/userInterface.js b/chrome/content/links/userInterface.js
index c7d231d..70ea79a 100644
--- a/chrome/content/links/userInterface.js
+++ b/chrome/content/links/userInterface.js
@@ -200,13 +200,14 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
return newTab;
}
+Tabmix.selectedTab = null;
Tabmix.clearUrlBar = function TMP_clearUrlBar(aTab, aUrl, aTimeOut) {
if(/about:home|(www\.)*(google|bing)\./.test(aUrl))
return;
if (!isBlankPageURL(aUrl)) {
// clean the the address bar as if the user laod about:blank tab
- gBrowser.tabmix_tab = aTab;
- gBrowser.tabmix_userTypedValue = aUrl;
+ this.selectedTab = aTab;
+ this.userTypedValue = aUrl;
gBrowser.userTypedValue = "";
}
// don't try to focus urlbar on popup
@@ -228,12 +229,14 @@ Tabmix.clearUrlBar = function TMP_clearUrlBar(aTab, aUrl, aTimeOut) {
Tabmix.urlBarOnBlur = function TMP_urlBarOnBlur() {
if (isBlankPageURL(gURLBar.value))
gURLBar.value = "";
- if (!gBrowser.tabmix_tab)
+
+ let tab = this.selectedTab;
+ if (!tab)
return;
- var isCurrentTab = gBrowser.tabmix_tab.selected;
- var browser = gBrowser.getBrowserForTab(gBrowser.tabmix_tab);
- var url = gBrowser.tabmix_userTypedValue;
+ var isCurrentTab = tab.selected;
+ var browser = gBrowser.getBrowserForTab(tab);
+ var url = this.userTypedValue;
if (!isBlankPageURL(url))
browser.userTypedValue = url;
if (isCurrentTab && gBrowser.mIsBusy) {
@@ -252,8 +255,8 @@ Tabmix.updateUrlBarValue = function TMP_updateUrlBarValue() {
if (url != gURLBar.value && !isBlankPageURL(url)) {
gURLBar.value = gBrowser.userTypedValue = url;
}
- delete gBrowser.tabmix_tab;
- delete gBrowser.tabmix_userTypedValue;
+ this.selectedTab = null;
+ this.userTypedValue = "";
}
/**
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index ddb16b9..797ca58 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -1108,8 +1108,8 @@ Tabmix.navToolbox = {
'{',
'{\
if (gBrowser.tabmix_tab) {\
- delete gBrowser.tabmix_tab;\
- delete gBrowser.tabmix_userTypedValue;\
+ Tabmix.selectedTab = null;\
+ Tabmix.userTypedValue = "";\
}'
)._replace(
'if (isMouseEvent || altEnter) {',
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index c80465c..346302b 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -844,6 +844,11 @@ var TMP_eventListener = {
Tabmix.countClosedTabs(tab);
+ if (Tabmix.selectedTab == tab) {
+ Tabmix.selectedTab = null;
+ Tabmix.userTypedValue = "";
+ }
+
// clean WeakMap
let browser = tab.linkedBrowser;
if (browser && TabmixSvc.syncHandlers.has(browser.permanentKey))
--
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