code-dot-org/dashboard — pull request #436 by bcjordan (2014-04-08 23:24:23+00:00)
Title: WIP: Add workaround for chrome SVG clippath issue [finishes #69016256]

Chrome 34 [issue #349701](https://code.google.com/p/chromium/issues/detail?id=349701) makes it so that only the first clippath image element in a given SVG drawing will be rendered. This is fixed in 35.

This workaround:

1. Wraps existing clippath/image pairs into their own svg elements
2. Wraps newly-added clippath/image pairs into their own svg elements
3. Includes a special case for the Farmer app. On creation, dirt elements reference the main character `pegman`'s `` element to be arranged in the SVG element correctly. This (plus a blockly-core change) make the Farmer app use a special class 'pegman-location' which is put on the svg wrapper if Chrome 34, or left on the `` element if not.

Before:

![image](https://cloud.githubusercontent.com/assets/206973/2650497/d24c7d8c-bf73-11e3-9860-f1979e56e8a4.png)

![image](https://cloud.githubusercontent.com/assets/206973/2650498/e1929f38-bf73-11e3-89c2-f01ec404f520.png)

After:

![image](https://cloud.githubusercontent.com/assets/206973/2650502/ea9cb884-bf73-11e3-9047-b446ce5a3cd0.png)