blob: efbdd6f0722d701803474365284964eae25fa79c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
<style>
#outerDiv {
width: 150px;
}
#outerDiv, #outerDiv div {
padding: 15px;
border-style: solid;
}
</style>
</head>
<body onload="runTest();">
<div id="highlight" class="fauxHighlight" style="z-index: 1; position: absolute"></div>
<div class="opaqueHighlight" id="outerDiv" style="cursor: pointer">
<div>
<div style="cursor: pointer">
<div id="innerDiv"></div>
</div>
</div>
</div>
<script>
function runTest() {
var clientRect = document.getElementById("outerDiv").getBoundingClientRect();
var highlight = document.getElementById("highlight");
highlight.style.left = clientRect.left + "px";
highlight.style.top = clientRect.top + "px";
highlight.style.width = clientRect.width + "px";
highlight.style.height = clientRect.height + "px";
}
</script>
</body>
</html>