mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
Fixes rendering of elements with large border-radius values by scaling radii proportionally when they exceed element dimensions per CSS spec. Co-authored-by: Samyat Gautam <thesamyatgautam@gmail.com>
55 lines
1.1 KiB
HTML
55 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<link rel="match" href="../expected/border-radius-normalization-ref.html" />
|
|
<head>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 20px;
|
|
background-color: #f5f5f5;
|
|
font-family: sans-serif;
|
|
}
|
|
|
|
.test-case {
|
|
margin: 15px 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.label {
|
|
width: 200px;
|
|
font-size: 14px;
|
|
color: #333;
|
|
}
|
|
|
|
.box {
|
|
background-color: #4CAF50;
|
|
border: 2px solid #333;
|
|
}
|
|
|
|
/* Float max precision test - tests extreme border radius values */
|
|
.float-max-precision {
|
|
width: 300px;
|
|
height: 40px;
|
|
border-radius: 3.40282e+38px; /* Float max values trigger precision issues */
|
|
background-color: #4CAF50;
|
|
border: 1px solid #333;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 18px;
|
|
margin-bottom: 20px;
|
|
color: #333;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h2>Border Radius Normalization Test</h2>
|
|
|
|
<div class="test-case">
|
|
<div class="label">Float max precision test:</div>
|
|
<div class="float-max-precision"></div>
|
|
</div>
|
|
</body>
|
|
</html> |