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

Side by Side Diff: LayoutTests/compositing/repaint/should-not-repaint-composited-styles.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 .spacer {
4 width: 100px;
5 height: 100px;
6 }
7
8 .clipping-container {
9 -webkit-transform: translateZ(0);
10 position: relative;
11 left: 0;
12 top: 0;
13 height: 100px;
14 overflow: hidden;
15 }
16
17 .child {
18 width: 150px;
19 height: 150px;
20 border: 1px black solid;
21 background-color: yellow;
22 }
23
24 .composited {
25 -webkit-transform: translateZ(0);
26 }
27 </style>
28 <style id="alt1">
29 .clipping-container { width: 100px; }
30 .position { position: relative; }
31 .zindex { z-index: 0; }
32 .opacity { opacity: 0.99; }
33 .transform { -webkit-transform: translateZ(10px); }
34 .filter { -webkit-filter: invert(70%); }
35 </style>
36 <style id="alt2">
37 .clipping-container { width: 100%; }
38 .position { position: static; }
39 .zindex { z-index: 1; }
40 .opacity { opacity: 0.5; }
41 .transform { -webkit-transform: translateZ(20px); }
42 .filter { -webkit-filter: invert(100%); }
43 </style>
44 <script src="../../resources/run-after-display.js"></script>
45 <script>
46 var alt1 = document.getElementById('alt1');
47 var alt2 = document.getElementById('alt2');
48 alt2.disabled = true;
49
50 function toggle() {
51 if (alt1.disabled) {
52 alt1.disabled = false;
53 alt2.disabled = true;
54 } else {
55 alt2.disabled = false;
56 alt1.disabled = true;
57 }
58 }
59
60 function doTest() {
61 internals.startTrackingRepaints(document);
62 toggle();
63 document.getElementById("console").textContent = internals.layerTreeAsTe xt(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
64 testRunner.notifyDone();
65 }
66
67 if (window.testRunner && window.internals) {
68 testRunner.dumpAsText();
69 testRunner.waitUntilDone();
70 runAfterDisplay(doTest);
71 }
72 </script>
73 <h1>position change with composited child</h1>
74 <div class="spacer"><div class="clipping-container position"><div class="child c omposited"></div></div></div>
75 <h1>position change with non-composited child</h1>
76 <div class="spacer"><div class="clipping-container position"><div class="child"> </div></div></div>
77 <h1>z-index change with composited child</h1>
78 <div class="spacer"><div class="clipping-container zindex"><div class="child com posited"></div></div></div>
79 <h1>z-index change with non-composited child</h1>
80 <div class="spacer"><div class="clipping-container zindex"><div class="child"></ div></div></div>
81 <h1>opacity change with composited child</h1>
82 <div class="spacer"><div class="clipping-container opacity"><div class="child co mposited"></div></div></div>
83 <h1>opacity change with non-composited child</h1>
84 <div class="spacer"><div class="clipping-container opacity"><div class="child">< /div></div></div>
85 <h1>transform change with composited child</h1>
86 <div class="spacer"><div class="clipping-container transform"><div class="child composited"></div></div></div>
87 <h1>transform change with non-composited child</h1>
88 <div class="spacer"><div class="clipping-container transform"><div class="child" ></div></div></div>
89 <h1>filter change with composited child</h1>
90 <div class="spacer"><div class="clipping-container filter"><div class="child com posited"></div></div></div>
91 <h1>filter change with non-composited child</h1>
92 <div class="spacer"><div class="clipping-container filter"><div class="child"></ div></div></div>
93 <pre id="console"></pre>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698