Word description Calculates the position of a popup with a heuristic:
•
The new rectangle must fit inside screen-dim
•
The new rectangle must not obscure visible-rect
•
The child must otherwise be as close as possible to the edges of visible-rect
For example, when displaying a menu, visible-rect is a single point at the mouse location, and when displaying a completion popup, visible-rect contains the bounds of the text element being completed.