Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: LayoutTests/compositing/repaint/should-not-repaint-composited-descendants.html

Issue 390933004: Split compositing/repaint/should-not-repaint-*.html into smaller tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698