23 background-color: red;
30 background-color: blue;
34 if (window
.testRunner
)
35 testRunner
.dumpAsText();
39 var pre
= document
.getElementById('console');
40 var testDescription
= 'This test ensures that Layer::scrollsWithRespectTo ' +
41 'always works even with transformed fixed-position layers.\n\n';
42 var text
= document
.createTextNode(testDescription
);
43 pre
.appendChild(text
);
48 var divs
= ['fixed', 'container', 'overflow-child', 'abs-descendant', 'fixed-descendant', 'viewportFiller', 'root'];
49 for (var i
= 0; i
< divs
.length
; i
++) {
50 var div1
= document
.getElementById(divs
[i
]);
51 for (var j
= 0; j
< divs
.length
; j
++) {
52 var div2
= document
.getElementById(divs
[j
]);
53 var scrollsWithRespectTo
= window
.internals
.scrollsWithRespectTo(div1
, div2
);
55 var successText
= scrollsWithRespectTo
? 'scrolls with respect to' : 'does not scroll with respect to';
56 var messageText
= div1
.id
+ ' ' + successText
+ ' ' + div2
.id
;
57 text
= document
.createTextNode(messageText
+ '\n');
58 pre
.appendChild(text
);
63 window
.onload
= doTest
;
67 <div id='fixed' style='position: fixed'
></div>
68 <div id='container' style='height:
350px; width:
500px; transform:rotate(
15deg); position:relative; top:
150px; left:
150px'
>
69 <div id='overflow-child' style='overflow:scroll'
></div>
70 <div id='abs-descendant'
></div>
71 <div id='fixed-descendant'
></div>
72 <div class='filler'
></div>
75 <pre id='console'
></pre>
76 <div id='viewportFiller' class='filler'
></div>