This is a subtask of bug 14868.
Created attachment 16854 [details] Patch
Comment on attachment 16854 [details] Patch r=me
Committed revision 27025.