replacing element.getBoundingClientRect with a custom position traversal

https://developer.mozilla.org/en-US/docs/Web/API/element.getBoundingClientRect was
yielding different results in chrome (Version 37.0.2062.120) and firefox (33.0).