Saving a canvas state doesn't carry mozFillRule

RESOLVED FIXED in mozilla15

Status

()

Core
Canvas: 2D
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: tobytailor, Assigned: yury)

Tracking

Trunk
mozilla15
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
When calling save() on a CanvasRenderingContext2D instance, the current value of mozFillRule seems not to be carried, instead it's set to default value 'nonzero'. After restoring the state, it's set back to previous value. Try the following code:

var ctx = document.createElement('canvas').getContext('2d');
ctx.mozFillRule = 'evenodd';
console.log(ctx.mozFillRule); // -> 'evenodd'
ctx.save();
console.log(ctx.mozFillRule); // -> 'nonzero'
ctx.restore();
console.log(ctx.mozFillRule); // -> 'evenodd'
(Assignee)

Comment 1

5 years ago
Unable to replicate that with gfx.canvas.azure.enabled=false (and on Windows).
(Assignee)

Comment 2

5 years ago
that's just copy'n'paste mistake  http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp#703
Assignee: nobody → async.processingjs
(Assignee)

Comment 3

5 years ago
Created attachment 622722 [details] [diff] [review]
Fixes state saving for azure
(Assignee)

Updated

5 years ago
Attachment #622722 - Flags: review?(jmuizelaar)
Comment on attachment 622722 [details] [diff] [review]
Fixes state saving for azure

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
Attachment #622722 - Flags: review?(jmuizelaar) → review+
(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)
> Comment on attachment 622722 [details] [diff] [review]
> Fixes state saving for azure
> 
> [Approval Request Comment]
> Regression caused by (bug #): 
> User impact if declined: 
> Testing completed (on m-c, etc.): 
> Risk to taking this patch (and alternatives if risky):

Ignore the approval request comment. That was added by mistake.
(Assignee)

Comment 6

5 years ago
Created attachment 622786 [details] [diff] [review]
patch for checkin
Attachment #622722 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/bfa813930749
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla15
Version: unspecified → Trunk
https://hg.mozilla.org/mozilla-central/rev/bfa813930749
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.