Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / overlap-map-stack-crash.html
blob8ca32a4296b328d82213c76be0922ba5c7f682f3
1 <!DOCTYPE html>
2 <html>
3 <head>
5 <style>
6 #container {
7 position: absolute;
8 z-index: 0;
9 top: 50px;
10 left: 50px;
11 width: 300px;
12 height: 300px;
13 background-color: gray;
16 #compositedNegZIndex {
17 position: absolute;
18 z-index: -5;
19 width: 100px;
20 height: 100px;
21 background-color: blue;
22 overflow: scroll;
25 #tall {
26 height: 1000px;
29 #innocentNegZIndex {
30 position: absolute;
31 z-index: -2;
32 top: 200px;
33 left: 200px;
34 width: 100px;
35 height: 100px;
36 background-color: lime;
39 #explanation {
40 position: absolute;
41 top: 400px;
43 </style>
45 <script>
46 if (window.internals) {
47 window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
50 function doTest() {
51 if (!window.internals)
52 document.getElementById("explanation").style.display = "block";
54 if (window.testRunner)
55 testRunner.dumpAsText();
58 window.addEventListener("load", doTest, false);
59 </script>
61 </head>
62 <body>
64 <div id="container">
65 <div id="compositedNegZIndex">
66 <div id="tall"></div>
67 </div>
68 <div id="innocentNegZIndex"> </div>
69 </div>
71 <pre id="explanation" style="display:none;">
72 Crash after hitting below bottom of overlap stack: https://code.google.com/p/chromium/issues/detail?id=285979
74 The crashing scenario happened as follows:
76 - force-compositing-mode is disabled. As a result, compositing mode is
77 disabled until a compositing trigger.
79 - overflow-scroll as the compositing trigger, because it does not enable
80 compositing mode before computeCompositingRequirements. Other triggers
81 happen during CompositedLayerMapping incremental update entry points.
82 (Note: CompositedLayerMapping was formerly known as LayerBacking.)
84 - The above two requirements are necessary to create the scenario where
85 the root layer does not create an overlap context.
87 - The overflow-scroll element has a negative z-index which causes the
88 parent layer to be composited, too.
90 - As a result, subsequent children layers need to add themselves to the
91 overlap map, even if they are not composited.
93 - The problem, however, is that we never created an overlap context for
94 these negative z-index non-composited layers. When the layers try to add
95 themselves to the overlap, they try to access below the bottom of the
96 stack, and crash.
97 </pre>
99 </body>
101 </html>