https://bugs.webkit.org/show_bug.cgi?id=220231
Source/WebCore:
<rdar://problem/72793724>
Reviewed by Zalan Bujtas.
When an <iframe> on a fractional pixel boundary, on a non-Retina display, with
composited contents had its visibility toggled from 'hidden' to 'visible' we could
fail to parent the iframe content compositing layers, resulting in missing iframe
content.
This happened when the iframe's GraphicsLayer had a m_contentsClippingLayer (which
acts as the parent for the content layers) due to the fractional pixel offset.
When GraphicsLayerCA::setContentsVisible(true) was called, it would fail to call
noteSublayersChanged() because the iframe host layer has no m_contentsLayer,
but we do need to rebuild sublayers in this case.
Test: compositing/iframes/content-visibility-with-clipping.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsVisible):
LayoutTests:
Reviewed by Zalan Bujtas.
* compositing/iframes/content-visibility-with-clipping-expected.html: Added.
* compositing/iframes/content-visibility-with-clipping.html: Added.
Canonical link: https://commits.webkit.org/232787@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271191 268f45cc-cd09-0410-ab3c-d52691b4dbfc