[Pkg-mozext-commits] [tabmixplus] 103/147: Follow up bug 1334199 - Omit getComputedStyle's second argument when it's falsy
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:27:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit fd0b01eb3483e6c21d77bbb7638b698a6411e440
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Jan 30 15:46:17 2017 +0200
Follow up bug 1334199 - Omit getComputedStyle's second argument when it's falsy
---
chrome/content/minit/minit.js | 2 +-
chrome/content/preferences/appearance.js | 2 +-
chrome/content/preferences/events.js | 2 +-
chrome/content/preferences/preferences.js | 2 +-
chrome/content/tab/scrollbox.xml | 2 +-
chrome/content/tab/tab.js | 8 ++++----
chrome/content/tabmix.js | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 0f2e65f..cf53333 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -1050,7 +1050,7 @@ Tabmix.whereToOpen = function TMP_whereToOpen(pref, altKey) {
Tabmix.getStyle = function TMP_getStyle(aObj, aStyle) {
try {
- return parseInt(window.getComputedStyle(aObj, null)[aStyle]) || 0;
+ return parseInt(window.getComputedStyle(aObj)[aStyle]) || 0;
} catch (ex) {
this.assert(ex);
}
diff --git a/chrome/content/preferences/appearance.js b/chrome/content/preferences/appearance.js
index 1f2f952..07009a3 100644
--- a/chrome/content/preferences/appearance.js
+++ b/chrome/content/preferences/appearance.js
@@ -38,7 +38,7 @@ var gAppearancePane = {
}
// rtl update position
- var direction = window.getComputedStyle($("appearance"), null).direction;
+ var direction = window.getComputedStyle($("appearance")).direction;
if (direction == "rtl") {
let right = $("newTabButton.position.right");
// let left = $("newTabButton.position.left");
diff --git a/chrome/content/preferences/events.js b/chrome/content/preferences/events.js
index 965c33c..6105eb3 100644
--- a/chrome/content/preferences/events.js
+++ b/chrome/content/preferences/events.js
@@ -30,7 +30,7 @@ var gEventsPane = {
this.disableReplaceLastTabWith();
this.disableShowTabList();
- var direction = window.getComputedStyle($("paneEvents"), null).direction;
+ var direction = window.getComputedStyle($("paneEvents")).direction;
if (direction == "rtl") {
let focusTab = $("focusTab").firstChild.childNodes;
let [rightLabel, leftLabel] = [focusTab[2].label, focusTab[1].label];
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index cb5e28b..519ba23 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -71,7 +71,7 @@ var gPrefWindow = {
}
let aPaneElement = $(aPaneID), diff = 0;
let content = document.getAnonymousElementByAttribute(aPaneElement, "class", "content-box");
- let style = window.getComputedStyle(content, "");
+ let style = window.getComputedStyle(content);
let contentWidth = parseInt(style.width) + parseInt(style.marginRight) +
parseInt(style.marginLeft);
let tabboxes = aPaneElement.getElementsByTagName("tabbox");
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 6d9e4f9..132b5a7 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -134,7 +134,7 @@
<body><![CDATA[
if (this._tabMarginLeft === null || this._tabMarginRight === null) {
let tabMiddle = document.getAnonymousElementByAttribute(aTab, "class", "tab-background-middle");
- let tabMiddleStyle = window.getComputedStyle(tabMiddle, null);
+ let tabMiddleStyle = window.getComputedStyle(tabMiddle);
this._tabMarginLeft = parseFloat(tabMiddleStyle.marginLeft);
this._tabMarginRight = parseFloat(tabMiddleStyle.marginRight);
}
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index abea832..43664ae 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -619,7 +619,7 @@ Tabmix.tabsUtils = {
let tab = this.tabBar.firstChild;
XPCOMUtils.defineLazyGetter(Tabmix, "rtl", () => {
- return window.getComputedStyle(tabbrowser, null).direction == "rtl";
+ return window.getComputedStyle(tabbrowser).direction == "rtl";
});
XPCOMUtils.defineLazyGetter(Tabmix, "ltr", () => !Tabmix.rtl);
@@ -1005,7 +1005,7 @@ Tabmix.tabsUtils = {
if (!height) // don't panic
return 1;
// some theme add marginTop/marginBottom to tabs
- var cStyle = window.getComputedStyle(aTab, null);
+ var cStyle = window.getComputedStyle(aTab);
var marginTop = parseInt(cStyle.marginTop) || 0;
var marginBottom = parseInt(cStyle.marginBottom) || 0;
height += marginTop + marginBottom;
@@ -1668,7 +1668,7 @@ gTMPprefObserver = {
* we apply these value dynamically here to our tab-protect-icon tab-lock-icon class
* since each theme can use different values
*/
- let style = window.getComputedStyle(icon, null);
+ let style = window.getComputedStyle(icon);
let pinned;
pinned = icon.hasAttribute("pinned");
if (pinned)
@@ -1760,7 +1760,7 @@ gTMPprefObserver = {
// set right margin to tab-label when close button is not right to it
// on default theme the margin is zero, so we set the end margin to be the same as the start margin
- let style = window.getComputedStyle(icon, null);
+ let style = window.getComputedStyle(icon);
let marginEnd = style.getPropertyValue(sMarginEnd);
let textMarginEnd = parseInt(marginEnd) ? marginEnd : this._marginStart;
delete this._marginStart;
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 89bf3c9..42795f6 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -135,7 +135,7 @@ Tabmix.getAfterTabsButtonsWidth = function TMP_getAfterTabsButtonsWidth() {
document.getAnonymousElementByAttribute(tabBar, "command", "cmd_newNavigatorTab");
this.tabsNewtabButton.setAttribute("force-display", true);
let openNewTabRect = this.tabsNewtabButton.getBoundingClientRect();
- let style = window.getComputedStyle(this.tabsNewtabButton, null);
+ let style = window.getComputedStyle(this.tabsNewtabButton);
let marginStart = style.getPropertyValue("margin-left");
// it doesn't work when marginEnd add to buttonWidth
// let marginEnd = style.getPropertyValue("margin-right");
--
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