This was suggested by lfg@ in https://crbug.com/638375#c30 :
"We could try to fully decouple widget visibility and page visibility. They should be different concepts, and we will need to address this during the WebView/WebWidget split. Basically, we want WebFrameWidgetImpl::SetVisibilityState and WebViewFrameWidget::SetVisibilityState to do the same thing (hide the LayerTreeView). I don't fully remember why this wasn't possible when I initially implemented visibility events for OOPIFs, but that was in 2016, a lot has changed since then."
Currently, WebViewFrameWidget::SetVisibilityState updates visibility on Page, LayerTreeView, and PageScheduler, but WebFrameWidgetImpl::SetVisibilityState only updates visibility on LayerTreeView. This confusion has contributed to visibility issues like issue 638375 .
Comment 1 by alex...@chromium.org
, Mar 16 2018