Title: [154191] branches/safari-537-branch

Diff

Modified: branches/safari-537-branch/LayoutTests/ChangeLog (154190 => 154191)


--- branches/safari-537-branch/LayoutTests/ChangeLog	2013-08-16 17:48:42 UTC (rev 154190)
+++ branches/safari-537-branch/LayoutTests/ChangeLog	2013-08-16 17:52:17 UTC (rev 154191)
@@ -1,3 +1,18 @@
+2013-08-16  Lucas Forschler  <[email protected]>
+
+        Merge r154147
+
+    2013-08-15  Simon Fraser  <[email protected]>
+
+            <https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
+
+            Reviewed by Tim Horton.
+
+            Test that would hit the newly added assertion in case of failure.
+            Was unable to create a ref test that worked reliably.
+
+            * compositing/contents-opaque/fixed-to-nonfixed.html: Added.
+
 2013-08-08  Lucas Forschler  <[email protected]>
 
         Merge r153867

Copied: branches/safari-537-branch/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed-expected.txt (from rev 154147, trunk/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed-expected.txt) (0 => 154191)


--- branches/safari-537-branch/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed-expected.txt	                        (rev 0)
+++ branches/safari-537-branch/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed-expected.txt	2013-08-16 17:52:17 UTC (rev 154191)
@@ -0,0 +1,3 @@
+This test should not assert
+
+

Copied: branches/safari-537-branch/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed.html (from rev 154147, trunk/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed.html) (0 => 154191)


--- branches/safari-537-branch/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed.html	                        (rev 0)
+++ branches/safari-537-branch/LayoutTests/compositing/contents-opaque/fixed-to-nonfixed.html	2013-08-16 17:52:17 UTC (rev 154191)
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        .box {
+            height: 400px;
+            width: 400px;
+            top: 0;
+            left: 0;
+        }
+        
+        .child {
+            position: absolute;
+            height: 400px;
+            width: 400px;
+            background-color: red;
+        }
+        
+        .composited {
+            -webkit-transform: translateZ(0);
+        }
+        
+        .fixed {
+            position: fixed;
+            top: -1000px;
+        }
+    </style>
+    <script>
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+        }
+
+        window.addEventListener('load', function() {
+            window.setTimeout(function() {
+                var box = document.getElementById('child');
+                box.classList.remove('fixed');
+
+                var box = document.getElementById('box');
+                box.classList.add('composited');
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 0);
+        }, false);
+    </script>
+</head>
+<body>
+    <p>This test should not assert</p>
+    <div id="box" class="box">
+        <div id="child" class="fixed child">
+        </div>
+    </div>
+</body>
+</html>

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (154190 => 154191)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-16 17:48:42 UTC (rev 154190)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-16 17:52:17 UTC (rev 154191)
@@ -1,3 +1,31 @@
+2013-08-16  Lucas Forschler  <[email protected]>
+
+        Merge r154147
+
+    2013-08-15  Simon Fraser  <[email protected]>
+
+            <https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
+
+            Reviewed by Tim Horton.
+
+            When starting a show on Hulu, there's a layer that gets marked as
+            opaque because it has a child RenderLayer whose background fills the
+            compositing layer. That child RenderLayer was recently position:fixed
+            but outside the viewport, so its viewportConstrainedNotCompositedReason
+            was set to a non-zero value.
+
+            However, we failed to clear the viewportConstrainedNotCompositedReason
+            when the layer became non-fixed. This caused painting the opaque
+            layer to bail in RenderLayer::paintLayer(), leaving garbage.
+
+            Test: compositing/contents-opaque/fixed-to-nonfixed.html
+
+            * rendering/RenderLayer.cpp:
+            (WebCore::RenderLayer::paintLayer): Add an assertion to catch this error in future.
+            * rendering/RenderLayerCompositor.cpp:
+            (WebCore::RenderLayerCompositor::updateBacking): Make sure we clear the
+            ViewportConstrainedNotCompositedReason if the layer is no longer fixed.
+
 2013-08-15  Lucas Forschler  <[email protected]>
 
         Merge r154115

Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderLayer.cpp (154190 => 154191)


--- branches/safari-537-branch/Source/WebCore/rendering/RenderLayer.cpp	2013-08-16 17:48:42 UTC (rev 154190)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderLayer.cpp	2013-08-16 17:52:17 UTC (rev 154191)
@@ -3620,6 +3620,7 @@
     } else if (viewportConstrainedNotCompositedReason() == NotCompositedForBoundsOutOfView) {
         // Don't paint out-of-view viewport constrained layers (when doing prepainting) because they will never be visible
         // unless their position or viewport size is changed.
+        ASSERT(renderer()->style()->position() == FixedPosition);
         return;
     }
 #endif

Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (154190 => 154191)


--- branches/safari-537-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-08-16 17:48:42 UTC (rev 154190)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-08-16 17:52:17 UTC (rev 154191)
@@ -738,7 +738,8 @@
             if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
                 scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView->frameView());
         }
-    }
+    } else
+        layer->setViewportConstrainedNotCompositedReason(RenderLayer::NoNotCompositedReason);
     
     if (layer->backing())
         layer->backing()->updateDebugIndicators(m_showDebugBorders, m_showRepaintCounter);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to