Make submenu properly size itself to fill available room and improve overlay positioning when pinch zoomed (#5660)
* progress on adding 2d flipping
* calculate max height of overlays using the overlay bottom instead of the trigger top
in the submenu case, the offset of the menu means we need to calculate the max height with respect to the overlay bottom not the trigger itself. Use overlay size instead of position so that we dont run into complexities with if we are receiving "bottom" or "top" as overlay coords
* fix some tests
* fix more tests
needed to refine the getDelta logic so that the popover position would be properly adjusted when top/bottom were outside the boundary and maxHeight wouldnt be adjusted to prevent that
* todo: question about what the actual behavior should be
* bounding the max height by the height of the boundary
* getting rid of flip and fixed edge flip code
mimic MacOS in how the submenus will simply be pushed up/down if they would exceed the boundary
* update left bottom postion tests
maxheight for leftbottom is calculated to the top of the boundary
* fixing remaining test
* some cleanup of old logic
* missed some last cleanup
* Fix overlay positioning when the boundary has been scrolled
* fix max height calc and Safari overlay positioning when already pinch zoomed in
* accidentally deleted too much
* forgot a set of parens ugh
* fix examples where triggers are placed at the bottom of the page and are scrolled into view
* this works, but why...
* fix logic
* update copy
---------
Co-authored-by: Kyle Taborski <ktabors@yahoo.com>
Co-authored-by: Robert Snow <rsnow@adobe.com>