mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 896047 - Clear builder when fill rule for path changes. r=Bas
This commit is contained in:
parent
442b84a9be
commit
86f4a50ea7
17
content/canvas/crashtests/896047-1.html
Normal file
17
content/canvas/crashtests/896047-1.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<canvas id="c" width="200" height="100">
|
||||
</canvas>
|
||||
<script>
|
||||
var ctx = document.getElementById("c").getContext("2d");
|
||||
ctx.save();
|
||||
ctx.save();
|
||||
ctx.rect(0,0, 1,1);
|
||||
ctx.restore();
|
||||
ctx.fill('evenodd');
|
||||
ctx.restore();
|
||||
ctx.lineTo(10, 0);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
19
content/canvas/crashtests/896047-2.html
Normal file
19
content/canvas/crashtests/896047-2.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<canvas id="c" width="200" height="100">
|
||||
</canvas>
|
||||
<script>
|
||||
var ctx = document.getElementById("c").getContext("2d");
|
||||
ctx.save();
|
||||
ctx.mozFillRule = 'nonzero';
|
||||
ctx.save();
|
||||
ctx.mozFillRule = 'evenodd';
|
||||
ctx.rect(0,0, 1,1);
|
||||
ctx.restore();
|
||||
ctx.isPointInPath(0,0);
|
||||
ctx.restore();
|
||||
ctx.lineTo(10, 0);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -17,4 +17,6 @@ skip-if(Android||B2G) load 780392-1.html # bug 833371 for B2G
|
||||
skip-if(Android||B2G) load 789933-1.html # bug 833371
|
||||
load 794463-1.html
|
||||
load 802926-1.html
|
||||
load 896047-1.html
|
||||
load 896047-2.html
|
||||
load 916128-1.html
|
||||
|
@ -2003,6 +2003,7 @@ CanvasRenderingContext2D::EnsureUserSpacePath(const CanvasWindingRule& winding)
|
||||
if (mPath && mPath->GetFillRule() != fillRule) {
|
||||
mPathBuilder = mPath->CopyToBuilder(fillRule);
|
||||
mPath = mPathBuilder->Finish();
|
||||
mPathBuilder = nullptr;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mPath, "mPath should exist");
|
||||
|
Loading…
Reference in New Issue
Block a user