This change updates the TextSourceRange and TextSourceElement APIs to remove anything that is unused, simplify the constructors, and fix an issue related to returning stale rects.
The fixed issue would occur when scanning an element which creates an imposter (such as a textarea) and then the window is resized, which triggers a repositioning of the popup. When this repositioning occurred, it would cause the getRect/getRects function to be called, which is selecting a range which is no longer connected to the document, so the popup position would be incorrect.
This change updates the
TextSourceRange
andTextSourceElement
APIs to remove anything that is unused, simplify the constructors, and fix an issue related to returning stale rects.The fixed issue would occur when scanning an element which creates an imposter (such as a textarea) and then the window is resized, which triggers a repositioning of the popup. When this repositioning occurred, it would cause the
getRect/getRects
function to be called, which is selecting a range which is no longer connected to the document, so the popup position would be incorrect.