This is a problem surfaced by the following bug: http://code.google.com/p/chromium/issues/detail?id=119812 WebViewImpl::setVisibilityState() only updates the visibility state in the compositor if it's in accelerated compositing mode. However, if a page falls out of compositing mode while it's hidden (e.g. a html5 video stops playing while the tab is not visible) then switching back to the tab never notifies the compositor that it has become visible again.
Created attachment 134189 [details] Patch
Vangelis, do you know any way to confirm whether this patch fixes that bug? This is a blind fix (didn't even compile check) but seems like the behavior we want.
Comment on attachment 134189 [details] Patch (unofficial) R+ . This will do the trick.
Comment on attachment 134189 [details] Patch Mmm I like this! We should do this regardless. Which draws my attention to another thing: if we create a layer tree view in !visible, we get the visibility wrong too, e.g. setIsAcceleratedCompositingActive. Can we fold a fix into there too?
Comment on attachment 134189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134189&action=review > Source/WebKit/chromium/src/WebViewImpl.cpp:3459 > + if (!visible && isAcceleratedCompositingActive()) This feels like a wart incidentally. I never knew this was here until just now. :(
Comment on attachment 134189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134189&action=review > Source/WebKit/chromium/src/WebViewImpl.cpp:3460 > - if (!visible) > - m_nonCompositedContentHost->protectVisibleTileTextures(); > m_layerTreeView.setVisible(visible); > + if (!visible && isAcceleratedCompositingActive()) > + m_nonCompositedContentHost->protectVisibleTileTextures(); Er, why is the call to protectVisibleTileTextures reordered? Don't we need to protect before setVisible which may drop tiles?
(In reply to comment #6) > (From update of attachment 134189 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=134189&action=review > > > Source/WebKit/chromium/src/WebViewImpl.cpp:3460 > > - if (!visible) > > - m_nonCompositedContentHost->protectVisibleTileTextures(); > > m_layerTreeView.setVisible(visible); > > + if (!visible && isAcceleratedCompositingActive()) > > + m_nonCompositedContentHost->protectVisibleTileTextures(); > > Er, why is the call to protectVisibleTileTextures reordered? Don't we need to protect before setVisible which may drop tiles? Whoops, I did not mean to change that order. Will fix.
Created attachment 134212 [details] Patch
Comment on attachment 134212 [details] Patch R=me.
Comment on attachment 134212 [details] Patch Clearing flags on attachment: 134212 Committed r112417: <http://trac.webkit.org/changeset/112417>
All reviewed patches have been landed. Closing bug.