[Pkg-mozext-commits] [tabmixplus] 69/107: Calling window.duplicateTabIn, to duplicate tab to window, break Tabmix.delayedStartup. When gBrowser._switcher.visibleTab is closing window.getComputedStyle from "tab-background-middle" is null Update changeset 552d048cb11d
David Prévot
taffit at moszumanska.debian.org
Tue Dec 29 19:02:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit a2baba6bdd8d15f9f5a59046266e315ec7d89a04
Author: onemen <tabmix.onemen at gmail.com>
Date: Thu Nov 12 11:41:10 2015 +0200
Calling window.duplicateTabIn, to duplicate tab to window, break Tabmix.delayedStartup.
When gBrowser._switcher.visibleTab is closing window.getComputedStyle from "tab-background-middle" is null
Update changeset 552d048cb11d
---
chrome/content/tab/tab.js | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 859910c..3fb48b1 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -1773,9 +1773,12 @@ var gTMPprefObserver = {
// Workaround bug 943308 - tab-background not fully overlap the tab curves
// when layout.css.devPixelsPerPx is not 1.
- let selectedTab = Tabmix.isVersion(390) && gBrowser._switcher ?
- gBrowser._switcher.visibleTab : gBrowser.selectedTab;
- let bgMiddle = document.getAnonymousElementByAttribute(selectedTab, "class", "tab-background-middle");
+ let tab = gBrowser.selectedTab;
+ let visuallyselected = !Tabmix.isVersion(390) || tab.hasAttribute("visuallyselected");
+ if (!visuallyselected) {
+ tab.setAttribute("visuallyselected", true);
+ }
+ let bgMiddle = document.getAnonymousElementByAttribute(tab, "class", "tab-background-middle");
let margin = (-parseFloat(window.getComputedStyle(bgMiddle).borderLeftWidth)) + "px";
let bgMiddleMargin = this.dynamicRules.bgMiddleMargin;
if (bgMiddleMargin) {
@@ -1786,6 +1789,9 @@ var gTMPprefObserver = {
'-moz-margin-end: %PX; -moz-margin-start: %PX;}';
this.insertRule(newRule.replace(/%PX/g, margin), "bgMiddleMargin");
}
+ if (!visuallyselected) {
+ tab.removeAttribute("visuallyselected");
+ }
},
addDynamicRules: function() {
--
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