2 body { overflow: scroll }
6 background-color: #d64203;
17 Ensure that the scroller positioned the same way as it would be in the
18 'overflow: auto' case. We'll have scrollbars either way, but we don't
19 want the '!=' reftest to spuriously succeed because of the scrollers.
21 <div style=
"width: 500px; height: 500px; background-color: black">
25 // client{Width, Height} consist of the area _inside_ the scrollbars, so these
26 // manually calculated units reflect the fact that with 'overflow: scroll' set,
27 // viewport units are sized taking the scrollbars into account.
28 var vw
= 0.01 * document
.body
.clientWidth
;
29 var vh
= 0.01 * document
.body
.clientHeight
;
30 var vmin
= Math
.min(vw
, vh
);
31 var vmax
= Math
.max(vw
, vh
);
32 document
.getElementById('a').style
.width
= (50 * vw
) + "px";
33 document
.getElementById('b').style
.height
= (25 * vh
) + "px";
34 document
.getElementById('c').style
.width
= (35 * vmin
) + "px";
35 document
.getElementById('d').style
.height
= (25 * vmax
) + "px";