I believe the patch is ready for review. I have not generated a patch with hg yet and the current attached patch is just a file diff.
Without the proposed patch I get the following output when running the reftest:
0:01.36 REFTEST TEST-START | file:///Users/sebastianwong/Documents/mozilla-central/bitmaptest/without_script.html | 0 / 1 (0%)
0:01.47 REFTEST TEST-UNEXPECTED-FAIL | file:///Users/sebastianwong/Documents/mozilla-central/bitmaptest/with_script.html | image comparison (==), max difference: 255, number of differing pixels: 324
With the proposed patch I get the following output when running the reftest:
0:01.28 REFTEST TEST-START | file:///Users/sebastianwong/Documents/mozilla-central/bitmaptest/without_script.html | 0 / 1 (0%)
0:01.32 REFTEST TEST-PASS | file:///Users/sebastianwong/Documents/mozilla-central/bitmaptest/with_script.html | image comparison (==)