Don't check the application occlusion state (this is covered by the pages already), and let the page check visually idle. Remove layers of functions.
Created attachment 220358 [details] Fix
Comment on attachment 220358 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=220358&action=review > ../OpenSource/Source/WebKit2/UIProcess/WebPageProxy.cpp:520 > + return m_viewState & ViewState::IsVisuallyIdle && m_pageGroup->preferences()->pageVisibilityBasedProcessSuppressionEnabled(); Feels like this should have parens to indicate associativity. > ../OpenSource/Source/WebKit2/UIProcess/mac/WebContextMac.mm:391 > + for (const auto& context : WebContext::allContexts()) { Why does this loop use "const auto&" while the other uses "auto*"?
Comment on attachment 220358 [details] Fix Since allContexts() is a vector of WebContext*, and since the range-based for loops do not intend to modify the contents of the vector, I think they should both just say "auto" -- neither "auto*" nor "const auto&".
Comment on attachment 220358 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=220358&action=review r=me as well. >> ../OpenSource/Source/WebKit2/UIProcess/mac/WebContextMac.mm:391 >> + for (const auto& context : WebContext::allContexts()) { > > Why does this loop use "const auto&" while the other uses "auto*"? This should use auto*.
Committed revision 161301.