blob: 37c1accbcb21feff5696073ded9468403fdc6f2d [file] [log] [blame]
<style>
div {
width: 10px;
height: 10px;
background-color: green;
}
</style>
<div id="test1" style="clip: rect(auto, auto, auto, auto);">
<div id="test2" style="clip: rect(5px, auto, auto, auto);">
<div id="test3" style="clip: rect(auto, 5px, auto, auto);">
<div id="test4" style="clip: rect(auto, auto, 5px, auto);">
<div id="test5" style="clip: rect(auto, auto, auto, 5px);">
<div id="test6" style="clip: rect(5px, auto, 5px, auto);">
<script>
if (window.testRunner)
testRunner.dumpAsText();
function outputStyleForElement(id) {
var element = document.getElementById(id);
var clipStyle = getComputedStyle(element).clip;
var p = document.createElement("p");
p.innerText = clipStyle;
document.body.appendChild(p);
}
outputStyleForElement("test1");
outputStyleForElement("test2");
outputStyleForElement("test3");
outputStyleForElement("test4");
outputStyleForElement("test5");
outputStyleForElement("test6");
</script>