Forking from w3c/csswg-drafts#7758 (comment). The algorithm here uses the result of getBoundingClientRect() as the element's box to intersect against. It should be the element's ink overflow rect instead so expansion from properties like box-shadow, filter is included in calculating the element's visibility.
@szager-chromium