Title: [190820] trunk
Revision
190820
Author
simon.fra...@apple.com
Date
2015-10-09 14:50:03 -0700 (Fri, 09 Oct 2015)

Log Message

Garbage texture data with composited table row
https://bugs.webkit.org/show_bug.cgi?id=148984

Reviewed by Zalan Bujtas.
Source/WebCore:

Don't pretend to know if the layer for a table header, section or cell is
opaque, since table painting is special.

Test: compositing/contents-opaque/table-parts.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):

LayoutTests:

* compositing/contents-opaque/table-parts-expected.txt: Added.
* compositing/contents-opaque/table-parts.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (190819 => 190820)


--- trunk/LayoutTests/ChangeLog	2015-10-09 21:34:56 UTC (rev 190819)
+++ trunk/LayoutTests/ChangeLog	2015-10-09 21:50:03 UTC (rev 190820)
@@ -1,5 +1,15 @@
 2015-10-09  Simon Fraser  <simon.fra...@apple.com>
 
+        Garbage texture data with composited table row
+        https://bugs.webkit.org/show_bug.cgi?id=148984
+
+        Reviewed by Zalan Bujtas.
+
+        * compositing/contents-opaque/table-parts-expected.txt: Added.
+        * compositing/contents-opaque/table-parts.html: Added.
+
+2015-10-09  Simon Fraser  <simon.fra...@apple.com>
+
         Garbage pixels on enphaseenergy.com site
         https://bugs.webkit.org/show_bug.cgi?id=149915
         rdar://problem/22976184

Added: trunk/LayoutTests/compositing/contents-opaque/table-parts-expected.txt (0 => 190820)


--- trunk/LayoutTests/compositing/contents-opaque/table-parts-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/contents-opaque/table-parts-expected.txt	2015-10-09 21:50:03 UTC (rev 190820)
@@ -0,0 +1,25 @@
+Table cell
+Table cell
+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (children 2
+        (GraphicsLayer
+          (position 28.00 20.00)
+          (bounds 252.00 102.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 28.00 142.00)
+          (bounds 252.00 102.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+

Added: trunk/LayoutTests/compositing/contents-opaque/table-parts.html (0 => 190820)


--- trunk/LayoutTests/compositing/contents-opaque/table-parts.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/contents-opaque/table-parts.html	2015-10-09 21:50:03 UTC (rev 190820)
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+
+        table {
+            border-collapse: collapse;
+            margin: 20px;
+        }
+
+        tr {
+            background-color: silver;
+            border-right: 100px solid gray;
+        }
+        
+        td {
+            width: 200px;
+            height: 100px;
+        }
+        
+        .composited {
+            -webkit-transform: translateZ(0);
+        }
+        
+        td.composited {
+            background-color: silver;
+        }
+    </style>
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+
+        function doTest() {
+            if (window.testRunner && window.internals)
+                document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document);
+        }
+        window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+<table>
+    <tr class="composited">
+        <td>Table cell</td>
+    </tr>
+</table>
+
+<table>
+    <tr>
+        <td class="composited">Table cell</td>
+    </tr>
+</table>
+<pre id="layertree"></pre> 
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (190819 => 190820)


--- trunk/Source/WebCore/ChangeLog	2015-10-09 21:34:56 UTC (rev 190819)
+++ trunk/Source/WebCore/ChangeLog	2015-10-09 21:50:03 UTC (rev 190820)
@@ -1,5 +1,20 @@
 2015-10-09  Simon Fraser  <simon.fra...@apple.com>
 
+        Garbage texture data with composited table row
+        https://bugs.webkit.org/show_bug.cgi?id=148984
+
+        Reviewed by Zalan Bujtas.
+        
+        Don't pretend to know if the layer for a table header, section or cell is
+        opaque, since table painting is special.
+
+        Test: compositing/contents-opaque/table-parts.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
+
+2015-10-09  Simon Fraser  <simon.fra...@apple.com>
+
         Garbage pixels on enphaseenergy.com site
         https://bugs.webkit.org/show_bug.cgi?id=149915
         rdar://problem/22976184

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (190819 => 190820)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2015-10-09 21:34:56 UTC (rev 190819)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2015-10-09 21:50:03 UTC (rev 190820)
@@ -6151,6 +6151,10 @@
     if (m_zOrderListsDirty || m_normalFlowListDirty)
         return false;
 
+    // Table painting is special; a table paints its sections.
+    if (renderer().isTablePart())
+        return false;
+
     // FIXME: We currently only check the immediate renderer,
     // which will miss many cases.
     if (renderer().backgroundIsKnownToBeOpaqueInRect(localRect))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to