blob: 393a768901c0eda956746ed2f1ac9edf8d6f5d98 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
}
#overflowHidden {
overflow: hidden;
background: purple;
}
#transformed {
-webkit-transform: rotate(0deg) translate3d(0, 0, 0);
-webkit-transition: -webkit-transform linear 1ms;
background: green;
}
#transformed:hover {
-webkit-transform: rotate(45deg) translate3d(0, 0, 0);
}
</style>
</head>
<body>
<p> Test for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=83954">83954</a>: REGRESSION(110072): Clipping is not applied on layers that are animated using platform code</p>
<p> This passes if the green transformed square doesn't split out of the purple square.</p>
<div>
<div id="transformed"></div>
</div>
<script>
function transitionFinished() {
if (window.testRunner)
window.testRunner.notifyDone();
}
if (!window.eventSender)
alert("To manually test, hover over the green div. The overflow should be properly clipped.");
if (window.testRunner)
window.testRunner.waitUntilDone();
var transformed = document.getElementById("transformed");
transformed.parentNode.setAttribute("id", "overflowHidden");
transformed.addEventListener("webkitTransitionEnd", transitionFinished, true);
eventSender.mouseMoveTo(transformed.offsetLeft + 10, transformed.offsetTop + 10);
</script>
</body>
</html>