blob: 62eb145353096a39e89a723ed6690bafed662c23 [file] [log] [blame]
<!DOCTYPE html>
<html>
<!--
| Visible grand descendants (i.e. contents of overflow visible element) are
| included in the scrolling area with the proper scaling.
| https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface
| https://www.w3.org/TR/cssom-view-1/#scrolling-area
-->
<head>
<style>
body {
font-family: Roboto;
font-size: 16px;
background-color: #FF0000;
}
.overflow-scroll {
width: 125px;
height: 125px;
overflow: scroll;
background-color: #808080;
}
.content {
width: 200px;
height: 200px;
overflow: visible;
transform: scale(0.5);
background-color: #00FF00;
}
.content-content {
width: 400px;
height: 400px;
transform: scale(0.5);
background-color: rgba(0,0,255,0.5);
}
</style>
<script>
if (window.testRunner) {
window.testRunner.waitUntilDone();
}
function runTest() {
var error = "";
var scroller = document.getElementById("scroller");
if (scroller.scrollWidth != 200) {
error += "\nValue of: scrollWidth"
+ "\n Actual: " + scroller.scrollWidth
+ "\nExpected: " + 200;
}
if (scroller.scrollHeight != 600) {
error += "\nValue of: scrollHeight"
+ "\n Actual: " + scroller.scrollHeight
+ "\nExpected: " + 600;
}
return error;
}
window.onload = function() {
var error = runTest();
if (error) {
console.log("FAIL" + error);
} else {
document.body.style.backgroundColor = "rgba(0,0,0,0)";
}
if (window.testRunner) {
window.testRunner.notifyDone();
}
}
</script>
</head>
<body>
<div id="scroller" class="overflow-scroll">
<div class="content">
<div class="content-content"></div>
<div class="content-content"></div>
<div class="content-content"></div>
</div>
</div>
</body>
</html>