[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

simon.fraser at apple.com simon.fraser at apple.com
Thu Apr 8 00:52:44 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 87a094d262070624f003311c18efa30ab259fae6
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 1 19:40:38 2010 +0000

    2010-01-01  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Scrollbar of overflow:scroll div in compositing layer fails to render
            https://bugs.webkit.org/show_bug.cgi?id=32439
    
            When deciding whether a RenderLayer needs backing store, check whether it has
            overflow controls that need painting.
    
            Test: compositing/overflow/scrollbar-painting.html
    
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::hasOverflowControls):
            * rendering/RenderLayer.h:
            * rendering/RenderLayerBacking.cpp:
            (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52686 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 095a686..d0dda9c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-01  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Scrollbar of overflow:scroll div in compositing layer fails to render
+        https://bugs.webkit.org/show_bug.cgi?id=32439
+
+        Test for compositing layers with scrollbars, and a resize control.
+        
+        * compositing/overflow/scrollbar-painting.html: Added.
+        * platform/mac/compositing/overflow/scrollbar-painting-expected.checksum: Added.
+        * platform/mac/compositing/overflow/scrollbar-painting-expected.png: Added.
+        * platform/mac/compositing/overflow/scrollbar-painting-expected.txt: Added.
+
 2009-12-31  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/LayoutTests/compositing/overflow/scrollbar-painting.html b/LayoutTests/compositing/overflow/scrollbar-painting.html
new file mode 100644
index 0000000..1b01ab7
--- /dev/null
+++ b/LayoutTests/compositing/overflow/scrollbar-painting.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <style>
+  .composited {
+    -webkit-transform: translateZ(0);
+  }
+  
+  .box {
+    margin: 10px;
+    width: 100px;
+    height: 100px;
+    z-index: 0;
+  }
+  .overflow {
+    position: relative;
+    overflow: scroll;
+  }
+
+  .content {
+    height: 500px;
+    width: 500px;
+    background-color: gray;
+  }
+
+  .resizable {
+    overflow: auto;
+    resize: both;
+  }
+  </style>
+  </head>
+<body>
+  <p>You should see scrollbars on the gray square, and a resizer control below it.</p>
+  <div class="overflow box">
+    <div class="content composited"></div>
+  </div>
+
+  <div class="resizable composited box">
+  </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.checksum b/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.checksum
new file mode 100644
index 0000000..696896f
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.checksum
@@ -0,0 +1 @@
+ecf7885e6182c8a8370a257dc7100051
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.png b/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.png
new file mode 100644
index 0000000..84ab001
Binary files /dev/null and b/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.txt b/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.txt
new file mode 100644
index 0000000..912e98b
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/overflow/scrollbar-painting-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x270
+  RenderBlock {HTML} at (0,0) size 800x270
+    RenderBody {BODY} at (8,16) size 784x244
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 476x18
+          text run at (0,0) width 476: "You should see scrollbars on the gray square, and a resizer control below it."
+layer at (18,50) size 100x100 clip at (18,50) size 85x85 scrollWidth 500 scrollHeight 500
+  RenderBlock (relative positioned) {DIV} at (10,34) size 100x100
+layer at (18,50) size 500x500 backgroundClip at (18,50) size 85x85 clip at (18,50) size 85x85 outlineClip at (18,50) size 85x85
+  RenderBlock {DIV} at (0,0) size 500x500 [bgcolor=#808080]
+layer at (18,160) size 100x100
+  RenderBlock {DIV} at (10,144) size 100x100
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bd1bf2b..1b4c978 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-01  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Scrollbar of overflow:scroll div in compositing layer fails to render
+        https://bugs.webkit.org/show_bug.cgi?id=32439
+        
+        When deciding whether a RenderLayer needs backing store, check whether it has
+        overflow controls that need painting.
+
+        Test: compositing/overflow/scrollbar-painting.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::hasOverflowControls):
+        * rendering/RenderLayer.h:
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+
 2009-12-31  Christian Dywan  <christian at twotoasts.de>
 
         Reviewed by Gustavo Noronha Silva.
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 922a90a..0d1eacf 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -1701,6 +1701,11 @@ IntSize RenderLayer::offsetFromResizeCorner(const IntPoint& absolutePoint) const
     return localPoint - bottomRight;
 }
 
+bool RenderLayer::hasOverflowControls() const
+{
+    return m_hBar || m_vBar || m_scrollCorner || renderer()->style()->resize() != RESIZE_NONE;
+}
+
 void RenderLayer::positionOverflowControls(int tx, int ty)
 {
     if (!m_hBar && !m_vBar && (!renderer()->hasOverflowClip() || renderer()->style()->resize() == RESIZE_NONE))
diff --git a/WebCore/rendering/RenderLayer.h b/WebCore/rendering/RenderLayer.h
index af64fc4..f15c7cf 100644
--- a/WebCore/rendering/RenderLayer.h
+++ b/WebCore/rendering/RenderLayer.h
@@ -262,6 +262,7 @@ public:
     int verticalScrollbarWidth() const;
     int horizontalScrollbarHeight() const;
 
+    bool hasOverflowControls() const;
     void positionOverflowControls(int tx, int ty);
     bool isPointInResizeControl(const IntPoint& absolutePoint) const;
     bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint);
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index dcf129e..f022d67 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -566,6 +566,10 @@ bool RenderLayerBacking::isSimpleContainerCompositingLayer() const
     if (hasBoxDecorations(style))
         return false;
 
+    // If we have scrollbars or a resizer, need backing store to paint them into.
+    if (m_owningLayer->hasOverflowControls())
+        return false;
+    
     // If we have got this far and the renderer has no children, then we're ok.
     if (!renderObject->firstChild())
         return true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list