blob: bf96bafa4f8a970685b753348e2e4fb3965613cf [file] [log] [blame]
<!doctype HTML>
<style>
#scroller {
width: 400px;
height: 300px;
overflow: scroll;
position: relative;
}
#clipper {
position: absolute;
left: 50px;
top: 250px;
width: 300px;
height: 200px;
border: 5px dotted black;
clip: rect(0px, 310px, 210px, 0px);
-webkit-clip-path: polygon(626px 463px,765px 236px,687px 31px,271px 100px,70px 10px,49px 250px,133px 406px,374px 462px,529px 393px);
height: 2000px;
pointer-events: none;
}
#fixed {
position: fixed;
z-index: -1;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: blue;
}
</style>
<div id="scroller">
<div id="clipper">
<div id="fixed"></div>
</div>
</div>
<script src="../../resources/js-test.js"></script>
<script>
// These are from UseCounter.h
var ClipPathOfPositionedElement = 944;
var ClipCssOfPositionedElement = 945;
window.jsTestIsAsync = true;
if (window.testRunner) {
window.testRunner.layoutAndPaintAsyncThen(function() {
if (window.internals) {
shouldBeTrue('internals.isUseCounted(document, ClipPathOfPositionedElement)');
shouldBeTrue('internals.isUseCounted(document, ClipCssOfPositionedElement)');
finishJSTest();
}
});
}
</script>