you might cache `element.getOffsetParent()` - it's not an inexpensive operation.