From 1b1e12df7157510bc375ad97fb65e2582fb7be4c Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Tue, 28 Apr 2015 03:51:55 +0100 Subject: Remove redundant test Elements with css `display: none;` never have client rects. --- lib/dom_utils.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3