Title: [173344] trunk/Source/WebCore
Revision
173344
Author
timothy_hor...@apple.com
Date
2014-09-05 17:14:15 -0700 (Fri, 05 Sep 2014)

Log Message

Doing a navigation on a non-opaque WKWebView can result in an empty layer tree
https://bugs.webkit.org/show_bug.cgi?id=136590
<rdar://problem/18234000>

Reviewed by Simon Fraser.

* page/FrameView.cpp:
(WebCore::FrameView::setTransparent):
Avoid scheduling a compositing layer update if the RenderView isn't the
one associated with this FrameView. This can happen during a navigation,
before the new Document (and RenderView) is swapped in. This is particularly
bad in the case of setTransparent because it is called from Frame::createView,
which is right in the middle of that transition window. If we let the compositing
layer update go ahead, it can end up detaching the new Document's layer tree,
and we have no mechanism that would cause it to reattach.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173343 => 173344)


--- trunk/Source/WebCore/ChangeLog	2014-09-06 00:06:52 UTC (rev 173343)
+++ trunk/Source/WebCore/ChangeLog	2014-09-06 00:14:15 UTC (rev 173344)
@@ -1,3 +1,21 @@
+2014-09-05  Tim Horton  <timothy_hor...@apple.com>
+
+        Doing a navigation on a non-opaque WKWebView can result in an empty layer tree
+        https://bugs.webkit.org/show_bug.cgi?id=136590
+        <rdar://problem/18234000>
+
+        Reviewed by Simon Fraser.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::setTransparent):
+        Avoid scheduling a compositing layer update if the RenderView isn't the
+        one associated with this FrameView. This can happen during a navigation,
+        before the new Document (and RenderView) is swapped in. This is particularly
+        bad in the case of setTransparent because it is called from Frame::createView,
+        which is right in the middle of that transition window. If we let the compositing
+        layer update go ahead, it can end up detaching the new Document's layer tree,
+        and we have no mechanism that would cause it to reattach.
+
 2014-09-05  Enrica Casucci  <enr...@apple.com>
 
         Remove PLATFORM(IOS) from WebCore/editing (Part 3).

Modified: trunk/Source/WebCore/page/FrameView.cpp (173343 => 173344)


--- trunk/Source/WebCore/page/FrameView.cpp	2014-09-06 00:06:52 UTC (rev 173343)
+++ trunk/Source/WebCore/page/FrameView.cpp	2014-09-06 00:14:15 UTC (rev 173344)
@@ -2582,6 +2582,13 @@
     if (!renderView)
         return;
 
+    // setTransparent can be called in the window between FrameView initialization
+    // and switching in the new Document; this means that the RenderView that we
+    // retrieve is actually attached to the previous Document, which is going away,
+    // and must not update compositing layers.
+    if (&renderView->frameView() != this)
+        return;
+
     RenderLayerCompositor& compositor = renderView->compositor();
     compositor.setCompositingLayersNeedRebuild();
     compositor.scheduleCompositingLayerUpdate();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to