Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / paint / invalidation / spv2 / fixed-under-composited-absolute-scrolled.html
blob725877341a1f82fa923ad1d55f21ad26ea459228
1 <!-- Based on fast/repaint/fixed-under-composited-absolute-scrolled.html -->
2 <!DOCTYPE html>
3 <script src="resources/paint-invalidation-test.js"></script>
4 <script>
5 window.expectedPaintInvalidationObjects = [
6 "LayoutBlockFlow (positioned) DIV id='fixed'",
7 ];
8 function paintInvalidationTest() {
9 document.getElementById('fixed').style.height = '200px';
11 onload = function() {
12 // Scroll before repaint test to test correct scroll offset of invalidation rect
13 // for fixed-position element when it needs repaint.
14 window.scrollTo(0, 400);
15 runPaintInvalidationTest();
17 </script>
18 <style>
19 #indicator {
20 position: absolute;
21 height: 200px;
22 width: 100px;
23 top: 400px;
24 left: 0;
25 background-color: red;
27 #absolute {
28 position: absolute;
29 top: 2000px;
30 width: 1px;
31 height: 1px;
32 background-color: red;
33 backface-visibility: hidden;
34 z-index: 1000;
36 #fixed {
37 position: fixed;
38 top: 0;
39 left: 0;
40 width: 100px;
41 height: 100px;
42 background-color: green;
44 </style>
45 Tests paint invalidation of fixed element under a composited absolute element on resize after scrolled.
46 Passes if there is a 100x200 green rectangle and no red.
47 <div id="indicator"></div>
48 <div id="absolute">
49 <div id="fixed">
50 </div>
51 </div>