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

Side by Side Diff: LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html

Issue 23523046: Fixed-position repaint invalidations should be sent to the correct composited layer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed null pointer check 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <style>
6
7 .compositedBehind {
8 width: 500px;
9 height: 500px;
10 -webkit-transform: translatez(0);
11 background-color: cyan;
12 }
13
14 .containerOverlapsComposited {
15 position: absolute;
16 z-index: 2; /* Creates a stacking context so that the fixed-pos layer is conta ined instead of a sibling */
17 top: 20px;
18 left: 20px;
19 width: 100px;
20 height: 30000px;
21 background-color: green;
22 }
23
24 .fixed {
25 position: fixed;
26 top: 45px;
27 left: 45px;
28 background-color: lime;
29 width: 50px;
30 height: 50px;
31 }
32
33 </style>
34
35 <script>
36 if (window.testRunner)
37 testRunner.dumpAsText();
38
39 if (window.internals) {
40 /* Note carefully, compositing for fixed position is _disabled_ here */
41 internals.settings.setAcceleratedCompositingForFixedPositionEnabled( false);
42 internals.settings.setFixedPositionCreatesStackingContext(true);
43 }
44
45 function test()
46 {
47 document.body.offsetHeight;
48 if (window.internals)
49 window.internals.startTrackingRepaints(document);
50
51 window.scrollTo(0, 100);
52
53 if (window.internals)
54 document.getElementById('layers').textContent = window.internals .layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
55 }
56 </script>
57
58 </head>
59
60
61
62 <body onload="test()">
63 <!--
64 Among other duplicate bugs: https://code.google.com/p/chromium/issues/det ail?id=128375
65 A non-composited fixed-position element can get grouped into a composited container.
66 In this case, repaint invalidations were incorrectly going to the RenderV iew instead
67 of the composited container. The incorrect result was that the fixed-pos ition element
68 never repainted, and it appeared to scroll along with the composited cont ainer.
69 -->
70 <div class="compositedBehind"> </div>
71
72 <div class="containerOverlapsComposited">
73 <div class="fixed"></div>
74 </div>
75
76 <pre id="layers"></pre>
77 </body>
78
79 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698