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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190820
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-10-09 Simon Fraser <simon.fraser@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.fraser@apple.com>
Garbage pixels on enphaseenergy.com site
--- /dev/null
+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)
+ )
+ )
+ )
+ )
+)
+
--- /dev/null
+<!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>
+2015-10-09 Simon Fraser <simon.fraser@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.fraser@apple.com>
Garbage pixels on enphaseenergy.com site
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))