REGRESSION(r238090): Composited iframe contents disappear after switching tabs in...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2018 15:57:14 +0000 (15:57 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2018 15:57:14 +0000 (15:57 +0000)
commitb1fdaa3c52ba02d340dfe4120068070eafd24170
treedfe8a1b228ad9bda7ca99d067eedc5f3332e3d05
parent211d50158702c58b8d54028b17d12508e6dec889
REGRESSION(r238090): Composited iframe contents disappear after switching tabs in Safari
https://bugs.webkit.org/show_bug.cgi?id=191673
rdar://problem/46083440

Reviewed by Antti Koivisto.

Switching tabs in Safari triggers the "setIsInWindow" code path, that detaches the layer
tree for every Frame. They get re-attached on tab show, and for subframes this involves
the triggering of a fake style recalc in the parent document via scheduleInvalidateStyleAndLayerComposition().

The style diff that's sent to RenderLayerCompositor::layerStyleChanged() as a result of that
fake style recalc is RecompositeLayer, but the code was failing to trigger the necessary
layer configuration update that gets iframe layers parented.

This stop-gap patch triggers layer config updates on every RecompositeLayer diff. A future
patch will optimize this, and add a layout test.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerStyleChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp