Title: [171306] trunk/Source/WebCore
Revision
171306
Author
[email protected]
Date
2014-07-21 11:26:43 -0700 (Mon, 21 Jul 2014)

Log Message

[iOS WK1] Single touch div scrolling doesn't work in framesets (breaks Word previews)
https://bugs.webkit.org/show_bug.cgi?id=135103
<rdar://problem/11830219>

Reviewed by Darin Adler.

After r166117 all layer flushing starts on the root frame; we no longer flush layers
for each frame during painting. However, flushing GraphicsLayers can set some state
on a subframe RenderLayerCompositor that is now never processed, which breaks scroll
layer registration.

Fix by doing a walk of the Frame tree, and calling didFlushLayers() on subframe RenderLayerCompositors
before calling didFlushLayers() on self.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::didFlushLayers):
(WebCore::RenderLayerCompositor::notifySubframesAfterLayerFlush):
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers): Drive-by nullptr.
* rendering/RenderLayerCompositor.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171305 => 171306)


--- trunk/Source/WebCore/ChangeLog	2014-07-21 17:44:26 UTC (rev 171305)
+++ trunk/Source/WebCore/ChangeLog	2014-07-21 18:26:43 UTC (rev 171306)
@@ -1,3 +1,26 @@
+2014-07-20  Simon Fraser  <[email protected]>
+
+        [iOS WK1] Single touch div scrolling doesn't work in framesets (breaks Word previews)
+        https://bugs.webkit.org/show_bug.cgi?id=135103
+        <rdar://problem/11830219>
+
+        Reviewed by Darin Adler.
+
+        After r166117 all layer flushing starts on the root frame; we no longer flush layers
+        for each frame during painting. However, flushing GraphicsLayers can set some state
+        on a subframe RenderLayerCompositor that is now never processed, which breaks scroll
+        layer registration.
+        
+        Fix by doing a walk of the Frame tree, and calling didFlushLayers() on subframe RenderLayerCompositors
+        before calling didFlushLayers() on self.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+        (WebCore::RenderLayerCompositor::didFlushLayers):
+        (WebCore::RenderLayerCompositor::notifySubframesAfterLayerFlush):
+        (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers): Drive-by nullptr.
+        * rendering/RenderLayerCompositor.h:
+
 2014-07-21  Eric Carlson  <[email protected]>
 
         [iOS] a Paused media session is not active

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (171305 => 171306)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2014-07-21 17:44:26 UTC (rev 171305)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2014-07-21 18:26:43 UTC (rev 171306)
@@ -470,19 +470,41 @@
     ASSERT(m_flushingLayers);
     m_flushingLayers = false;
 
+    updateScrollCoordinatedLayersAfterFlushIncludingSubframes();
+
 #if PLATFORM(IOS)
-    updateCustomLayersAfterFlush();
-
     ChromeClient* client = this->chromeClient();
     if (client && isFlushRoot)
         client->didFlushCompositingLayers();
 #endif
 
+    startLayerFlushTimerIfNeeded();
+}
+
+void RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlushIncludingSubframes()
+{
+    updateScrollCoordinatedLayersAfterFlush();
+
+    Frame& frame = m_renderView.frameView().frame();
+    for (Frame* subframe = frame.tree().firstChild(); subframe; subframe = subframe->tree().traverseNext(&frame)) {
+        RenderView* view = subframe->contentRenderer();
+        if (!view)
+            continue;
+
+        view->compositor().updateScrollCoordinatedLayersAfterFlush();
+    }
+}
+
+void RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush()
+{
+#if PLATFORM(IOS)
+    updateCustomLayersAfterFlush();
+#endif
+
     for (auto it = m_scrollCoordinatedLayersNeedingUpdate.begin(), end = m_scrollCoordinatedLayersNeedingUpdate.end(); it != end; ++it)
         updateScrollCoordinatedStatus(**it);
 
     m_scrollCoordinatedLayersNeedingUpdate.clear();
-    startLayerFlushTimerIfNeeded();
 }
 
 #if PLATFORM(IOS)
@@ -600,7 +622,7 @@
 RenderLayerCompositor* RenderLayerCompositor::enclosingCompositorFlushingLayers() const
 {
     for (Frame* frame = &m_renderView.frameView().frame(); frame; frame = frame->tree().parent()) {
-        RenderLayerCompositor* compositor = frame->contentRenderer() ? &frame->contentRenderer()->compositor() : 0;
+        RenderLayerCompositor* compositor = frame->contentRenderer() ? &frame->contentRenderer()->compositor() : nullptr;
         if (compositor->isFlushingLayers())
             return compositor;
     }

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (171305 => 171306)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2014-07-21 17:44:26 UTC (rev 171305)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2014-07-21 18:26:43 UTC (rev 171306)
@@ -381,6 +381,8 @@
     void notifyIFramesOfCompositingChange();
 
     bool isFlushingLayers() const { return m_flushingLayers; }
+    void updateScrollCoordinatedLayersAfterFlushIncludingSubframes();
+    void updateScrollCoordinatedLayersAfterFlush();
     
     Page* page() const;
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to