1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Remove usage of mozFillRule

The non-standard `mozFillRule` has been removed in Firefox 51 [1, 2].
Instead, a parameter of the standard methods should be used. Note that
this is supported in all major browsers for a long time now, so there
should be no need keeping this Firefox-specific code around.

[1] https://developer.mozilla.org/en-US/Firefox/Releases/51
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=826619
This commit is contained in:
Tim van der Meij 2017-01-29 23:24:44 +01:00
parent 8d684b5b3f
commit 95732279b6
2 changed files with 3 additions and 21 deletions

View file

@ -1229,13 +1229,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
}
if (this.pendingEOFill) {
if (ctx.mozFillRule !== undefined) {
ctx.mozFillRule = 'evenodd';
ctx.fill();
ctx.mozFillRule = 'nonzero';
} else {
ctx.fill('evenodd');
}
ctx.fill('evenodd');
this.pendingEOFill = false;
} else {
ctx.fill();
@ -2273,13 +2267,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
var ctx = this.ctx;
if (this.pendingClip) {
if (this.pendingClip === EO_CLIP) {
if (ctx.mozFillRule !== undefined) {
ctx.mozFillRule = 'evenodd';
ctx.clip();
ctx.mozFillRule = 'nonzero';
} else {
ctx.clip('evenodd');
}
ctx.clip('evenodd');
} else {
ctx.clip();
}