From 81fa2852b9ebfd1a0a2abd8b5ea374ac9bc49ca8 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 10 Apr 2016 11:21:34 +0100 Subject: Make rects absolute in window earlier. This is part of an effort (as yet incomplete) to track down some CSP violations we're getting, in this case related to global link hints. Prior to this, we were seeing CSP violations when accessing the window subsequently to collecting the hints, specifically when accessing window.scrollX/Y. Here, we collect the window position immediately, when initially harvesting the hints. --- lib/dom_utils.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index a57cbedb..3d719337 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -265,8 +265,8 @@ DomUtils = flashEl = @createElement "div" flashEl.id = "vimiumFlash" flashEl.className = "vimiumReset" - flashEl.style.left = rect.left + window.scrollX + "px" - flashEl.style.top = rect.top + window.scrollY + "px" + flashEl.style.left = rect.left + "px" + flashEl.style.top = rect.top + "px" flashEl.style.width = rect.width + "px" flashEl.style.height = rect.height + "px" document.documentElement.appendChild flashEl -- cgit v1.2.3