mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1297427: Discount border dots with negative radii. r=jrmuizel
MozReview-Commit-ID: 1CONhbL8ZAb --HG-- extra : rebase_source : 07766295f9b7e238882f8711720bb1ce48977ade
This commit is contained in:
parent
dc791c944e
commit
4d5484cc37
@ -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
|
||||
|
@ -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));
|
||||
|
14
layout/generic/crashtests/1297427-non-equal-centers.html
Normal file
14
layout/generic/crashtests/1297427-non-equal-centers.html
Normal 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>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user