Scrollbars misplaced with accelerated compositing for overflow scroll
authorallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 17:29:30 +0000 (17:29 +0000)
committerallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 17:29:30 +0000 (17:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108625

Reviewed by Simon Fraser.

Source/WebCore:

Scrollbars require their own layer if overflow scroll is composited,
otherwise the scrollbars would be rendered on the content layer and
not fixed to the viewport.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer):
(WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer):
(WebCore::RenderLayerBacking::requiresScrollCornerLayer):

LayoutTests:

Update the results for the one test that explicitly set accelerated compositing for overflow scroll,
and used to have bad results for non-chromium. The new baselines are almost identical to chomium baseline.

* platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
* platform/qt/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:

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

LayoutTests/ChangeLog
LayoutTests/platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt
LayoutTests/platform/qt/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp

index a70d407..134dc38 100644 (file)
@@ -1,3 +1,16 @@
+2013-02-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
+
+        Scrollbars misplaced with accelerated compositing for overflow scroll
+        https://bugs.webkit.org/show_bug.cgi?id=108625
+
+        Reviewed by Simon Fraser.
+
+        Update the results for the one test that explicitly set accelerated compositing for overflow scroll,
+        and used to have bad results for non-chromium. The new baselines are almost identical to chomium baseline.
+
+        * platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
+        * platform/qt/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
+
 2013-02-07  Ádám Kallai  <kadam@inf.u-szeged.hu>
 
         [Qt] Unreviewed gardening. Added platform specific expected files after r140693.
index f04211a..7b95078 100644 (file)
@@ -9,7 +9,7 @@
           (position 28.00 20.00)
           (bounds 202.00 202.00)
           (drawsContent 1)
-          (children 1
+          (children 4
             (GraphicsLayer
               (position 1.00 1.00)
               (bounds 200.00 200.00)
                 )
               )
             )
+            (GraphicsLayer
+              (position 1.00 186.00)
+              (bounds 185.00 15.00)
+              (drawsContent 1)
+            )
+            (GraphicsLayer
+              (position 186.00 1.00)
+              (bounds 15.00 185.00)
+              (drawsContent 1)
+            )
+            (GraphicsLayer
+              (position 186.00 186.00)
+              (bounds 15.00 15.00)
+              (drawsContent 1)
+            )
           )
         )
       )
index f04211a..7b95078 100644 (file)
@@ -9,7 +9,7 @@
           (position 28.00 20.00)
           (bounds 202.00 202.00)
           (drawsContent 1)
-          (children 1
+          (children 4
             (GraphicsLayer
               (position 1.00 1.00)
               (bounds 200.00 200.00)
                 )
               )
             )
+            (GraphicsLayer
+              (position 1.00 186.00)
+              (bounds 185.00 15.00)
+              (drawsContent 1)
+            )
+            (GraphicsLayer
+              (position 186.00 1.00)
+              (bounds 15.00 185.00)
+              (drawsContent 1)
+            )
+            (GraphicsLayer
+              (position 186.00 186.00)
+              (bounds 15.00 15.00)
+              (drawsContent 1)
+            )
           )
         )
       )
index a1cf5af..a33d95a 100644 (file)
@@ -1,3 +1,19 @@
+2013-02-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
+
+        Scrollbars misplaced with accelerated compositing for overflow scroll
+        https://bugs.webkit.org/show_bug.cgi?id=108625
+
+        Reviewed by Simon Fraser.
+
+        Scrollbars require their own layer if overflow scroll is composited,
+        otherwise the scrollbars would be rendered on the content layer and
+        not fixed to the viewport.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer):
+        (WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer):
+        (WebCore::RenderLayerBacking::requiresScrollCornerLayer):
+
 2013-02-07  Mike West  <mkwst@chromium.org>
 
         Don't ASSERT things about uninitialized variables.
index de4f4a5..7a1260c 100644 (file)
@@ -972,7 +972,7 @@ void RenderLayerBacking::setBackgroundLayerPaintsFixedRootBackground(bool backgr
 bool RenderLayerBacking::requiresHorizontalScrollbarLayer() const
 {
 #if !PLATFORM(CHROMIUM)
-    if (!m_owningLayer->hasOverlayScrollbars())
+    if (!m_owningLayer->hasOverlayScrollbars() && !m_owningLayer->needsCompositedScrolling())
         return false;
 #endif
     return m_owningLayer->horizontalScrollbar();
@@ -981,7 +981,7 @@ bool RenderLayerBacking::requiresHorizontalScrollbarLayer() const
 bool RenderLayerBacking::requiresVerticalScrollbarLayer() const
 {
 #if !PLATFORM(CHROMIUM)
-    if (!m_owningLayer->hasOverlayScrollbars())
+    if (!m_owningLayer->hasOverlayScrollbars() && !m_owningLayer->needsCompositedScrolling())
         return false;
 #endif
     return m_owningLayer->verticalScrollbar();
@@ -990,7 +990,7 @@ bool RenderLayerBacking::requiresVerticalScrollbarLayer() const
 bool RenderLayerBacking::requiresScrollCornerLayer() const
 {
 #if !PLATFORM(CHROMIUM)
-    if (!m_owningLayer->hasOverlayScrollbars())
+    if (!m_owningLayer->hasOverlayScrollbars() && !m_owningLayer->needsCompositedScrolling())
         return false;
 #endif
     return !m_owningLayer->scrollCornerAndResizerRect().isEmpty();