blob: 9e334c8eda135c9bf212ae3dc9a2c6ccf110d379 [file] [log] [blame]
<!DOCTYPE html>
<style>
.container {
position: relative;
font: 20px/1 Ahem, sans-serif;
width: 500px;
height: 200px;
border: 1px solid black;
}
.circle {
z-index: -1;
width: 160px;
height: 160px;
border-radius: 80px;
background-color: blue;
overflow: hidden;
}
#left-circle-outline {
position: absolute;
top: 20px;
left: 0px;
}
#right-circle-outline {
position: absolute;
top: 20px;
right: 0px;
}
.left-circle-float-line {
float: left;
clear: left;
height: 20px;
}
.right-circle-float-line {
float: right;
clear: right;
height: 20px;
}
</style>
<body>
<p>The black squares should trace the right side of the circle's blue outline.</p>
<div class="container">
X<br/>
<div id="left-circle-outline" class="circle"></div>
<!-- generated left-rounded-rect-float-line divs will be inserted here -->
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X
</div>
<p>The black squares should trace the left side of the circle's blue outline.</p>
<div class="container" style="text-align: right">
X<br/>
<div id="right-circle-outline" class="circle"></div>
<!-- generated right-rounded-rect-float-line divs will be inserted here -->
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X<br/>
X
</div>
<script src="../resources/rounded-rectangle.js"></script>
<script src="../resources/subpixel-utils.js"></script>
<script>
genLeftRightRoundedRectFloatShapeOutsideRefTest({
roundedRect: {x: 0, y: 20, width: 160, height: 160, rx: 80, ry: 80},
containerWidth: 500,
containerHeight: 200,
lineHeight: 20,
floatElementClassSuffix: "circle-float-line",
insertElementIdSuffix: "circle-outline"
});
</script>
</body>