Bug 16610: <canvas> restore() removes path segments created before it

Reviewed by Darin Adler (code) and Mark Rowe (tests)

The problem here is that WebKit stored the Path as part of the state, so
restore would incorrectly lose changes made to the canvas path.  To match
Firefox and HTML5 we make two real changes:
  * Move the context path from the state object directly onto the context.
    This is responsible for all the changes to the path manipulation functions
  * Add transform tracking to each state -- this is needed to correctly transform
    the current path when restore()-ing to a prior state.

Test: fast/canvas/canvas-save-restore-with-path.html


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed