[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 265/483: Fixed: Wrong position marked if the selected element isn't visible at all (yes, can happen)

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:41:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit 47e8bd1b38d649d0e881cddda2c06e9f03f826d9
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Wed Oct 27 10:19:40 2010 +0200

    Fixed: Wrong position marked if the selected element isn't visible at all (yes, can happen)
---
 modules/Aardvark.jsm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/Aardvark.jsm b/modules/Aardvark.jsm
index 060dd3e..f40d4d5 100644
--- a/modules/Aardvark.jsm
+++ b/modules/Aardvark.jsm
@@ -363,8 +363,8 @@ var Aardvark =
     let pos = this.getElementPosition(elem);
     this.boxElem.style.left = (pos.left - 1) + "px";
     this.boxElem.style.top = (pos.top - 1) + "px";
-    border.style.width = (pos.right - pos.left - 2) + "px";
-    border.style.height = (pos.bottom - pos.top - 2) + "px";
+    border.style.width = Math.max(pos.right - pos.left - 2, 0) + "px";
+    border.style.height = Math.max(pos.bottom - pos.top - 2, 0) + "px";
   
     let doc = this.browser.contentDocument;
   

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list