mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
When we set border-radius on <hr>, make the ends circular rather than elliptical. (Bug 597721) r=bzbarsky a2.0=blocking:betaN
This commit is contained in:
parent
2f435cdf89
commit
c4f6132d18
@ -280,13 +280,15 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
// If it would be noticeable, set the border radius to
|
||||
// 100% on all corners
|
||||
// 10000px on all corners; this triggers the clamping to make
|
||||
// circular ends. This assumes the <hr> isn't larger than
|
||||
// that in *both* dimensions.
|
||||
nsCSSCornerSizes& corners = aData->mMarginData->mBorderRadius;
|
||||
|
||||
NS_FOR_CSS_FULL_CORNERS(c) {
|
||||
nsCSSValue& dimen = corners.GetCorner(c);
|
||||
if (dimen.GetUnit() == eCSSUnit_Null) {
|
||||
dimen.SetPercentValue(1.0f);
|
||||
dimen.SetFloatValue(10000.0f, eCSSUnit_Pixel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
8
layout/reftests/bugs/597721-1-ref.html
Normal file
8
layout/reftests/bugs/597721-1-ref.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>HR elements should have circular ends, not elliptical</title>
|
||||
<body style="margin:0; font-size: 0">
|
||||
<hr size="100" color="blue">
|
||||
<div style="position: absolute; background: red; height: 5px; width: 5px; top: 1px; left: 51px; z-index: -1"></div>
|
||||
<div style="position: absolute; background: red; height: 5px; width: 5px; top: 1px; right: 51px; z-index: -1"></div>
|
||||
<div style="position: absolute; background: red; height: 5px; width: 5px; top: 94px; left: 51px; z-index: -1"></div>
|
||||
<div style="position: absolute; background: red; height: 5px; width: 5px; top: 94px; right: 51px; z-index: -1"></div>
|
4
layout/reftests/bugs/597721-1.html
Normal file
4
layout/reftests/bugs/597721-1.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>HR elements should have circular ends, not elliptical</title>
|
||||
<body style="margin:0; font-size: 0">
|
||||
<hr size="100" color="blue">
|
@ -1506,4 +1506,5 @@ random-if(layersGPUAccelerated) == 581317-1.html 581317-1-ref.html
|
||||
== 593544-1.html 593544-1-ref.html
|
||||
== 594737-1.html 594737-1-ref.html
|
||||
== 594624-1.html 594624-1-ref.html
|
||||
== 597721-1.html 597721-1-ref.html
|
||||
fails-if(!haveTestPlugin) == 599476.html 599476-ref.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user