aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dom_utils.coffee
diff options
context:
space:
mode:
authormrmr19932014-12-18 13:25:21 +0000
committermrmr19932014-12-18 13:25:21 +0000
commit845fd65e1c1a52329352f5068e3c7f0ef7b26154 (patch)
treec2cb8ff2a27a0cb6dbe7b5ce87d495326569f698 /lib/dom_utils.coffee
parentef863e5748c088f80ec9a0ffcaa06201c42e6c98 (diff)
downloadvimium-845fd65e1c1a52329352f5068e3c7f0ef7b26154.tar.bz2
Use Rect.copy instead of literal member by member copy of a rect
Diffstat (limited to 'lib/dom_utils.coffee')
-rw-r--r--lib/dom_utils.coffee5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index df1db3b9..7fd126b8 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -46,10 +46,7 @@ DomUtils =
#
getVisibleClientRect: (element) ->
# Note: this call will be expensive if we modify the DOM in between calls.
- clientRects = ({
- top: clientRect.top, right: clientRect.right, bottom: clientRect.bottom, left: clientRect.left,
- width: clientRect.width, height: clientRect.height
- } for clientRect in element.getClientRects())
+ clientRects = (Rect.copy clientRect for clientRect in element.getClientRects())
for clientRect in clientRects
# If the link has zero dimensions, it may be wrapping visible