Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / paint / invalidation / spv2 / fixed-under-composited-fixed-scrolled.html
blob4b9c66a272926c6872fe4cf0e8bba44d910ccf5c
1 <!-- Based on fast/repaint/fixed-under-composited-fixed-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.display = 'none';
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 body {
20 height: 2000px;
22 #fixed-container {
23 position: fixed;
24 top: 0;
25 left: 0;
26 width: 100%;
27 height: 100%;
28 background-color: green;
29 backface-visibility: hidden;
31 #fixed {
32 position: fixed;
33 top: 100px;
34 left: 100px;
35 width: 200px;
36 height: 200px;
37 background-color: red;
39 </style>
40 Tests paint invalidation of fixed elements under a composited fixed element after scrolled.
41 Passes if there is only green background.
42 <div id="fixed-container">
43 <div id="fixed"></div>
44 </div>