Bug 1297427: Discount border dots with negative radii. r=jrmuizel

MozReview-Commit-ID: 1CONhbL8ZAb

--HG--
extra : rebase_source : 07766295f9b7e238882f8711720bb1ce48977ade
This commit is contained in:
Bas Schouten 2016-09-08 14:00:54 +02:00
parent dc791c944e
commit 4d5484cc37
4 changed files with 18 additions and 1 deletions

View File

@ -251,6 +251,8 @@ void
PathBuilderD2D::Arc(const Point &aOrigin, Float aRadius, Float aStartAngle,
Float aEndAngle, bool aAntiClockwise)
{
MOZ_ASSERT(aRadius >= 0);
if (aAntiClockwise && aStartAngle < aEndAngle) {
// D2D does things a little differently, and draws the arc by specifying an
// beginning and an end point. This means the circle will be the wrong way

View File

@ -2407,7 +2407,7 @@ nsCSSBorderRenderer::DrawDottedCornerSlow(mozilla::css::Side aSide,
DottedCornerFinder::Result result = finder.Next();
if (marginedDirtyRect.Contains(result.C)) {
if (marginedDirtyRect.Contains(result.C) && result.r > 0) {
entered = true;
builder->MoveTo(Point(result.C.x + result.r, result.C.y));
builder->Arc(result.C, result.r, 0, Float(2.0 * M_PI));

View File

@ -0,0 +1,14 @@
<!doctype html>
<html>
<meta charset="utf-8" />
<style>
#box {
border-radius: 335px;
width: 600px;
height: 401px;
border-style: dotted;
border-width: 41px 1px;
}
</style>
<div id="box"></div>
</html>

View File

@ -635,3 +635,4 @@ load large-border-radius-dashed.html
load large-border-radius-dashed2.html
load large-border-radius-dotted.html
load large-border-radius-dotted2.html
load 1297427-non-equal-centers.html