[Pkg-mozext-commits] [tabmixplus] 72/123: When theme or extension add negative margin-bottom to the tab or tab content the scrollHeight can be larger than the actual scrollbox inner-box height
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:28 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 908fb70dc9d21a3492ead713729520b3a1e6b3cf
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Sep 3 08:37:37 2014 +0300
When theme or extension add negative margin-bottom to the tab or tab content the scrollHeight can be larger than the actual scrollbox inner-box height
---
chrome/content/tab/scrollbox.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 74a02ea..288b3a2 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -94,6 +94,10 @@
document.getAnonymousElementByAttribute(this, "anonid", "scrollbutton-down");
</field>
+ <field name="innerbox" readonly="true">
+ document.getAnonymousElementByAttribute(this._scrollbox, "class", "box-inherit scrollbox-innerbox");
+ </field>
+
<!-- we replace tabbrowser.xml "tabbrowser-arrowscrollbox" binding with this one
Override scrollbox.xml method, since our scrollbox's children are
inherited from the binding parent -->
@@ -197,6 +201,12 @@
if (Tabmix.isVersion(320)) {
Tabmix.changeCode(this, "scrollbox._updateScrollButtonsDisabledState")._replace(
+ // when theme or extension add negative margin-bottom to the tab or
+ // tab content the scrollHeight can be larger than the actual
+ // inner-box height
+ 'this.scrollSize',
+ '(this.orient == "vertical" && this.isMultiRow ? this.innerbox.getBoundingClientRect().height : $&)'
+ )._replace(
/(\})(\)?)$/,
' let box = document.getElementById("tabmixScrollBox");\n' +
' Tabmix.setItem(box, "scrolledtoend", scrolledToEnd || null);\n' +
--
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