Created attachment 405340 [details] Test Load the attached test on an iPhone. Note how the green element fits the visible size of the view (as noted here: https://allthingssmitty.com/2020/05/11/css-fix-for-100vh-in-mobile-webkit/). Now rotate to landscape. It's still the same height, so too tall. Now reload, and it's still a bit taller than the visible area (MobileSafari provides a height that is a "bar hidden" height). Now rotate back to portrait. The green box is still the landscape size.
With height: -webkit-fill-available we end up in RenderView::availableLogicalHeight() which just uses frameView().visibleHeight(), but this seems to be wrong or stale after rotation.
It's stale on rotation because WebPage::dynamicViewportSizeUpdate() does two layouts; the first uses the old visibleRect() (which comes out of ScrollView::m_delegatedScrollingGeometry->unobscuredContentSize), then we update unobscuredContentSize and do another layout, but we don't seem to have dirtied the -webkit-fill-available for layout.
<rdar://problem/66506365>