mozilla/pdf.js — pull request #1489 by kkujala (2012-04-04 20:56:57+00:00)
Title: Refactor class method names.

Also move functionality to more logical place in canvas.js and jpx.js.

I made the changes with a script (see below). And some manual editing on top of that. canvas and jpx files needed to be adjusted so that the script would work flawlessly. Also if a class method extended to two lines then I had to temporarily edit them to one line for the script.

This change was done in reference to #1427.

```
#!/bin/sh

for file in *.js ; do
CLASSES=`grep "= (function" ${file} | sed 's/.*var //;s/.*\.//;s/ =.*//' | grep -v onload`
echo ${CLASSES}

for class in ${CLASSES} ; do
echo ${class}
sed "/${class} = (function/,\$s#\([ ]*\)\(.*\)\(: function\)[ ]*\(.*\)\((.*\)#\1\2\3 ${class}_\2\5#" ${file} |
sed "/${class} = (function/,\$s#\(.*\.\)\(.*\)\( = function\)[ ]*\(.*\)\((.*\)#\1\2\3 ${class}_\2\5#" > _temp
mv -f _temp ${file}
done
done
```