aboutsummaryrefslogtreecommitdiffstats
path: root/linkHints.js
diff options
context:
space:
mode:
authorRobert Smith2011-06-14 14:08:10 -0500
committerRobert Smith2011-06-14 14:08:10 -0500
commitadb57f335af4c1245db6245ab96e5ead4370df31 (patch)
treecb856e90ac5d9360a7d8031d01560a7ab358c03d /linkHints.js
parentd42f22ec417a508bbb665148333234a270af3cd9 (diff)
downloadvimium-adb57f335af4c1245db6245ab96e5ead4370df31.tar.bz2
Fix for issue #286 - GitHub logo doesn't get hinted
Diffstat (limited to 'linkHints.js')
-rw-r--r--linkHints.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/linkHints.js b/linkHints.js
index c8c743ea..9219fee6 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -128,7 +128,9 @@ var linkHints = {
// but floated elements. Check for this.
if (clientRect && (clientRect.width == 0 || clientRect.height == 0)) {
for (var j = 0, childrenCount = element.children.length; j < childrenCount; j++) {
- if (window.getComputedStyle(element.children[j], null).getPropertyValue('float') == 'none')
+ var computedStyle = window.getComputedStyle(element.children[j], null);
+ // Ignore child elements which are not floated and not absolutely positioned for parent elements with zero width/height
+ if (computedStyle.getPropertyValue('float') == 'none' && computedStyle.getPropertyValue('position') != 'absolute')
continue;
var childClientRect = element.children[j].getClientRects()[0];
if (!this.isVisible(element.children[j], childClientRect))