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

Side by Side Diff: LayoutTests/inspector/layer-compositing-reasons.html

Issue 23050018: DevTools: expose layer compositing reasons and paint count via layer tree agent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed gcc build Created 7 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/inspector/layer-compositing-reasons-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <style>
4 @-webkit-keyframes rotate {
5 0% { -webkit-transform: rotate(0deg); }
6 50% { -webkit-transform: rotate(180deg); }
7 100% { -webkit-transform: rotate(360deg); }
8 }
9
10 </style>
11 <script src="../http/tests/inspector/inspector-test.js"></script>
12 <script src="layers-test.js"></script>
13 <script>
14 function test()
15 {
16 function dumpCompositingReasons(layer, callback)
17 {
18 layer.requestCompositingReasons(function(reasons)
19 {
20 var node = WebInspector.domAgent.nodeForId(layer.nodeIdForSelfOrAnce stor());
21 var label = node.appropriateSelectorFor(false);
22 InspectorTest.addResult("Compositing reasons for " + label + ": " + reasons.sort().join(","));
23 callback();
24 });
25 }
26
27 var idsToTest = [
28 "transform3d",
29 "iframe",
30 "backface-visibility",
31 "animation",
32 "transformWithCompositedDescendants",
33 "opacityWithCompositedDescendants",
34 "reflectionWithCompositedDescendants",
35 "perspective",
36 "preserve3d"
37 ];
38
39 function iterateThroughLayers(nextLayerId)
40 {
41 if (nextLayerId >= idsToTest.length) {
42 InspectorTest.completeTest();
43 return;
44 }
45 dumpCompositingReasons(InspectorTest.findLayerByNodeIdAttribute(idsToTes t[nextLayerId]), iterateThroughLayers.bind(this, nextLayerId + 1));
46 }
47 function onGotLayers()
48 {
49 dumpCompositingReasons(InspectorTest._layerTreeModel.root(), iterateThr oughLayers.bind(this, 0));
50 }
51 InspectorTest._layerTreeModel.requestLayers(onGotLayers);
52 }
53
54 </script>
55 </head>
56 <body onload="runTest()">
57 <div id="transform3d" style="-webkit-transform: translateZ(100px);">translated</ div>
58 <iframe id="iframe" src="resources/composited-iframe.html"></iframe>
59 <div id="backface-visibility" style="-webkit-backface-visibility: hidden">backfa ce hidden</div>
60 <div id="animation" style="width: 50px; height: 50px; -webkit-animation-name: ro tate; -webkit-animation-iteration-count: infinite; -webkit-animation-duration: 5 s;">animated</div>
61 <div id="transformWithCompositedDescendants" style="-webkit-transform: rotate(10 deg)">
62 <div style="-webkit-transform: translateZ(100px);">
63 </div>
64 </div>
65 <div id="opacityWithCompositedDescendants" style="opacity: 0.5">
66 <div style="-webkit-transform: translateZ(100px);">opacity
67 </div>
68 </div>
69 <div id="reflectionWithCompositedDescendants" style="-webkit-box-reflect: below" >
70 <div style="-webkit-transform: translateZ(100px);">reflected
71 </div>
72 </div>
73 <div id="perspective" style="-webkit-perspective: 500;">
74 <div style="-webkit-transform: translateZ(100px);">perspective
75 </div>
76 </div>
77 <div id="preserve3d" style="-webkit-transform-style: preserve-3d;">
78 <div style="-webkit-transform: translateZ(100px);">preserve3d
79 </div>
80 </div>
81 </body>
82 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/layer-compositing-reasons-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698