Last Comment Bug 753758 - Saving a canvas state doesn't carry mozFillRule
: Saving a canvas state doesn't carry mozFillRule
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla15
Assigned To: Yury Delendik (:yury)
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-10 06:37 PDT by Tobias Schneider [:tobytailor]
Modified: 2012-05-12 08:58 PDT (History)
4 users (show)
dholbert: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fixes state saving for azure (3.12 KB, patch)
2012-05-10 07:41 PDT, Yury Delendik (:yury)
jmuizelaar: review+
Details | Diff | Splinter Review
patch for checkin (3.08 KB, patch)
2012-05-10 10:52 PDT, Yury Delendik (:yury)
no flags Details | Diff | Splinter Review

Description Tobias Schneider [:tobytailor] 2012-05-10 06:37:56 PDT
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'
Comment 1 Yury Delendik (:yury) 2012-05-10 06:46:55 PDT
Unable to replicate that with gfx.canvas.azure.enabled=false (and on Windows).
Comment 2 Yury Delendik (:yury) 2012-05-10 06:56:30 PDT
that's just copy'n'paste mistake  http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp#703
Comment 3 Yury Delendik (:yury) 2012-05-10 07:41:33 PDT
Created attachment 622722 [details] [diff] [review]
Fixes state saving for azure
Comment 4 Jeff Muizelaar [:jrmuizel] 2012-05-10 10:39:32 PDT
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):
Comment 5 Jeff Muizelaar [:jrmuizel] 2012-05-10 10:40:09 PDT
(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.
Comment 6 Yury Delendik (:yury) 2012-05-10 10:52:32 PDT
Created attachment 622786 [details] [diff] [review]
patch for checkin
Comment 7 Daniel Holbert [:dholbert] 2012-05-11 10:37:40 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/bfa813930749
Comment 8 Matt Brubeck (:mbrubeck) 2012-05-12 08:58:54 PDT
https://hg.mozilla.org/mozilla-central/rev/bfa813930749

Note You need to log in before you can comment on or make changes to this bug.