OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <!-- This test case reproduces a bug that is hopefully solved by https://bugs.
webkit.org/show_bug.cgi?id=80641 | 4 <!-- This test case reproduces a bug that is hopefully solved by https://bugs.
webkit.org/show_bug.cgi?id=80641 |
5 | 5 |
6 In the bug, a div element begins as non-composited, and the repaintRect h
ad a | 6 In the bug, a div element begins as non-composited, and the repaintRect h
ad a |
7 correct non-zero offset because it paints into an ancestor container. Lat
er, the | 7 correct non-zero offset because it paints into an ancestor container. Lat
er, the |
8 layer becomes composited (in this case, because the layer is moved to ove
rlap | 8 layer becomes composited (in this case, because the layer is moved to ove
rlap |
9 another composited layer). Because the layer is now composited, the repai
ntRect | 9 another composited layer). Because the layer is now composited, the repai
ntRect |
10 should have been recomputed - in particular, the offset of the repaintRec
t should | 10 should have been recomputed - in particular, the offset of the repaintRec
t should |
11 become zero because it is now its own repaint container. | 11 become zero because it is now its own repaint container. |
12 | 12 |
13 Therefore, after the layer became composited, it was using the wrong repa
int rect, | 13 Therefore, after the layer became composited, it was using the wrong repa
int rect, |
14 which caused things not to repaint properly. | 14 which caused things not to repaint properly. |
15 --> | 15 --> |
16 | 16 |
17 <style type="text/css"> | 17 <style type="text/css"> |
18 .composited { | 18 .composited { |
19 -webkit-transform: translatez(0); | 19 transform: translatez(0); |
20 border: 2px solid black; | 20 border: 2px solid black; |
21 } | 21 } |
22 | 22 |
23 .box { | 23 .box { |
24 width: 200px; | 24 width: 200px; |
25 height: 200px; | 25 height: 200px; |
26 } | 26 } |
27 | 27 |
28 #scrolldiv { | 28 #scrolldiv { |
29 position: absolute; | 29 position: absolute; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 <body onload="repaintTest()"> | 78 <body onload="repaintTest()"> |
79 <div class="composited box"></div> | 79 <div class="composited box"></div> |
80 <div id="scrolldiv"> | 80 <div id="scrolldiv"> |
81 <div class="shouldNotBeSeen box"></div> | 81 <div class="shouldNotBeSeen box"></div> |
82 <div class="shouldBeSeen box"></div> | 82 <div class="shouldBeSeen box"></div> |
83 </div> | 83 </div> |
84 </body> | 84 </body> |
85 | 85 |
86 </html> | 86 </html> |
OLD | NEW |