[iOS WK2] Compositing layers in iframes are misplaced
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 03:49:08 +0000 (03:49 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 03:49:08 +0000 (03:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132554
<rdar://problem/16203027>

Reviewed by Benjamin Poulain.

Have requiresScrollLayer() only consider frameView.delegatesScrolling()
for the main frame, so that iframes get scroll layers (even though they
will never scroll), so that the rest of geometry code works as on other
platforms.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168253 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp

index 7ef0d07..a14a57e 100644 (file)
@@ -1,3 +1,19 @@
+2014-05-04  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] Compositing layers in iframes are misplaced
+        https://bugs.webkit.org/show_bug.cgi?id=132554
+        <rdar://problem/16203027>
+
+        Reviewed by Benjamin Poulain.
+
+        Have requiresScrollLayer() only consider frameView.delegatesScrolling()
+        for the main frame, so that iframes get scroll layers (even though they
+        will never scroll), so that the rest of geometry code works as on other
+        platforms.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresScrollLayer):
+
 2014-05-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Use std::unique_ptr in m_taskTimer of Notification class
index b3d5a5f..4160472 100644 (file)
@@ -2661,8 +2661,10 @@ bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer& lay
 
 bool RenderLayerCompositor::requiresScrollLayer(RootLayerAttachment attachment) const
 {
+    FrameView& frameView = m_renderView.frameView();
+
     // This applies when the application UI handles scrolling, in which case RenderLayerCompositor doesn't need to manage it.
-    if (m_renderView.frameView().delegatesScrolling())
+    if (frameView.delegatesScrolling() && frameView.frame().isMainFrame())
         return false;
 
     // We need to handle our own scrolling if we're: