diff options
| author | mrmr1993 | 2015-04-28 03:51:55 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2015-04-28 03:51:55 +0100 | 
| commit | 1b1e12df7157510bc375ad97fb65e2582fb7be4c (patch) | |
| tree | 6ec76a550a620229ca2ddcf58dd5e359653519de /lib/dom_utils.coffee | |
| parent | 5f5c12104d4be07d1301a70cfdc606e1fd73c167 (diff) | |
| download | vimium-1b1e12df7157510bc375ad97fb65e2582fb7be4c.tar.bz2 | |
Remove redundant test
Elements with css `display: none;` never have client rects.
Diffstat (limited to 'lib/dom_utils.coffee')
| -rw-r--r-- | lib/dom_utils.coffee | 4 | 
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index efb125f6..e0ab09e2 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -80,9 +80,7 @@ DomUtils =          # eliminate invisible elements (see test_harnesses/visibility_test.html)          computedStyle = window.getComputedStyle(element, null) -        if (computedStyle.getPropertyValue('visibility') != 'visible' || -            computedStyle.getPropertyValue('display') == 'none') -          continue +        continue if computedStyle.getPropertyValue('visibility') != 'visible'          return clientRect  | 
