mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Be consistent about what percentage border-radius is a percentage of. Bug
364861, r+sr=roc
This commit is contained in:
parent
3153a043e4
commit
0abf394cbc
@ -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();
|
||||
|
13
layout/reftests/bugs/364861-1-ref.html
Normal file
13
layout/reftests/bugs/364861-1-ref.html
Normal 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>
|
13
layout/reftests/bugs/364861-1.html
Normal file
13
layout/reftests/bugs/364861-1.html
Normal 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>
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user