Title: [238234] tags/Safari-607.1.14/Source/WebCore
Revision
238234
Author
alanc...@apple.com
Date
2018-11-15 10:26:00 -0800 (Thu, 15 Nov 2018)

Log Message

Cherry-pick r238229. rdar://problem/46083440

    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

Modified Paths

Diff

Modified: tags/Safari-607.1.14/Source/WebCore/ChangeLog (238233 => 238234)


--- tags/Safari-607.1.14/Source/WebCore/ChangeLog	2018-11-15 18:25:57 UTC (rev 238233)
+++ tags/Safari-607.1.14/Source/WebCore/ChangeLog	2018-11-15 18:26:00 UTC (rev 238234)
@@ -1,5 +1,54 @@
 2018-11-15  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r238229. rdar://problem/46083440
+
+    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
+
+    2018-11-15  Simon Fraser  <simon.fra...@apple.com>
+
+            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):
+
+2018-11-15  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r238170. rdar://problem/46083440
 
     Transform of composited layer not updated when layer also needs repaint

Modified: tags/Safari-607.1.14/Source/WebCore/rendering/RenderLayerCompositor.cpp (238233 => 238234)


--- tags/Safari-607.1.14/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-11-15 18:25:57 UTC (rev 238233)
+++ tags/Safari-607.1.14/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-11-15 18:26:00 UTC (rev 238234)
@@ -1387,6 +1387,11 @@
         }
     }
 
+    // FIXME: this is necessary to get iframe layers hooked up in response to scheduleInvalidateStyleAndLayerComposition(),
+    // but we should avoid triggering config updates on every recompositeLayer.
+    if (diff == StyleDifference::RecompositeLayer)
+        layer.setNeedsCompositingConfigurationUpdate();
+
     if (diff >= StyleDifference::RecompositeLayer && oldStyle) {
         if (oldStyle->transform() != newStyle.transform()) {
             // FIXME: transform changes really need to trigger layout. See RenderElement::adjustStyleDifference().
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to