Be consistent about what percentage border-radius is a percentage of. Bug

364861, r+sr=roc
This commit is contained in:
bzbarsky%mit.edu 2006-12-30 05:23:51 +00:00
parent 3153a043e4
commit 0abf394cbc
4 changed files with 30 additions and 2 deletions

View File

@ -1724,7 +1724,7 @@ void nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
switch ( bordStyleRadius[i].GetUnit()) {
case eStyleUnit_Percent:
percent = bordStyleRadius[i].GetPercentValue();
borderRadii[i] = (nscoord)(percent * aBorderArea.width);
borderRadii[i] = (nscoord)(percent * aForFrame->GetSize().width);
break;
case eStyleUnit_Coord:
borderRadii[i] = bordStyleRadius[i].GetCoordValue();
@ -3347,7 +3347,8 @@ nsCSSRendering::PaintBackgroundColor(nsPresContext* aPresContext,
borderRadii[side] = 0;
switch (bordStyleRadius[side].GetUnit()) {
case eStyleUnit_Percent:
borderRadii[side] = nscoord(bordStyleRadius[side].GetPercentValue() * aBgClipArea.width);
borderRadii[side] = nscoord(bordStyleRadius[side].GetPercentValue() *
aForFrame->GetSize().width);
break;
case eStyleUnit_Coord:
borderRadii[side] = bordStyleRadius[side].GetCoordValue();

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<body>
<div style="background: black;
-moz-background-clip: padding;
width: 400px;
padding: 0;
height: 300px;
border: 100px solid rgba(255, 255, 0, 0.5);
-moz-border-radius: 240px">
</div>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<body>
<div style="background: black;
-moz-background-clip: padding;
width: 400px;
padding: 0;
height: 300px;
border: 100px solid rgba(255, 255, 0, 0.5);
-moz-border-radius: 40.0%">
</div>
</body>
</html>

View File

@ -30,6 +30,7 @@ f== bugs/360065-1.html bugs/360065-1-ref.html # bug 18217
!= bugs/315620-2b.xhtml bugs/315620-2-ref.xhtml
== bugs/363637-1.html bugs/363637-1-ref.html
== bugs/364079-1.html bugs/364079-1-ref.html
== bugs/364861-1.html bugs/364861-1-ref.html
# table-dom/
== table-dom/appendCells1.html table-dom/appendCells1-ref.html