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

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

Issue 182383019: Should not repaint if a CSS property change can be composited (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: as your wish! (remove table) Created 6 years, 9 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/clipping-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/clipping-should-not-repaint-composited-descendants.html
diff --git a/LayoutTests/compositing/repaint/clipping-should-not-repaint-composited-descendants.html b/LayoutTests/compositing/repaint/clipping-should-not-repaint-composited-descendants.html
new file mode 100644
index 0000000000000000000000000000000000000000..480269643d94ecad59d02ff2a15f86cb02c897ff
--- /dev/null
+++ b/LayoutTests/compositing/repaint/clipping-should-not-repaint-composited-descendants.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<style>
+ .spacer {
+ position: relative;
+ width: 300px;
+ height: 300px;
+ }
+
+ .clipping-container {
+ position: absolute;
+ height: 300px;
+ -webkit-transform: translateZ(0);
+ }
+
+ .with-initial-clipping {
+ clip: rect(50px, 250px, 250px, 50px);
+ }
+
+ .clipped-composited-child {
+ width: 250px;
+ height: 250px;
+ background-color: yellow;
+ border: 1px solid black;
+ -webkit-transform: translateZ(0);
+ }
+</style>
+<style id="alt1">
+ .clipping-container {
+ width: 300px;
+ }
+</style>
+<style id="alt2">
+ .clipping-container {
+ width: 100%;
+ clip: rect(100px, 200px, 200px, 100px);
+ }
+</style>
+<script src="../../resources/run-after-display.js"></script>
+<script>
+ var alt1 = document.getElementById('alt1');
+ var alt2 = document.getElementById('alt2');
+ alt2.disabled = true;
+
+ function toggle() {
+ if (alt1.disabled) {
+ alt1.disabled = false;
+ alt2.disabled = true;
+ } else {
+ alt2.disabled = false;
+ alt1.disabled = true;
+ }
+ }
+
+ function doTest() {
+ internals.startTrackingRepaints(document);
+ toggle();
+ 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);
+ }
+</script>
+
+<div class="spacer">
+ <div class="clipping-container">
+ <div class="clipped-composited-child"></div>
+ </div>
+</div>
+<div class="spacer">
+ <div class="clipping-container with-initial-clipping">
+ <div class="clipped-composited-child"></div>
+ </div>
+</div>
+<pre id="console"></pre>
« no previous file with comments | « no previous file | LayoutTests/compositing/repaint/clipping-should-not-repaint-composited-descendants-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698