Title: [96069] trunk
Revision
96069
Author
simon.fra...@apple.com
Date
2011-09-26 22:12:24 -0700 (Mon, 26 Sep 2011)

Log Message

Translucent scrollbars on composited layers render incorrectly
https://bugs.webkit.org/show_bug.cgi?id=58515

Source/WebCore:

Reviewed by Sam Weinig.

Scrollbars in composited elements were getting drawn twice,
because r41203 moved the call to paintOverflowControls() out of
RenderLayer::paintLayer(), but forgot to change RenderLayerBacking::paintIntoLayer().

Test: compositing/scrollbar-painting.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):

LayoutTests:

Reviewed by Sam Weinig.

Pixel test with translucent scrollbars, to test whether they get
rendered twice.

* compositing/scrollbar-painting-expected.png: Added.
* compositing/scrollbar-painting-expected.txt: Added.
* compositing/scrollbar-painting.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (96068 => 96069)


--- trunk/LayoutTests/ChangeLog	2011-09-27 03:24:03 UTC (rev 96068)
+++ trunk/LayoutTests/ChangeLog	2011-09-27 05:12:24 UTC (rev 96069)
@@ -1,3 +1,17 @@
+2011-09-09  Simon Fraser  <simon.fra...@apple.com>
+
+        Translucent scrollbars on composited layers render incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=58515
+
+        Reviewed by Sam Weinig.
+        
+        Pixel test with translucent scrollbars, to test whether they get
+        rendered twice.
+
+        * compositing/scrollbar-painting-expected.png: Added.
+        * compositing/scrollbar-painting-expected.txt: Added.
+        * compositing/scrollbar-painting.html: Added.
+
 2011-09-26  Mihai Parparita  <mih...@chromium.org>
 
         Put back all Chromium platform failing expectations for some tests (they

Added: trunk/LayoutTests/compositing/scrollbar-painting-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/compositing/scrollbar-painting-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/compositing/scrollbar-painting-expected.txt (0 => 96069)


--- trunk/LayoutTests/compositing/scrollbar-painting-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrollbar-painting-expected.txt	2011-09-27 05:12:24 UTC (rev 96069)
@@ -0,0 +1 @@
+

Added: trunk/LayoutTests/compositing/scrollbar-painting.html (0 => 96069)


--- trunk/LayoutTests/compositing/scrollbar-painting.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrollbar-painting.html	2011-09-27 05:12:24 UTC (rev 96069)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<style>
+.composited {
+  -webkit-transform: translateZ(0);
+}
+
+.container {
+  width:100px;
+  height:100px;
+  overflow:scroll;
+  resize:both;
+  position:absolute;
+}
+
+.container::-webkit-scrollbar {
+  background-color: rgba(0, 127, 0, 0.5);
+}
+
+.container::-webkit-resizer {
+  background-color: rgba(0, 127, 0, 0.5);
+}
+
+.contents {
+  background-color: rgba(0, 127, 0, 0.5);
+  height: 100%;
+  width: 100%;
+}
+</style>
+<script>
+  if (window.layoutTestController)
+    layoutTestController.dumpAsText(true);
+</script>
+<!-- You should see a single 50% transparent green square -->
+<div id="container" class="container composited">
+  <div class="contents"></div>
+</div>

Modified: trunk/Source/WebCore/ChangeLog (96068 => 96069)


--- trunk/Source/WebCore/ChangeLog	2011-09-27 03:24:03 UTC (rev 96068)
+++ trunk/Source/WebCore/ChangeLog	2011-09-27 05:12:24 UTC (rev 96069)
@@ -1,3 +1,19 @@
+2011-09-09  Simon Fraser  <simon.fra...@apple.com>
+
+        Translucent scrollbars on composited layers render incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=58515
+
+        Reviewed by Sam Weinig.
+        
+        Scrollbars in composited elements were getting drawn twice,
+        because r41203 moved the call to paintOverflowControls() out of
+        RenderLayer::paintLayer(), but forgot to change RenderLayerBacking::paintIntoLayer().
+
+        Test: compositing/scrollbar-painting.html
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::paintIntoLayer):
+
 2011-09-26  Nat Duca  <nd...@chromium.org>
 
         [chromium] Make CCThreadProxy draw

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (96068 => 96069)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2011-09-27 03:24:03 UTC (rev 96068)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2011-09-27 05:12:24 UTC (rev 96069)
@@ -1112,11 +1112,6 @@
         PaintInfo info(context, damageRect.rect(), PaintPhaseBlockBackground, false, paintingRootForRenderer, 0);
         renderer()->paint(info, paintOffset);
 
-        // Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
-        // z-index.  We paint after we painted the background/border, so that the scrollbars will
-        // sit above the background/border.
-        m_owningLayer->paintOverflowControls(context, layerBounds.location(), damageRect.rect());
-        
         // Restore the clip.
         m_owningLayer->restoreClip(context, paintDirtyRect, damageRect);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to