Index: LayoutTests/compositing/repaint/should-not-repaint-composited-descendants.html |
diff --git a/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants.html b/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants.html |
index 29e97c2b2dfce4caa32343b6c83c02dda23c17bc..19c4a735a8ec1336b5419709f8a01e0864a09969 100644 |
--- a/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants.html |
+++ b/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants.html |
@@ -1,89 +1,29 @@ |
<!DOCTYPE html> |
-<!-- Difference between this test and should-not-repaint-composited-style.html is that |
- this test only changes styles that won't trigger layout to test the non-layout |
- path of composited layer repaint. --> |
<style> |
- .spacer { |
- width: 100px; |
- height: 100px; |
- } |
- .container { |
- -webkit-transform: translateZ(0); |
- position: relative; |
- left: 0; |
- top: 0; |
- height: 100px; |
- overflow: hidden; |
- } |
- .child { |
- position: absolute; |
- width: 150px; |
- height: 150px; |
- border: 1px black solid; |
- background-color: yellow; |
- } |
- .composited { |
- -webkit-transform: translateZ(0); |
- } |
+#composited-box { |
+ backface-visibility: hidden; |
+ position: absolute; |
+ background-color: green; |
+ clip: rect(40px, 110px, 110px, 40px); |
+} |
+.child { |
+ width: 50px; |
+ height: 50px; |
+ background-color: green; |
+} |
+.composited { |
+ backface-visibility: hidden; |
+} |
</style> |
-<style id="old-style"> |
- .clip { clip: rect(200px, 100px, 100px, 200px); } |
- .position { position: relative; } |
- .zindex { z-index: 0; } |
- .opacity { opacity: 0.99; } |
- .transform { -webkit-transform: translateZ(10px); } |
- .filter { -webkit-filter: invert(70%); } |
-</style> |
-<style id="new-style"> |
- .clip { clip: rect(100px, 200px, 200px, 100px); } |
- .position { position: static; } |
- .zindex { z-index: 1; } |
- .opacity { opacity: 0.5; } |
- .transform { -webkit-transform: translateZ(20px); } |
- .filter { -webkit-filter: invert(100%); } |
-</style> |
-<script src="../../resources/run-after-display.js"></script> |
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
<script> |
- var oldStyle = document.getElementById('old-style'); |
- var newStyle = document.getElementById('new-style'); |
- newStyle.disabled = true; |
- |
- function doTest() { |
- internals.startTrackingRepaints(document); |
- newStyle.disabled = false; |
- oldStyle.disabled = true; |
- document.getElementById("console").textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
- testRunner.notifyDone(); |
- } |
- |
- if (window.testRunner && window.internals) { |
- testRunner.dumpAsText(); |
- testRunner.waitUntilDone(); |
- runAfterDisplay(doTest); |
- } |
+function repaintTest() { |
+ // This will cause a full layer repaint, but should not include the composited child. |
+ document.getElementById('composited-box').style.clip = 'rect(30px, 120px, 120px, 30px)'; |
+} |
+window.onload = runRepaintTest; |
</script> |
-<h1>position change with composited child</h1> |
-<div class="spacer"><div class="container position"><div class="child composited"></div></div></div> |
-<h1>position change with non-composited child</h1> |
-<div class="spacer"><div class="container position"><div class="child"></div></div></div> |
-<h1>z-index change with composited child</h1> |
-<div class="spacer"><div class="container zindex"><div class="child composited"></div></div></div> |
-<h1>z-index change with non-composited child</h1> |
-<div class="spacer"><div class="container zindex"><div class="child"></div></div></div> |
-<h1>opacity change with composited child</h1> |
-<div class="spacer"><div class="container opacity"><div class="child composited"></div></div></div> |
-<h1>opacity change with non-composited child</h1> |
-<div class="spacer"><div class="container opacity"><div class="child"></div></div></div> |
-<h1>transform change with composited child</h1> |
-<div class="spacer"><div class="container transform"><div class="child composited"></div></div></div> |
-<h1>transform change with non-composited child</h1> |
-<div class="spacer"><div class="container transform"><div class="child"></div></div></div> |
-<h1>filter change with composited child</h1> |
-<div class="spacer"><div class="container filter"><div class="child composited"></div></div></div> |
-<h1>filter change with non-composited child</h1> |
-<div class="spacer"><div class="container filter"><div class="child"></div></div></div> |
-<h1>clip change with composited child</h1> |
-<div class="spacer"><div class="container clip"><div class="child composited"></div></div></div> |
-<h1>clip change with non-composited child</h1> |
-<div class="spacer"><div class="container clip"><div class="child"></div></div></div> |
-<pre id="console"></pre> |
+<div id="composited-box"> |
+ <div class="child"></div> |
+ <div class="composited child"></div> |
+</div> |