mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=417246, wrong border size rendering in some cases ; r=roc
This commit is contained in:
parent
c8cf53147c
commit
26262aaee9
@ -1103,9 +1103,6 @@ GetBorderCornerDimensions(const gfxRect& oRect,
|
||||
const gfxFloat *radii,
|
||||
gfxSize *oDims)
|
||||
{
|
||||
gfxFloat halfWidth = oRect.size.width / 2.0;
|
||||
gfxFloat halfHeight = oRect.size.height / 2.0;
|
||||
|
||||
gfxFloat topWidth = iRect.pos.y - oRect.pos.y;
|
||||
gfxFloat leftWidth = iRect.pos.x - oRect.pos.x;
|
||||
gfxFloat rightWidth = oRect.size.width - iRect.size.width - leftWidth;
|
||||
@ -1118,16 +1115,10 @@ GetBorderCornerDimensions(const gfxRect& oRect,
|
||||
bottomWidth = PR_MAX(bottomWidth, PR_MAX(radii[C_BR], radii[C_BL]));
|
||||
}
|
||||
|
||||
// Make sure that the computed corner size doesn't ever go beyond
|
||||
// half of the full border width/height
|
||||
oDims[C_TL] = gfxSize(PR_MIN(halfWidth, leftWidth * CORNER_FACTOR),
|
||||
PR_MIN(halfHeight, topWidth * CORNER_FACTOR));
|
||||
oDims[C_TR] = gfxSize(PR_MIN(halfWidth, rightWidth * CORNER_FACTOR),
|
||||
PR_MIN(halfHeight, topWidth * CORNER_FACTOR));
|
||||
oDims[C_BL] = gfxSize(PR_MIN(halfWidth, leftWidth * CORNER_FACTOR),
|
||||
PR_MIN(halfHeight, bottomWidth * CORNER_FACTOR));
|
||||
oDims[C_BR] = gfxSize(PR_MIN(halfWidth, rightWidth * CORNER_FACTOR),
|
||||
PR_MIN(halfHeight, bottomWidth * CORNER_FACTOR));
|
||||
oDims[C_TL] = gfxSize(leftWidth, topWidth);
|
||||
oDims[C_TR] = gfxSize(rightWidth, topWidth);
|
||||
oDims[C_BL] = gfxSize(leftWidth, bottomWidth);
|
||||
oDims[C_BR] = gfxSize(rightWidth, bottomWidth);
|
||||
}
|
||||
|
||||
/* Set up a path for rendering just the corners of the path. Executed
|
||||
|
13
layout/reftests/bugs/417246-1-ref.html
Normal file
13
layout/reftests/bugs/417246-1-ref.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.a {
|
||||
border-top: 40px solid blue;
|
||||
border-bottom: 20px solid green;
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="a"></div>
|
||||
</body> </html>
|
14
layout/reftests/bugs/417246-1.html
Normal file
14
layout/reftests/bugs/417246-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.a {
|
||||
border-top: 40px solid blue;
|
||||
border-bottom: 20px dashed green;
|
||||
background: green;
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="a"></div>
|
||||
</body> </html>
|
@ -737,6 +737,7 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
|
||||
== 414851-1.html 414851-1-ref.html
|
||||
== 416106-1.xhtml 416106-1-ref.xhtml
|
||||
== 416752-1.html 416752-1-ref.html
|
||||
== 417246-1.html 417246-1-ref.html
|
||||
== 417676.html 417676-ref.html
|
||||
== 418766-1a.html 418766-1-ref.html
|
||||
== 418766-1b.html 418766-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user