[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

simon.fraser at apple.com simon.fraser at apple.com
Fri Feb 26 22:21:42 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 3a21c56b5a9a943d7c6522cfc49f431e6ce79013
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 17 00:50:31 2010 +0000

    2010-02-16  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dan Bernstein.
    
            https://bugs.webkit.org/show_bug.cgi?id=34999
            Compositing layers inside overflow:scroll divs are not always updated on scrolling
    
            When RenderLayer::scrollToOffset() updates compositing layer positions, it needs
            to start updating at its stacking context rather than just its compositing ancestor.
            The stacking context is guaranteed to contain all descendants of the overflow
            layer, including those that are not direct descendants of the overflow layer in stacking
            (and therefore compositing) order.
    
            Test: compositing/overflow/scroll-ancestor-update.html
    
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::scrollToOffset):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54848 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a7090ff..1eca199 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-16  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=34999
+        Compositing layers inside overflow:scroll divs are not always updated on scrolling
+        
+        New testcase with specific compositing configuration involving overflow:scroll.
+
+        * compositing/overflow/scroll-ancestor-update.html: Added.
+        * platform/mac/compositing/overflow/scroll-ancestor-update-expected.checksum: Added.
+        * platform/mac/compositing/overflow/scroll-ancestor-update-expected.png: Added.
+        * platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt: Added.
+
 2010-02-16  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Rubber-stamped by Dirk Schulze.
diff --git a/LayoutTests/compositing/overflow/scroll-ancestor-update.html b/LayoutTests/compositing/overflow/scroll-ancestor-update.html
new file mode 100644
index 0000000..53c66ba
--- /dev/null
+++ b/LayoutTests/compositing/overflow/scroll-ancestor-update.html
@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css" media="screen">
+        
+        body {
+            margin: 0;
+        }
+
+        video {
+            width: 100px;
+            height: 100px;
+        }
+        
+        .container {
+            position: absolute;
+            top: 50px;
+            left: 50px;
+            height: 200px;
+            width: 200px;
+        }
+        
+        #scroller {
+            overflow-y: scroll;
+            height: 200px;
+            width: 200px;
+            border: 1px solid black;
+        }
+        
+        .content {
+            height: 500px;
+        }
+        
+        .box {
+            height: 100px;
+            width: 100px;
+        }
+
+        .tester {
+            position: relative;
+            margin-top: 50px;
+            background-color: green;
+        }
+        
+        .indicator {
+            position: absolute;
+            left: 50px;
+            top: 50px;
+            background-color: red;
+        }
+    </style>
+    <script type="text/javascript" charset="utf-8">
+        if (window.layoutTestController)
+          layoutTestController.waitUntilDone();
+        
+        function scrollTestDiv()
+        {
+            var scroller = document.getElementById('scroller');
+            scroller.scrollTop = 50;
+        }
+    </script>
+</head>
+<body>
+  
+  <div class="indicator box"></div>
+
+  <div class="container">
+    <div id="scroller">
+        <div class="content">
+            <div class="tester box"></div>
+        </div>
+    </div>
+    <p>The green box should obscure the red box, and move when you drag the scrollbar.</p>
+  </div>
+  
+  <video src="../resources/video.mp4"></video>
+
+  <script type="text/javascript" charset="utf-8">
+    var video = document.getElementsByTagName('video')[0];
+    video.addEventListener('canplaythrough', function() {
+      scrollTestDiv();
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }, false);
+  </script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.checksum b/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.checksum
new file mode 100644
index 0000000..e9825a5
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.checksum
@@ -0,0 +1 @@
+99817e6b94df43d51c81356c09f5874f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.png b/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.png
new file mode 100644
index 0000000..06c2318
Binary files /dev/null and b/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt b/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt
new file mode 100644
index 0000000..e4082cc
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x104
+  RenderBlock {HTML} at (0,0) size 800x104
+    RenderBody {BODY} at (0,0) size 800x104
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
+layer at (0,0) size 100x100
+  RenderVideo {VIDEO} at (0,0) size 100x100
+layer at (50,50) size 100x100
+  RenderBlock (positioned) {DIV} at (50,50) size 100x100 [bgcolor=#FF0000]
+layer at (50,50) size 202x272
+  RenderBlock (positioned) {DIV} at (50,50) size 200x200
+    RenderBlock {P} at (0,218) size 200x54
+      RenderText {#text} at (0,0) size 191x54
+        text run at (0,0) width 191: "The green box should obscure"
+        text run at (0,18) width 180: "the red box, and move when"
+        text run at (0,36) width 141: "you drag the scrollbar."
+layer at (50,50) size 202x202 clip at (51,51) size 185x200 scrollY 50 scrollHeight 550
+  RenderBlock {DIV} at (0,0) size 202x202 [border: (1px solid #000000)]
+    RenderBlock {DIV} at (1,51) size 185x500
+layer at (51,51) size 100x100
+  RenderBlock (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 88ead79..8f6b450 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-02-16  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=34999
+        Compositing layers inside overflow:scroll divs are not always updated on scrolling
+        
+        When RenderLayer::scrollToOffset() updates compositing layer positions, it needs
+        to start updating at its stacking context rather than just its compositing ancestor.
+        The stacking context is guaranteed to contain all descendants of the overflow
+        layer, including those that are not direct descendants of the overflow layer in stacking
+        (and therefore compositing) order.
+
+        Test: compositing/overflow/scroll-ancestor-update.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollToOffset):
+
 2010-02-16  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 5833f31..ff07792 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -1217,7 +1217,9 @@ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repai
 
 #if USE(ACCELERATED_COMPOSITING)
     if (compositor()->inCompositingMode()) {
-        if (RenderLayer* compositingAncestor = ancestorCompositingLayer()) {
+        // Our stacking context is guaranteed to contain all of our descendants that may need
+        // repositioning, so update compositing layers from there.
+        if (RenderLayer* compositingAncestor = stackingContext()->enclosingCompositingLayer()) {
             bool isUpdateRoot = true;
             compositingAncestor->backing()->updateAfterLayout(RenderLayerBacking::AllDescendants, isUpdateRoot);
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list