diff options
| author | Stephen Blott | 2016-04-10 11:21:34 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2016-04-12 06:36:03 +0100 | 
| commit | 81fa2852b9ebfd1a0a2abd8b5ea374ac9bc49ca8 (patch) | |
| tree | cc867be5ce477c91c480f9fd970e3e71cf22f7eb /lib/dom_utils.coffee | |
| parent | 598f6fa4ffa1348c096ad681a10bee28adde4a3e (diff) | |
| download | vimium-81fa2852b9ebfd1a0a2abd8b5ea374ac9bc49ca8.tar.bz2 | |
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.
Diffstat (limited to 'lib/dom_utils.coffee')
| -rw-r--r-- | lib/dom_utils.coffee | 4 | 
1 files changed, 2 insertions, 2 deletions
| 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 | 
