dojo/dojox — pull request #37 by brandonpayton (2013-09-07 21:56:46+00:00)
Title: [cla] Add SVG mask support

This contribution adds support for SVG masks. The original enhancement request is [here](https://bugs.dojotoolkit.org/ticket/13927), and my CLA is registered under brandon@happycode.net.

I added three files:
* `dojox/gfx/svg_mask.js` - the module that adds SVG masks support. named with an underscore to be similar to the existing svg_attach.js
* `dojox/tests/test_svg_mask.html` - a test page containing DOH-based tests for svg_mask
* `dojox/tests/test_svg_mask_visual.html` - a page to visually observe svg_mask working. it could be considered a demo, but it's a pretty boring demo.

A couple of comments on what may be controversial aspects of the implementation:
1. To avoid the awkwardness of creating a mask object in one group and applying it to an object outside that group, I added the `createMask` method to `Surface` and not to `Group`.
2. I looked for ways to avoid updating `Surface.add` and `Surface.remove` but eventually decided to go with those updates because they keep Mask objects better encapsulated in the gfx shape lifecycle than other solutions.